Calls
Read call history with transcripts and recordings — and place outbound calls.
A call is one conversation between a caller and an assistant. It comes in from a phone number, a SIP trunk or the web widget, or you place it outbound. A test call from the dashboard playground is a call too (callType: "PLAYGROUND"). Calls are read-only except for placing a new one.
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.
Two shapes, one resource
The list returns each call's own columns only. It holds only calls that have ended (endedAt is set), so a call in progress is not in the list or its totals. Fetch a call in progress by id. A call that ended at 0 seconds, such as an outbound call that was never answered or never dialled, is in the list with duration 0.
The detail replaces assistantId and contactId with nested assistant (id and name; null once the assistant is deleted) and contact objects. It also adds recording, transcripts and analysis. transcripts is [] when the call has none; the others are null. Fetch the detail when you need any of those; do not expect them on the list.
Contact enrichment
The contact's phoneNumber object belongs to the number, not to your workspace: every workspace that talks to the number shares it. So its lastEnrichedAt is null until your workspace enriches the contact; the contact's own lastEnrichedAt is set when it has. Its deepResearchPending shows only your workspace's own deep-research request, while it runs. Otherwise it is null.
Recordings
The detail's recording.recordingUrl is a path on this API, not a storage link. Fetch it with the same Bearer token to stream the audio (OGG/Opus). It supports Range requests, so a player can scrub. Access is checked on every fetch — the URL is not a pre-signed link — and a call with no recording answers 404.
consentDisclosureText is the recording question or notice the assistant reads on the call, and consentAt is when the caller gave the answer that set consentStatus, or when the wait for an answer ended (null if no question was asked, and on calls from before these fields).
Placing an outbound call
Outbound calling needs the Growth plan or higher on the workspace owner's subscription. Below that, the endpoint answers FREE_PLAN_RESTRICTED or PLAN_FEATURE_RESTRICTED. The call uses the owner's assistant minutes for the month, and it needs at least one minute of them left. With less, the endpoint answers 402 (PLAN_MINUTES_EXHAUSTED) and places no call. If the minutes run out after the request is accepted, before the assistant dials, the call ends with endReason: "TIME_LIMIT" and never rings. The minutes reset monthly, as Plan limits describes. A workspace owner or admin must also switch it on in the dashboard (Settings → Outbound Calling, which records your TCPA acknowledgement). Until then, the endpoint answers OUTBOUND_NOT_ENABLED. The workspace also needs a callback number in Settings → Business details, because in some places, for example the US, an AI call must give a number the person can call back. Without one, the endpoint answers 422 (CALLBACK_NUMBER_REQUIRED) and places no call.
The call is placed from the assistant's own phone number, which must be verified and voice-capable. It must not be an Australian 1800, 13 or 1300 number: these take inbound calls only, so a request from one answers 422 (CALLER_ID_INBOUND_ONLY) and places no call. A number bought through dBel (provider: "dbel") needs our approval for the workspace: until we give it, a request from one answers 403 (OUTBOUND_APPROVAL_REQUIRED) and places no call. A workspace owner or admin asks for it in Settings → Outbound Calling (how to ask). A number imported from your own Twilio account needs no approval. Calls go only to US, Canadian and Australian numbers. Any other toNumber answers 422 (DESTINATION_NOT_ALLOWED) and places no call. The country comes from the number, not its prefix: Puerto Rico, the other US territories and the Caribbean countries that share +1 are refused, and so are premium-rate (+1 900, +61 1900) and personal (+1 500) numbers. variables fill the variables in the assistant's outbound texts (see Call variables below). clientReferenceId is echoed back in the post-call webhook so you can match the result to your own record. If the person asks not to be called again, the call ends and its optedOut field is true (on every call object, false unless this happened; in the webhook, on outbound calls only). After that, a request to the same number from the same workspace answers 409 (CALLEE_OPTED_OUT) and places no call, even after that call is deleted. Another workspace's opt-out does not count. Add the number to your own do-not-call list too.
Calling hours. dBel checks the callee's local time just before it dials, not when the request arrives. A call this check refuses is accepted (202), then ends with endReason: "OUTSIDE_CALLING_HOURS" without ringing, and uses no minutes. So is a call to a toll-free number, which has no home time zone. The check is a safety net, not a compliance service: see the Outbound calling guide.
curl -X POST https://dbel.ai/api/calls/outbound \
-H "Authorization: Bearer $DBEL_API_TOKEN" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: crm-deal-12345-attempt-1" \
-d '{
"assistantId": "clx…",
"toNumber": "+14155551234",
"variables": { "name": "Alex", "topic": "your appointment" },
"clientReferenceId": "crm-deal-12345"
}'The response is 202 { "callId": "…" }. If the assistant has a webhookUrl and the workspace has an active signing secret, the call's outcome arrives on your webhook. Otherwise no webhook is sent, and the call's webhookFailureReason is no_config. You can always fetch the call by id.
Call variables
variables fill the variables in three assistant texts: outboundIdentity, outboundGreeting and outboundVoicemailMessage. The voicemail message counts only while voicemail is on. The request carries values only. The text decides what happens when a value is missing (absent, or only spaces):
{{name}}— required. The endpoint answers422(MISSING_CALL_VARIABLES) and places no call.details.missinglists the missing names, sorted.{{name|there}}— the word after the bar is spoken instead.{{name|}}— the variable is left out, and the spaces around it are tidied.
{
"type": "https://dbel.ai/errors/missing-call-variables",
"title": "The request is missing variables that this assistant's outbound texts require.",
"status": 422,
"code": "MISSING_CALL_VARIABLES",
"detail": "Send a value for: name.",
"details": { "missing": ["name"] }
}GET /api/assistants/{assistantId} lists the variables an assistant's texts use, in callVariables, so you can check what to send before you call.
- Names are case-sensitive:
{{Name}}and{{name}}are two variables. Spaces inside the braces do not matter:{{ name }}is{{name}}. - Limits: at most 20 variables per call. A name starts with a letter and uses only letters, digits and
_, 40 characters at most. A value is at most 200 characters. A request past a limit answers400(INVALID_REQUEST_BODY). - Reserved names:
assistant_name,business_name,callback_number,callback_line,appointment_date,appointment_linkandbooking_link, in any case. dBel fills these itself, so a request that sends one answers400(INVALID_REQUEST_BODY).
During the call, the assistant knows the names of your variables. It reads a value when the conversation needs one, for example when the person asks where the clinic is. It treats a value as a fact about the call, not as an instruction. But if the person asks about a value that contains a request or a false claim, the assistant can repeat it. Do not put text you do not control (for example, a field a lead typed into a web form) into a variable if a false statement to the person called would harm you.
If an assistant's text changes after a request is accepted and gains a variable the request did not send, the call goes ahead and that variable is left out. It is never spoken as written.
Retries are safe. Two bodies are identical when assistantId, toNumber, variables and clientReferenceId all match. Without an Idempotency-Key header, an identical body sent while the first request is still being set up answers 409 (RESOURCE_CONFLICT). One sent within 15 seconds after the first answered 202 returns the first call's id (200 with idempotent: true). Neither dials again. If the first request stops without a response, an identical body can answer 409 for up to 60 seconds. After those windows, an identical body places a new call.
For a longer guarantee, send an Idempotency-Key header. The same key with the same body returns the first call's id for 24 hours. The same key with a different body answers 409 (RESOURCE_CONFLICT), and so does the same key while the first request is still being set up. A request that fails with an error response does not keep its key, so you can retry it. The refusal checks (plan, minutes, callback number, country, approval, variables and opt-out) run before the duplicate check, so a repeat that one of them now refuses gets that error, not the first call's id. If a request stops without any response (for example, a timeout), its key can answer 409 for up to 24 hours; retry with a new key. The duplicate check relies on dBel's cache: in the rare case that the cache is unavailable, a repeated request can place a second call. To place two deliberate calls to the same number, vary clientReferenceId, and send a new Idempotency-Key if you use one.
Limits. A workspace can send 30 outbound requests in a 60-second window, which starts at its first request. Every request that passes the plan, minutes, switch-on, callback-number, body and country checks counts, a duplicate or a retry included. A request to a country that dBel does not call is refused before the count (DESTINATION_NOT_ALLOWED), so it does not count. Past the limit, the endpoint answers RATE_LIMIT_EXCEEDED with no Retry-After header, so wait up to 60 seconds.
Each call also takes one of the plan's slots for calls at the same time. Inbound, web-widget, playground and outbound calls in the workspace share those slots. When every slot is busy, the endpoint answers 402 (SUBSCRIPTION_LIMIT_EXCEEDED) with the detail "Concurrent call limit reached. Try again shortly." That is a busy signal, not a plan block: retry after a call ends. The numbers per plan are under Plan limits.
Calls from numbers bought through dBel have one more limit: the plan's number of them in any 24 hours, also under Plan limits. Every accepted request counts, also one that is not dialed (for example, one outside calling hours). Past it, the endpoint answers 429 (OUTBOUND_DAILY_LIMIT_REACHED) with no Retry-After header and places no call. Retry when the oldest of those calls is more than 24 hours old. Calls from numbers imported from your own Twilio account are not limited this way.
Endpoints
GET/api/calls
List calls, newest first, with optional filters and totals.
Auth: Bearer token · any workspace member
Query parameters
| Field | Type | Notes |
|---|---|---|
| assistantId | string | Only calls handled by this assistant. |
| contactId | string | Only calls with this contact. Two reserved values filter by channel instead: __playground__ and __web__. |
| from | date | Start of the startTime range (ISO 8601, YYYY-MM-DD, or Unix seconds / milliseconds). A value that does not parse is ignored, not refused. A future date is clamped to now. |
| to | date | End of the range: the end of that day in UTC, so any time you send is replaced. A value that does not parse is ignored. A future date is clamped to now. |
| sort | enum: asc | desc | Order by startTime. Default desc. |
| aggregate | boolean | true adds totalCalls and totalSeconds for the filtered set. |
| limit | integer 1–100 | Rows per page. Default 20. |
| cursor | string | The nextCursor from the previous page. |
Responses
200 JSON body:
| Field | Type | Notes |
|---|---|---|
| calls | object[] | duration is whole seconds. The list holds only calls that have ended (endedAt is set), so a call in progress is left out. A call that ended at 0 seconds, such as an outbound call that was never answered or never dialled, is listed with duration 0. |
| calls[].id | string | |
| calls[].assistantId | string | |
| calls[].contactId | string | null | |
| calls[].startTime | datetime | |
| calls[].duration | number | |
| calls[].callType | enum: SIP | PLAYGROUND | WEB | |
| calls[].direction | enum: INBOUND | OUTBOUND | |
| calls[].dialedNumber | string | null | |
| calls[].outboundVariables | json | null | |
| calls[].clientReferenceId | string | null | |
| calls[].outboundTrunkId | string | null | |
| calls[].functionExecutions | json | null | |
| calls[].endedAt | datetime | null | |
| calls[].endReason | enum: CALLER_HANGUP | ASSISTANT_DISCONNECT | TIME_LIMIT | IDLE_TIMEOUT | ERROR | REJECTED | NO_ANSWER | DIAL_FAILED | VOICEMAIL | OUTSIDE_CALLING_HOURS | null | |
| calls[].consentStatus | enum: NOT_REQUESTED | GRANTED | DENIED | null | |
| calls[].consentDisclosureText | string | null | |
| calls[].consentAt | datetime | null | |
| calls[].optedOut | boolean | |
| calls[].webhookDeliveryId | string | null | |
| calls[].webhookDeliveredAt | datetime | null | |
| calls[].webhookFailureReason | string | null | |
| calls[].browserVisitorId | string | null | |
| calls[].visitorMeta | json | null | |
| calls[].visitorOrigin | string | null | |
| calls[].visitorIp | string | null | |
| calls[].visitorUserAgent | string | null | |
| calls[].webPageContextSummary | json | null | |
| hasMore | boolean | |
| nextCursor | string | null | |
| totalCalls | number (only with aggregate=true) | |
| totalSeconds | number (only with aggregate=true) |
Errors
Problem Details (RFC 9457). Each code links to its reference page.
- 400 INVALID_REQUEST_QUERY — The request query is invalid.
- 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/calls/{callId}
Fetch one call with its transcript and recording.
Auth: Bearer token · any workspace member
Responses
200 JSON body:
| Field | Type | Notes |
|---|---|---|
| call | object | contact and recording are null when absent; transcripts is []. analysis is null on your calls: dBel does not fill it. A deleted contact still appears here, with deletedAt set. assistant is null when the call's assistant was deleted. |
| call.id | string | |
| call.startTime | datetime | |
| call.duration | number | |
| call.callType | enum: SIP | PLAYGROUND | WEB | |
| call.direction | enum: INBOUND | OUTBOUND | |
| call.dialedNumber | string | null | |
| call.outboundVariables | json | null | |
| call.clientReferenceId | string | null | |
| call.outboundTrunkId | string | null | |
| call.functionExecutions | json | null | |
| call.endedAt | datetime | null | |
| call.endReason | enum: CALLER_HANGUP | ASSISTANT_DISCONNECT | TIME_LIMIT | IDLE_TIMEOUT | ERROR | REJECTED | NO_ANSWER | DIAL_FAILED | VOICEMAIL | OUTSIDE_CALLING_HOURS | null | |
| call.consentStatus | enum: NOT_REQUESTED | GRANTED | DENIED | null | |
| call.consentDisclosureText | string | null | |
| call.consentAt | datetime | null | |
| call.optedOut | boolean | |
| call.webhookDeliveryId | string | null | |
| call.webhookDeliveredAt | datetime | null | |
| call.webhookFailureReason | string | null | |
| call.browserVisitorId | string | null | |
| call.visitorMeta | json | null | |
| call.visitorOrigin | string | null | |
| call.visitorIp | string | null | |
| call.visitorUserAgent | string | null | |
| call.webPageContextSummary | json | null | |
| call.assistant | object | |
| call.assistant.id | string | |
| call.assistant.name | string | |
| call.contact | object | |
| call.contact.id | string | |
| call.contact.workspaceId | string | |
| call.contact.name | string | null | |
| call.contact.email | string | null | |
| call.contact.source | enum: INBOUND | OUTBOUND | MANUAL | WEB | IMPORT | |
| call.contact.typedPhone | string | null | |
| call.contact.browserVisitorId | string | null | |
| call.contact.deletedAt | datetime | null | |
| call.contact.lastEnrichedAt | datetime | null | |
| call.contact.createdAt | datetime | |
| call.contact.updatedAt | datetime | |
| call.contact.phoneNumber | object | null for a web-widget contact (no phone number); lastEnrichedAt is null until your workspace enriches the contact, and deepResearchPending is null unless your own deep-research request is running (see Contact enrichment above). |
| call.contact.phoneNumber.id | string | |
| call.contact.phoneNumber.phoneNumber | string | |
| call.contact.phoneNumber.lastEnrichedAt | datetime | null | |
| call.contact.phoneNumber.deepResearchPending | boolean | null | |
| call.recording | object | recordingUrl is the auth-gated proxy path /api/calls/{callId}/recording, never a storage URL. |
| call.recording.id | string | |
| call.recording.timestamp | datetime | |
| call.recording.recordingUrl | string | |
| call.transcripts | object[] | |
| call.transcripts[].id | string | |
| call.transcripts[].timestamp | datetime | |
| call.transcripts[].content | string | |
| call.transcripts[].speaker | enum: CONTACT | ASSISTANT | ASSISTANT_SMS | null | |
| call.transcripts[].messageSid | string | null | |
| call.analysis | object | |
| call.analysis.id | string | |
| call.analysis.sentimentScore | number | |
| call.analysis.topics | json | |
| call.analysis.summary | string | |
| call.analysis.tools | json |
Errors
Problem Details (RFC 9457). Each code links to its reference page.
- 404 CALL_NOT_FOUND_OR_UNAUTHORIZED — Call not found or you do not have access.
- 400 INVALID_CALL_ID — The callId is missing or invalid.
- 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/calls/{callId}/recording
Stream the call's audio. Honours HTTP Range requests.
After authentication, this route answers failures with a bare status and an empty body, not Problem Details. Authentication failures use the shared auth codes.
Auth: Bearer token · any workspace member
Responses
200 audio/ogg The whole file.
206 audio/ogg The requested byte range, with a Content-Range header.
Errors
Problem Details (RFC 9457). Each code links to its reference page.
- 400 —
callIdis empty - 404 — no such call in this workspace, or the call has no recording
- 416 — the
Rangeheader is outside the file - 429 — more than 10 requests in 10 s or 100 per minute for the workspace (see
Retry-After) - 500 — the stored file path could not be resolved
- 502 — the storage backend did not return the file size
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.
POST/api/calls/outbound
Place an outbound call from an assistant's phone number.
toNumber must be a US, Canadian or Australian number; any other country answers DESTINATION_NOT_ALLOWED (422) and no call is placed. The country comes from the number, not its prefix, so Puerto Rico, the other US territories and the Caribbean countries that share +1 are refused. Premium-rate (+1 900, +61 1900) and personal (+1 500) numbers are refused too. MISSING_CALL_VARIABLES (422) means a required variable in the assistant's outbound texts got no value (absent, or only spaces); details.missing lists the names, sorted, and no call was placed. The call uses the workspace owner's assistant minutes for the month. PLAN_MINUTES_EXHAUSTED means less than one minute of them is left, and no call was placed. SUBSCRIPTION_LIMIT_EXCEEDED here means every slot for calls at the same time is busy: retry after a call ends. RATE_LIMIT_EXCEEDED sends no Retry-After; wait up to 60 s. CALLBACK_NUMBER_REQUIRED (422) means the workspace has no callback number in its Business details. CALLEE_OPTED_OUT (409) means the number asked not to be called again on an earlier call from this workspace. CALLER_ID_INBOUND_ONLY (422) means the assistant's own number is an Australian 1800, 13 or 1300 number, which takes inbound calls only. None of them places a call. Calling hours are checked when the call is dialled, not here: a 202 call that check refuses (or a toll-free number) ends without ringing, with end reason OUTSIDE_CALLING_HOURS.
Auth: Bearer token · any workspace member · plan: Growth or higher (outboundCalls)
Request body
application/json
variables: at most 20 keys; each name starts with a letter and uses only letters, digits and _ (40 characters at most; names are case-sensitive); each value is 200 characters at most. Built-in names (assistant_name, business_name, callback_number, callback_line, appointment_date, appointment_link, booking_link, in any case) are refused. Send an Idempotency-Key header to make retries safe for 24 h. Without one, an identical body answers 409 while the first request is in flight, and returns the first call's id for 15 s after it is accepted.
| Field | Type | Notes |
|---|---|---|
| assistantId | string (required) | |
| toNumber | string — E.164 (required) | |
| variables | object of string → string | |
| clientReferenceId | string, 1–200 chars |
Responses
202 The call is being placed.
| Field | Type | Notes |
|---|---|---|
| callId | string |
200 A retry matched an earlier request; no second call was placed.
| Field | Type | Notes |
|---|---|---|
| callId | string | |
| idempotent | boolean |
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.
- 422 CALLBACK_NUMBER_REQUIRED — Outbound calls need a callback number. A workspace owner or admin must add one in Settings → Business details.
- 409 CALLEE_OPTED_OUT — This number asked not to be called again on an earlier call from this workspace, so the call was not placed.
- 422 CALLER_ID_INBOUND_ONLY — This assistant's phone number is an Australian 1800, 13 or 1300 number. These numbers take inbound calls only, so they cannot place a call. Attach a different number to call from.
- 422 DESTINATION_NOT_ALLOWED — Calls can only go to US, Canadian and Australian numbers, and not to premium-rate or personal numbers.
- 402 FREE_PLAN_RESTRICTED — This action is not available on the free plan.
- 400 INVALID_REQUEST_BODY — The request body is invalid.
- 400 INVALID_WORKSPACE_ID — The workspace is missing or invalid.
- 422 MISSING_CALL_VARIABLES — The request is missing variables that this assistant's outbound texts require.
- 403 OUTBOUND_APPROVAL_REQUIRED — Outbound calls from a number bought through dBel need our approval. A workspace owner or admin can ask for it in Settings → Outbound Calling. A number imported from your own Twilio account does not need it.
- 502 OUTBOUND_CALL_FAILED — Failed to place the outbound call. Please try again.
- 429 OUTBOUND_DAILY_LIMIT_REACHED — This workspace reached its limit of outbound calls from numbers bought through dBel in any 24 hours. Every accepted request counts.
- 403 OUTBOUND_NOT_ENABLED — Outbound calling isn't enabled for this workspace. A workspace owner or admin must enable it in settings.
- 404 PHONE_NOT_FOUND_OR_UNAUTHORIZED — Phone not found or you do not have access.
- 422 PHONE_NOT_VERIFIED — This phone number is not verified for outbound calling. Verify it before placing a call.
- 402 PLAN_FEATURE_RESTRICTED — This feature is not available on your current plan. Please upgrade.
- 402 PLAN_MINUTES_EXHAUSTED — Not enough assistant minutes are left this month to place a call.
- 429 RATE_LIMIT_EXCEEDED — Too many requests. Please wait.
- 409 RESOURCE_CONFLICT — The request conflicts with the current state of the target resource.
- 402 SUBSCRIPTION_LIMIT_EXCEEDED — You have reached the maximum limit for this action based on your subscription plan.
- 500 UNKNOWN_ERROR — An unexpected server error occurred. Please try again later.
- 422 VOICE_CAPABILITY_REQUIRED — This assistant's phone number does not support voice calls. Attach a voice-capable number first.
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.