---
title: "POST /ports"
method: POST
path: "/ports"
---

# POST /ports

`POST /ports`

## Request body

- PortSpec
  - `proto` 'tcp' | 'tcp4' | 'tcp6' | 'udp' | 'udp4' | 'udp6' | 'sctp' | 'sctp4' | 'sctp6', required — protocol for listening. Corresponds to Go's net.Listen. The strings with "4" and "6" suffixes were introduced in API 1.1.0.
  - `parentIP` string
  - `parentPort` integer
  - `childIP` string
  - `childPort` integer

## Response `201`

PortStatus with ID

- PortStatus
  - `id` integer, required
  - `spec` PortSpec
    - `proto` 'tcp' | 'tcp4' | 'tcp6' | 'udp' | 'udp4' | 'udp6' | 'sctp' | 'sctp4' | 'sctp6', required — protocol for listening. Corresponds to Go's net.Listen. The strings with "4" and "6" suffixes were introduced in API 1.1.0.
    - `parentIP` string
    - `parentPort` integer
    - `childIP` string
    - `childPort` integer

---

[API](https://skmtc.dev/balena-os/apis/rootlesskit-api.md) · [All operations](https://skmtc.dev/balena-os/apis/rootlesskit-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/balena-os/rootlesskit-api/revisions/c9a265b3c140/schema)
