---
title: "Update a mapping"
method: PATCH
path: "/gateway/{gateway_topic}/mapping/details"
tags: ["Mappings"]
---

# Update a mapping

`PATCH /gateway/{gateway_topic}/mapping/details`

## Request

- Base URL: `https://api.quiva.ai`
- URL: `https://api.quiva.ai/gateway/{gateway_topic}/mapping/details`
- Auth: one of:
  - HTTP bearer
  - API key in header `x-api-key`
- TypeScript: <https://skmtc.dev/quivaworks/apis/quiva-ai-gateway-4/docs/gateway/:gateway_topic/mapping/details/patch.ts> (a function with typed inputs; its response is checked against the schema)

Updates an existing gateway mapping configuration.

## Path parameters

- `gateway_topic` string, required

## Query parameters

- `method` 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH' | 'OPTIONS' | 'HEAD', required
- `path` string, required

## Request body

- MappingUpdateRequest
  - `path` string: Updated URL path for the mapping
  - `is_public` boolean: Whether the mapping is publicly accessible
  - `limit` Limit
    - `request` integer: Maximum number of requests allowed
    - `time` integer: Time window for rate limiting in milliseconds
  - `timeout` integer: Updated timeout in milliseconds for mapping requests
  - `traffic_distribution` object: Updated traffic distribution configuration for A/B testing

## Response `200`

Mapping updated successfully

- SuccessResponse
  - `message` string

## Other responses

- `400`: Bad request
- `404`: Resource not found

---

[API](https://skmtc.dev/quivaworks/apis/quiva-ai-gateway-4.md) - [All operations](https://skmtc.dev/quivaworks/apis/quiva-ai-gateway-4/llms.txt) - [OpenAPI document](https://skmtc.dev/quivaworks/apis/quiva-ai-gateway-4/revisions/4915bc3902b1?raw)
