ThunderPhone 2.0 is live.Self-serve, from 2¢/min.Read the announcement

Calls

SIP Addresses

Register one-time SIP URIs for calls, and manage permanent SIP endpoints that route to an agent.

Reach an agent over SIP without a phone number. For how and when to use each kind, see Connect over SIP.

Endpoints

MethodPathDescription
POST/v1/calls/register-sipRegister a call and get a one-time SIP URI
GET/v1/sip-endpointsList SIP endpoints
POST/v1/sip-endpointsCreate a SIP endpoint (returns its password once)
GET/v1/sip-endpoints/{id}Get a SIP endpoint
PATCH/v1/sip-endpoints/{id}Update name, agent, source-IP allowlist or status
DELETE/v1/sip-endpoints/{id}Delete a SIP endpoint
POST/v1/sip-endpoints/{id}/rotate-passwordIssue a new password (returned once)

Creating, updating and deleting require an organization API key, or a dashboard session with the admin role or higher.

Register a call

POST /v1/calls/register-sip

Request fields

FieldTypeRequiredDescription
agent_idintegeryesAgent in your organization that answers the call
to_numberstringnoE.164 number the caller dialed on your side; stored as the call's destination
variablesobjectnoValues for the agent prompt's {{placeholders}}

Response (201)

FieldTypeDescription
call_idintegerId the call will have in call history
sip_uristringOne-time SIP URI to dial: sip:c-<token>@sip.thunderphone.com. Treat it as a secret until used
expires_atstringWhen the URI stops working (5 minutes after registration)
agent_idintegerThe answering agent
to_numberstring | nullThe registered destination, if any

The URI works for one call. After that call, or after expires_at, calls to it are refused.

Errors

StatusWhen
400Unknown agent, to_number not in E.164 format, or invalid variables
403Dashboard session below the admin role
503SIP addresses are not available in this environment

SIP endpoint object

FieldTypeDescription
idintegerEndpoint id
namestringYour label
agent_idinteger | nullAgent that answers calls to the endpoint
sip_uristringPermanent address: sip:agent-<id>-<letters>@sip.thunderphone.com
usernamestringSIP digest username
passwordstringOnly on create and rotate-password responses
allowed_source_cidrsstring[]Source IP ranges allowed to call; empty means any source with valid credentials. Checked for TCP/TLS calls only: an endpoint with an allowlist refuses UDP calls
statusstringactive, disabled (calls refused) or provisioning (setup in progress or failed; cannot receive calls)
created_atstringCreation time

Create a SIP endpoint

POST /v1/sip-endpoints

FieldTypeRequiredDescription
agent_idintegeryesAgent in your organization
namestringnoLabel, up to 120 characters
allowed_source_cidrsstring[]noUp to 50 IPv4/IPv6 addresses or CIDR ranges

Returns 201 with the endpoint object, including password.

allowed_source_cidrs entries are normalized and deduplicated. 0.0.0.0/0 and ::/0 are refused (they are not an allowlist); use [] to allow any source with valid credentials.

StatusWhen
400Unknown agent, invalid field, or invalid CIDR
403Dashboard session below the admin role
502The address could not be set up. Retry the request
503SIP addresses are not available in this environment

After a 502, create the endpoint again. A leftover endpoint in provisioning never received a password, cannot receive calls and is removed automatically; don't wait for it to become active.

List and get SIP endpoints

GET /v1/sip-endpoints returns 200 with {"results": [...]}, newest first. GET /v1/sip-endpoints/{id} returns one endpoint; an unknown id, or one in another organization, returns 404. Read responses never include password.

Update a SIP endpoint

PATCH /v1/sip-endpoints/{id} accepts any of name, agent_id, allowed_source_cidrs and status (active or disabled). Returns the endpoint object. Changing the agent or the allowlist takes effect for the next call. Changing status returns 409 while the endpoint is still provisioning.

Rotate the password

POST /v1/sip-endpoints/{id}/rotate-password returns the endpoint object with a new password. The old password stops working immediately.

Delete a SIP endpoint

DELETE /v1/sip-endpoints/{id} returns 204. Calls to the address are refused from then on. Call history is kept. It returns 409 while the endpoint is still provisioning; an endpoint whose setup failed is removed automatically, usually within an hour.