---
title: "Update a mapping version"
method: PATCH
path: "/gateway/mapping-version/{gateway_topic}/{version_number}"
tags: ["Mapping Versions"]
---

# Update a mapping version

`PATCH /gateway/mapping-version/{gateway_topic}/{version_number}`

Updates an existing mapping version configuration.

## Path parameters

- `gateway_topic` string, required
- `version_number` integer, required

## Query parameters

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

## Request body

- MappingVersionUpdateRequest
  - `active` boolean — Whether the mapping version is active
  - `description` string — Updated description of the mapping version
  - `middleware` Middleware[] — Updated list of middleware to be applied to the mapping version
    - `order` integer — Execution order of the middleware
    - `resource` string — Resource identifier for the middleware function
    - `resource_type` 'function' | 'service' — Type of resource the middleware points to
    - `resource_version` string — Version of the middleware resource to use
    - `type` 'pre-request' | 'post-request' — When the middleware should execute
  - `exact_match` boolean — Whether the path should be matched exactly
  - `attributes` string[] — Updated attributes for the mapping version
  - `boolean_logic` string — Updated boolean logic expression for request routing
  - `invocation_type` string — Updated type of invocation for the resource

## Response `200`

Mapping version updated successfully

- SuccessResponse
  - `message` string

## Other responses

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

---

[API](https://skmtc.net/quivaworks/apis/quiva-ai-gateway-4.md) · [All operations](https://skmtc.net/quivaworks/apis/quiva-ai-gateway-4/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/quivaworks/quiva-ai-gateway-4/versions/c040b7174eb9/schema)
