Skip to main content
The programmatic path for the Unpod side: create a SIP trunk pointed at your LiveKit SIP URI and attach your number. The trunk’s origin endpoint is what you then use to create the matching trunks in the LiveKit console - see the Dashboard guide for the LiveKit-side screens.
Base URL: https://unpod.dev/api/v2/platform/ Every request needs Authorization: Token <your-api-key> and an Org-Handle header. See Authentication.

Prerequisites

  • An Unpod API Token and Org-Handle.
  • A number in your org (we’ll fetch its id below).
  • Your LiveKit SIP URI from the LiveKit Cloud dashboard (Settings → Project), e.g. sip:<project-id>.sip.livekit.cloud.

1. Find your number

cURL
Response (200)

List Numbers reference

Full request/response schema.

2. Create the SIP trunk to LiveKit

Point the trunk’s sip_url at your LiveKit SIP URI.
cURL
Response (201)

Create Trunk reference

All request fields (sip_url, auth_username, auth_password, transport, port, source_ips).

3. Attach your number to the trunk

Map the number from step 1 (its id) to the trunk from step 2 (its id). The response returns the origin endpoint - the address you use in LiveKit.
cURL
Response (201)
The origin_endpoint.ingress is the address you enter when creating the LiveKit outbound trunk. The username and password are the ones Unpod generates for your number: copy them from Outbound Trunk Details in the dashboard (Connect an Unpod Number). The API doesn’t return them.

Attach Numbers reference

Path params, request body, and the full origin-endpoint response.

Configure the LiveKit side

The Unpod side is done. LiveKit’s SIP API is served over Twirp HTTP at {LIVEKIT_URL}/twirp/livekit.SIP/<Method>. Authenticate with a LiveKit access token (JWT with a SIP admin grant) - mint one with lk token create --sip-admin or a server SDK.
Env

4. Create the inbound trunk

cURL
Response

5. Create the outbound trunk

cURL
Response
trunk.address = your origin_endpoint.ingress host (no sip: prefix).

6. Create the dispatch rule

cURL
Response
The same calls are available via the lk CLI (lk sip inbound create <file>) and the server SDKs (Go SIPClient, JS SipClient, Python sip_service). Field shapes follow LiveKit’s SIP proto - confirm in their API reference.

LiveKit SIP API reference

Full trunk + dispatch-rule API and SDK usage (this is LiveKit’s API).

Troubleshooting