API Reference
SIP Trunk

Connect a SIP trunk to the workspace

POST
/v1/sip-trunk

Connects the workspace's trunk. A workspace has at most one, so there is no trunk ID in the path.

Refuses with sip_trunk.already_exists when a trunk is already connected, rather than replacing it: swapping a live trunk would drop calls in flight, and on an ip_allowlist trunk would reset an approved connection back to pending_approval. Use PUT to change an existing trunk.

The resulting status depends on auth_mode, and the difference is a security one. A registration trunk starts pending and needs no operator approval — the carrier authenticates with a username and password on every REGISTER, so it proves itself on every call. An ip_allowlist trunk starts pending_approval and never self-activates: trusting a signalling IP is a standing grant that only an operator can make.

Authorization

bearerAuth
AuthorizationBearer <token>

Long-lived ES256 JWT minted from the dashboard (https://app.sautikit.com/developers/api-keys). Signed by the platform keyring. Carries workspace_id and scopes claims; revoked via the platform deny-list.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

curl -X POST "https://example.com/v1/sip-trunk" \  -H "Content-Type: application/json" \  -d '{    "label": "Head office trunk",    "auth_mode": "registration",    "proxy": "sip.example-carrier.com",    "transport": "udp",    "username": "sautikit_100",    "password": "…"  }'
{  "auth_mode": "registration",  "label": "string",  "realm": "string",  "proxy": "string",  "transport": "udp",  "auth_username": "string",  "has_password": true,  "signaling_ips": [    "string"  ],  "media_ips": [    "string"  ],  "country_code": "string",  "outbound_number_format": "string",  "outbound_codec_prefs": "string",  "outbound_media_security": "string",  "status": "pending",  "last_error": "string"}
{  "error": {    "code": "validation.bad_request",    "message": "string",    "request_id": "string",    "details": [      "string"    ]  }}
{  "error": {    "code": "validation.bad_request",    "message": "string",    "request_id": "string",    "details": [      "string"    ]  }}