Docs
SIP trunks

SIP trunks

List, read, update and delete the bring-your-own-carrier SIP trunks that route calls from your PBX or carrier to dBel.

A SIP trunk connects your own carrier or PBX to dBel without porting numbers. Calls arriving on the trunk go to its defaultAssistantId, while the workspace owner is on the Growth plan or higher. On a lower plan the trunk answers calls with a busy message; it stays in the list and you can still update it. Trunks are created in the dashboard: Phones → New Phone → Connect via SIP Trunk (Growth plan or higher, ADMIN or OWNER) — see the Connect via SIP trunk guide. This API lists, reads, updates and deletes them.

Beta. This API is documented but not yet frozen. Response fields and error codes may change without a version bump. Pin your integration to the fields you use, and expect additions.

Roles

Any member can list and read trunks. Updating and deleting need ADMIN or OWNER.

Fields worth knowing

  • routingToken — the user part of the trunk's SIP address, sip:<routingToken>@<host>. It routes each call to this trunk and its default assistant. The list response carries the host as sipHost.
  • allowedAddresses — the IPv4 addresses or CIDR ranges your carrier sends from. You can send up to 50 entries. Each range must be /16 or narrower, and 0.0.0.0 is refused. An update replaces the whole list. An empty list removes the IP restriction, so only the SIP username and password protect the trunk. A trunk without SIP credentials refuses an empty list with INVALID_REQUEST_BODY. A refused update changes nothing, including a defaultAssistantId sent in the same body.
  • hasCredentials — whether a SIP username and password are configured. The API never returns the password; authPasswordMasked is a display hint. The dashboard shows the password once, at creation. To replace a lost one, edit the trunk on the Phones page and click Rotate password, which shows the new password once.
  • status — active for a working trunk. A trunk is pending only while the dashboard creates it. If a create stops half-way, the trunk can stay pending: nothing moves it to active later, and it does not answer calls. Delete it and create it again. The API never returns disabled: a deleted trunk answers SIP_TRUNK_NOT_FOUND_OR_UNAUTHORIZED.

Example — point a trunk at a different assistant

curl -X PATCH https://dbel.ai/api/sip-trunks/clx… \
  -H "Authorization: Bearer $DBEL_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "defaultAssistantId": "clx…" }'

Send "defaultAssistantId": null to detach the assistant. A trunk with no assistant does not answer calls until you attach one again. Deleting the assistant has the same effect: it sets the trunk's defaultAssistantId to null. An assistant id from another workspace answers ASSISTANT_NOT_FOUND_OR_UNAUTHORIZED.

Endpoints

GET/api/sip-trunks

List the workspace's SIP trunks, newest first.

Auth: Bearer token · any workspace member

Responses

200 JSON body:

FieldTypeNotes
sipTrunksobject[]The API never returns the SIP password; authPasswordMasked is a display hint.
sipTrunks[].idstring
sipTrunks[].namestring
sipTrunks[].routingTokenstring
sipTrunks[].defaultAssistantIdstring | null
sipTrunks[].defaultAssistantNamestring | null
sipTrunks[].allowedAddressesstring[]
sipTrunks[].authUsernamestring | null
sipTrunks[].authPasswordMaskedstring | null
sipTrunks[].hasCredentialsboolean
sipTrunks[].statusenum: pending | active | disabled
sipTrunks[].createdAtdatetime
sipTrunks[].updatedAtdatetime
sipHoststring

Not paginated. sipHost is the host every trunk shares: a trunk's SIP address is sip:<routingToken>@<host>, where the host is sipHost without any sip: prefix.

Errors

Problem Details (RFC 9457). Each code links to its reference page.

Plus the auth-layer codes every endpoint can return

GET/api/sip-trunks/{sipTrunkId}

Fetch one SIP trunk.

Auth: Bearer token · any workspace member

Responses

200 JSON body:

FieldTypeNotes
sipTrunkobjectThe API never returns the SIP password; authPasswordMasked is a display hint.
sipTrunk.idstring
sipTrunk.namestring
sipTrunk.routingTokenstring
sipTrunk.defaultAssistantIdstring | null
sipTrunk.defaultAssistantNamestring | null
sipTrunk.allowedAddressesstring[]
sipTrunk.authUsernamestring | null
sipTrunk.authPasswordMaskedstring | null
sipTrunk.hasCredentialsboolean
sipTrunk.statusenum: pending | active | disabled
sipTrunk.createdAtdatetime
sipTrunk.updatedAtdatetime

Errors

Problem Details (RFC 9457). Each code links to its reference page.

Plus the auth-layer codes every endpoint can return

PATCH/api/sip-trunks/{sipTrunkId}

Rename a trunk, change its default assistant, or replace its allowed source addresses.

Auth: Bearer token · workspace ADMIN or OWNER

Request body

application/json

Trunk names are unique in a workspace, ignoring case: a name another trunk uses answers INVALID_REQUEST_BODY.

FieldTypeNotes
defaultAssistantIdstring | nullmin 1
namestringmin 1, max 100
allowedAddressesstring[]

Responses

200 JSON body:

FieldTypeNotes
sipTrunkobjectThe API never returns the SIP password; authPasswordMasked is a display hint.
sipTrunk.idstring
sipTrunk.namestring
sipTrunk.routingTokenstring
sipTrunk.defaultAssistantIdstring | null
sipTrunk.defaultAssistantNamestring | null
sipTrunk.allowedAddressesstring[]
sipTrunk.authUsernamestring | null
sipTrunk.authPasswordMaskedstring | null
sipTrunk.hasCredentialsboolean
sipTrunk.statusenum: pending | active | disabled
sipTrunk.createdAtdatetime
sipTrunk.updatedAtdatetime

Errors

Problem Details (RFC 9457). Each code links to its reference page.

Plus the auth-layer codes every endpoint can return

DELETE/api/sip-trunks/{sipTrunkId}

Delete a SIP trunk.

Answers 200 { success: true }, not 204 like the other deletes.

Auth: Bearer token · workspace ADMIN or OWNER

Responses

200 JSON body:

FieldTypeNotes
successtrue

Errors

Problem Details (RFC 9457). Each code links to its reference page.

Plus the auth-layer codes every endpoint can return