---
title: "Set host port mapping for a container port"
method: POST
path: "/v1/ports/mappings"
tags: ["ports"]
---

# Set host port mapping for a container port

`POST /v1/ports/mappings`

Records a mapping from container port to host port and broadcasts an SSE event

## Request body

- object

## Response `200`

Mapping set

- object

## Other responses

- `400` — Invalid request

## Changes

- **2025-08-08** `bdd794bb1f17` — 1 info
  - endpoint added
- **2025-07-18** `21270d5158bd` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/wandb/apis/catnip-container-api/changes/v1/ports/mappings/post.md)

---

[API](https://skmtc.dev/wandb/apis/catnip-container-api.md) · [All operations](https://skmtc.dev/wandb/apis/catnip-container-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/wandb/catnip-container-api/revisions/a075b0fa501a/schema)
