Calls
Create outbound calls and read their state through REST and MCP.
Opt-in feature
Calls V1 is implemented in the service source and disabled by default. Deployment and live telephony have not been verified. An environment must explicitly enable Calls and configure its worker, service authentication and storage policies before these operations can be used there.
Calls V1 lets a programmatic client or AI agent request one outbound call, optionally schedule it, and retrieve its state using the returned ID. REST and MCP use the same service, task record, permissions and idempotency rules.
Operations and permissions
| Operation | Scope | Purpose |
|---|---|---|
REST POST /calls | calls:write | Create one immediate or scheduled call |
REST GET /calls/{id} | calls:read | Read the state of the same call |
MCP create-call | calls:write | Create a call using the shared contract |
MCP get-call | calls:read | Read a call by its returned ID |
The authenticated key determines the tenant. A request cannot choose another tenant or use its employee or conversation. Existing keys do not acquire Calls permissions automatically; these scopes require an explicit grant. Calls reuse existing voice employee and campaign configuration and require no Admin Panel changes.
Create a call
POST /calls
The operation accepts JSON and returns 202 Accepted after the call
task has been saved. Acceptance does not mean that dialing has started or that
the destination has answered.
Illustrative request headers:
POST /calls
Authorization: Bearer <accessKey>
Idempotency-Key: <clientGeneratedKey>
Content-Type: application/jsonIllustrative request body:
{
"employeeId": "<employeeId>",
"phoneNumber": "+16505550123",
"context": {
"instruction": "Introduce yourself and ask whether this is a convenient time to confirm tomorrow's appointment."
},
"scheduledAt": "2026-11-12T10:00:00+00:00"
}Angle-bracket values are placeholders. The phone number is fictional.
| Field | Validation |
|---|---|
employeeId | Required 24-hex ID of an active voice employee belonging to the authenticated tenant; normalized to lowercase |
phoneNumber | Required E.164 string matching ^\+[1-9][0-9]{1,14}$; local numbers, spaces and inferred country codes are not accepted |
context | Required object; V1 permits only instruction |
context.instruction | Required string containing non-whitespace text describing the purpose of this call; at most 10,000 characters, preserving whitespace |
scheduledAt | Optional RFC 3339 timestamp with Z or an explicit UTC offset; null and a local datetime without a timezone are rejected |
Request objects are strict: unknown fields and type coercion are rejected.
idempotencyKey is an MCP argument, not a REST body field. The public contract
does not accept a tenant ID, conversation ID, callback URL, queue, agent name,
room, trunk or service credentials.
Omitting scheduledAt requests the next available execution opportunity. A
specified timestamp is normalized to UTC, and execution must not start before
it. The requested time does not guarantee an exact dialing or connection time.
A new request with a past timestamp is rejected. Accepted replays still work after
that time. Maximum permitted start delay is an explicit environment policy; a
missed deadline fails the task without placing a late call.
Illustrative 202 body, with Location: /calls/<callTaskId>:
{
"id": "<callTaskId>",
"status": "scheduled",
"endReason": null,
"conversationId": null
}An immediate request starts in queued instead. The returned id is the stable
call-task ID; clients should treat it as opaque. One task represents one dialing
attempt. A deliberately requested new call requires a new key and returns a
new task ID.
Read a call
GET /calls/{id}
The response is 200 OK with exactly four fields. For example, a
completed attempt without an answer would return:
{
"id": "<callTaskId>",
"status": "completed",
"endReason": "no_answer",
"conversationId": "<conversationId>"
}| Field | Meaning |
|---|---|
id | The same call-task ID returned by creation |
status | One of the states below |
endReason | A completion reason, or null until the outcome is established |
conversationId | A linked conversation ID, or null before that link is saved |
This response does not repeat the original employee, number, context or schedule. Clients may retain those request details themselves.
For a scheduled task, conversationId is initially null. At execution time,
the platform ensures the conversation exists and persists its link before
dispatch and SIP dialing. During early starting, the link can still be
pending. Once returned, the conversation ID stays the same, including after a
later technical failure, busy response or unanswered attempt. Its presence does
not prove that a conversation with a person took place.
Call results contain no summary, transcript or audio recording. calls:read
grants access to call state, not transcript text. Reading conversation history
requires the independent authorization documented in
Get conversation history.
Web-chat takeover and operator-reply operations are not voice-call controls.
States and completion reasons
status | Meaning |
|---|---|
scheduled | A future execution time has been saved |
queued | The task is ready for execution |
starting | Execution is preparing the call and its conversation link |
dialing | The runtime has begun the SIP dialing request |
in_progress | An answer from the SIP participant has been confirmed |
completed | A definitive normal attempt outcome has been established, including busy, no answer or a declined call |
failed | A technical configuration, launch or runtime failure has been confirmed |
reconciling | The outcome is uncertain and is being checked without placing another call |
The endReason values are:
endReason | Meaning |
|---|---|
ended | An answered call ended normally |
busy | A busy outcome was confirmed |
no_answer | An unanswered attempt was confirmed |
declined | Telephony confirmed that the call was declined; this does not mean a person rejected the offer during a conversation |
technical_error | A technical failure was confirmed |
Before a definitive outcome, endReason is null. completed describes the
attempt, not success at the business objective in context.instruction.
in_progress does not distinguish a human answer from voicemail; automatic
human/voicemail classification is not part of this contract.
A transport timeout or missing completion notification does not establish
no_answer or justify another dialing attempt. Such cases enter reconciling.
The read-only reconciler checks the existing attempt. Without reliable evidence
of a final outcome, the task remains reconciling and requires operational review.
Absence of a room or participant alone does not establish a final outcome.
Request idempotency
Idempotency is mandatory. The client generates Idempotency-Key for REST or the
equivalent idempotencyKey argument for MCP. Keys contain 1–200 printable ASCII
characters without spaces; a UUID is suitable.
- Generate and retain one key per logical call. Technical retries reuse it.
- Both transports share the namespace
(tenant, create-call operation, key). Repeating a REST request through MCP, or the reverse, must return the same ID when its normalized call fields match. - The same key with different call fields produces
idempotency_conflict(409in REST), rather than creating another task. - If the response is lost or creation is still in flight, repeat only the same key and the same call fields. Do not automatically generate a new key.
- Equivalent timestamp offsets normalize to the same UTC instant. An omitted
scheduledAtstays omitted for matching; it is not recalculated as a new server timestamp on every retry. - A replay returns the accepted task even if its scheduled time has since passed or its employee has since become inactive. Execution still checks whether the call is permitted.
Idempotency matching applies after authentication and scope checks, before mutable employee validation. Nonterminal records and keys have no expiry. Terminal records and their keys expire together after the environment's configured retention. After expiry the key can create a new task; replay protection is not unlimited.
MCP tools
For transport details, see Call tools.
create-call takes the same strict call fields as REST plus the explicit
idempotencyKey argument:
{
"name": "create-call",
"arguments": {
"employeeId": "<employeeId>",
"phoneNumber": "+16505550123",
"context": {
"instruction": "Introduce yourself and confirm tomorrow's appointment."
},
"idempotencyKey": "<clientGeneratedKey>"
}
}scheduledAt is also optional for this tool. get-call accepts only the
returned ID as callId:
{
"name": "get-call",
"arguments": {
"callId": "<callTaskId>"
}
}Decoded successful results contain the same four fields as REST. The MCP result
wrapper carries that JSON in a text content block. Expected tool failures
use isError: true, with the normalized error JSON below in the text block.
Protocol or transport failures are separate from a saved call's state.
Errors
The error body is {"error":{"code":"<code>","message":"<message>"}}.
The HTTP statuses apply to REST; MCP uses the same error codes in tool failures.
| HTTP | Code | Meaning |
|---|---|---|
| 400 | validation_error | Invalid fields or a missing required idempotency key |
| 401 | unauthorized | Valid authentication is absent |
| 403 | insufficient_scope | The key lacks the required Calls scope |
| 404 | not_found | The resource is absent or does not belong to the tenant |
| 409 | idempotency_conflict | The key was used with different normalized call fields |
| 503 | auth_unavailable | Authorization could not be checked before acceptance |
| 503 | calls_disabled | Calls are disabled in this environment |
| 503 | temporarily_unavailable | A required dependency could not be used; retry the same key and fields |
| 503 | outcome_unknown | Creation may have been saved; retry the same key and fields to recover its ID |
After confirmed acceptance, launch failures are reflected in the call state. An unknown save outcome must not be interpreted as proof that no task exists: the client repeats the original key and fields.
Programmatic queues and polling
Clients can build a logical queue by creating individual calls with separate keys, saving their IDs, and reading each state. The platform owns the actual execution queues, scheduling and concurrency; clients do not choose internal queue names or create a batch resource.
Poll the same ID using a client-selected bounded polling strategy. No default polling interval is specified. A polling error does not change the call outcome, and a timeout does not authorize automatic redialing. List, batch, cancel, reschedule and redial operations are outside this V1 contract.
Policies still to be finalized
- Instruction size limits, scheduling horizon, past-date behavior and lateness.
- Result and idempotency-key retention, including behavior after expiry.
- Final error/state details and the policy for unresolved
reconcilingoutcomes. - Availability of runtime configuration and explicit grants for the new scopes.
These decisions must be reflected in the published contract before Calls V1 becomes available.