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 assipHost.allowedAddresses— the IPv4 addresses or CIDR ranges your carrier sends from. You can send up to 50 entries. Each range must be/16or narrower, and0.0.0.0is 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 withINVALID_REQUEST_BODY. A refused update changes nothing, including adefaultAssistantIdsent in the same body.hasCredentials— whether a SIP username and password are configured. The API never returns the password;authPasswordMaskedis 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—activefor a working trunk. A trunk ispendingonly while the dashboard creates it. If a create stops half-way, the trunk can staypending: nothing moves it toactivelater, and it does not answer calls. Delete it and create it again. The API never returnsdisabled: a deleted trunk answersSIP_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:
| Field | Type | Notes |
|---|---|---|
| sipTrunks | object[] | The API never returns the SIP password; authPasswordMasked is a display hint. |
| sipTrunks[].id | string | |
| sipTrunks[].name | string | |
| sipTrunks[].routingToken | string | |
| sipTrunks[].defaultAssistantId | string | null | |
| sipTrunks[].defaultAssistantName | string | null | |
| sipTrunks[].allowedAddresses | string[] | |
| sipTrunks[].authUsername | string | null | |
| sipTrunks[].authPasswordMasked | string | null | |
| sipTrunks[].hasCredentials | boolean | |
| sipTrunks[].status | enum: pending | active | disabled | |
| sipTrunks[].createdAt | datetime | |
| sipTrunks[].updatedAt | datetime | |
| sipHost | string |
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.
- 400 INVALID_WORKSPACE_ID — The workspace is missing or invalid.
- 500 UNKNOWN_ERROR — An unexpected server error occurred. Please try again later.
Plus the auth-layer codes every endpoint can return
- 401 UNAUTHENTICATED — Authentication required.
- 403 EMAIL_NOT_VERIFIED — Your email address is not verified.
- 401 INVALID_USER — The authenticated user is invalid or missing.
- 400 INVALID_WORKSPACE_ID — The workspace is missing or invalid.
- 404 WORKSPACE_NOT_FOUND_OR_UNAUTHORIZED — Workspace not found or you do not have access.
- 403 FORBIDDEN — You do not have permission to access this resource.
- 429 RATE_LIMIT_EXCEEDED — Too many requests. Please wait.
GET/api/sip-trunks/{sipTrunkId}
Fetch one SIP trunk.
Auth: Bearer token · any workspace member
Responses
200 JSON body:
| Field | Type | Notes |
|---|---|---|
| sipTrunk | object | The API never returns the SIP password; authPasswordMasked is a display hint. |
| sipTrunk.id | string | |
| sipTrunk.name | string | |
| sipTrunk.routingToken | string | |
| sipTrunk.defaultAssistantId | string | null | |
| sipTrunk.defaultAssistantName | string | null | |
| sipTrunk.allowedAddresses | string[] | |
| sipTrunk.authUsername | string | null | |
| sipTrunk.authPasswordMasked | string | null | |
| sipTrunk.hasCredentials | boolean | |
| sipTrunk.status | enum: pending | active | disabled | |
| sipTrunk.createdAt | datetime | |
| sipTrunk.updatedAt | datetime |
Errors
Problem Details (RFC 9457). Each code links to its reference page.
- 400 INVALID_SIP_TRUNK_ID — The sipTrunkId is missing or invalid.
- 400 INVALID_WORKSPACE_ID — The workspace is missing or invalid.
- 404 SIP_TRUNK_NOT_FOUND_OR_UNAUTHORIZED — SIP trunk not found or you do not have access.
Plus the auth-layer codes every endpoint can return
- 401 UNAUTHENTICATED — Authentication required.
- 403 EMAIL_NOT_VERIFIED — Your email address is not verified.
- 401 INVALID_USER — The authenticated user is invalid or missing.
- 400 INVALID_WORKSPACE_ID — The workspace is missing or invalid.
- 404 WORKSPACE_NOT_FOUND_OR_UNAUTHORIZED — Workspace not found or you do not have access.
- 403 FORBIDDEN — You do not have permission to access this resource.
- 429 RATE_LIMIT_EXCEEDED — Too many requests. Please wait.
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.
| Field | Type | Notes |
|---|---|---|
| defaultAssistantId | string | null | min 1 |
| name | string | min 1, max 100 |
| allowedAddresses | string[] |
Responses
200 JSON body:
| Field | Type | Notes |
|---|---|---|
| sipTrunk | object | The API never returns the SIP password; authPasswordMasked is a display hint. |
| sipTrunk.id | string | |
| sipTrunk.name | string | |
| sipTrunk.routingToken | string | |
| sipTrunk.defaultAssistantId | string | null | |
| sipTrunk.defaultAssistantName | string | null | |
| sipTrunk.allowedAddresses | string[] | |
| sipTrunk.authUsername | string | null | |
| sipTrunk.authPasswordMasked | string | null | |
| sipTrunk.hasCredentials | boolean | |
| sipTrunk.status | enum: pending | active | disabled | |
| sipTrunk.createdAt | datetime | |
| sipTrunk.updatedAt | datetime |
Errors
Problem Details (RFC 9457). Each code links to its reference page.
- 404 ASSISTANT_NOT_FOUND_OR_UNAUTHORIZED — Assistant not found or you do not have access.
- 400 INVALID_REQUEST_BODY — The request body is invalid.
- 400 INVALID_SIP_TRUNK_ID — The sipTrunkId is missing or invalid.
- 400 INVALID_WORKSPACE_ID — The workspace is missing or invalid.
- 404 SIP_TRUNK_NOT_FOUND_OR_UNAUTHORIZED — SIP trunk not found or you do not have access.
- 502 SIP_TRUNK_PROVISION_FAILED — Failed to provision the SIP trunk. Please try again.
Plus the auth-layer codes every endpoint can return
- 401 UNAUTHENTICATED — Authentication required.
- 403 EMAIL_NOT_VERIFIED — Your email address is not verified.
- 401 INVALID_USER — The authenticated user is invalid or missing.
- 400 INVALID_WORKSPACE_ID — The workspace is missing or invalid.
- 404 WORKSPACE_NOT_FOUND_OR_UNAUTHORIZED — Workspace not found or you do not have access.
- 403 FORBIDDEN — You do not have permission to access this resource.
- 429 RATE_LIMIT_EXCEEDED — Too many requests. Please wait.
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:
| Field | Type | Notes |
|---|---|---|
| success | true |
Errors
Problem Details (RFC 9457). Each code links to its reference page.
- 400 INVALID_SIP_TRUNK_ID — The sipTrunkId is missing or invalid.
- 400 INVALID_WORKSPACE_ID — The workspace is missing or invalid.
- 404 SIP_TRUNK_NOT_FOUND_OR_UNAUTHORIZED — SIP trunk not found or you do not have access.
Plus the auth-layer codes every endpoint can return
- 401 UNAUTHENTICATED — Authentication required.
- 403 EMAIL_NOT_VERIFIED — Your email address is not verified.
- 401 INVALID_USER — The authenticated user is invalid or missing.
- 400 INVALID_WORKSPACE_ID — The workspace is missing or invalid.
- 404 WORKSPACE_NOT_FOUND_OR_UNAUTHORIZED — Workspace not found or you do not have access.
- 403 FORBIDDEN — You do not have permission to access this resource.
- 429 RATE_LIMIT_EXCEEDED — Too many requests. Please wait.