---
title: "Create a new mapping for a gateway"
method: POST
path: "/gateway/{gateway_topic}/mapping"
tags: ["Mappings"]
---

# Create a new mapping for a gateway

`POST /gateway/{gateway_topic}/mapping`

Creates a new path mapping within the specified gateway.

## Path parameters

- `gateway_topic` string, required

## Request body

- MappingCreateRequest
  - `path` string, required — URL path for the mapping
  - `method` 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH' | 'OPTIONS' | 'HEAD' — HTTP method 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 — Timeout in milliseconds for mapping requests
  - `traffic_distribution` object — Traffic distribution configuration for A/B testing

## Response `200`

Mapping created successfully

- MappingResponseWrapper
  - `body` MappingResponse
    - `subject` string — Subject identifier of the mapping
    - `path` string — URL path for the mapping
    - `method` string — HTTP method 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 — Timeout in milliseconds for mapping requests
    - `traffic_distribution` object — Traffic distribution configuration for A/B testing
    - `modified` integer — Unix timestamp of when the mapping was last modified
    - `type` string — Type of the mapping record
  - `metadata` Metadata
    - `subject` string — Subject identifier for the resource

## 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/revisions/c040b7174eb9/schema)
