Calls
Outbound calls
Place an outbound call with a single API request. Vaakyo queues the call, dials when concurrency slots and calling hours permit, and records the full conversation.
Place a call
POST /api/v1/agents/{agent_id}/call requires the calls.place permission.
curl -X POST https://api.vaakyo.com/api/v1/agents/$AGENT_ID/call \
-H "Authorization: Bearer $VAAKYO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"to": "+919812345678",
"from_number": "+918035001234",
"user_data": {"customer_name": "Rohan", "slot": "11 am", "order_id": "ORD-5531"},
"ignore_call_window": false
}'
201 Created:
{"call_id": "00b1d622a8f04f4f8f3a3c2d9e5b7a11", "status": "queued", "position": 1}
position indicates the call’s placement in your workspace queue (1 means it is next in line).
Request body
| Field | Type | Default | Description |
|---|---|---|---|
to | string | required | Destination number in E.164 format. |
from_number | string | "" | Caller ID: one of your workspace’s numbers or a shared number. Defaults to the agent’s number, else your only number, else a shared one (Caller ID). |
user_data | object | {} | Runtime key-value context for agent {variables} and tool calls. |
ignore_call_window | boolean | false | Whether to bypass configured calling hours. |
Caller ID
Calls are dispatched from from_number if specified, or from the agent’s phone_number. When neither is set, Vaakyo picks one: your workspace’s number if it has exactly one, otherwise (when it has none) a shared number. A workspace with several numbers must choose, and the 400 lists them; with none and no shared number the call is refused with 400 no caller number. The number must be assigned to your workspace, or be a shared number ("shared": true in GET /api/v1/numbers); otherwise the call is refused with 422 that number is not on this workspace.
Before your business is verified
Until your business details are verified, a workspace can call only its members’ own phone numbers: the mobile number given at sign-up, or set under Account → Your phone (a number belongs to one account). A call to any other number returns 403 with "code": "kyc_required". Campaigns need a verified business. See Workspace status.
User data
user_data attaches contextual parameters to the call:
- Variables: Keys populate
{variable}placeholders in the welcome message and prompt. - Tools: Sent to your custom tools in the
_call.user_datapayload. See Tools. - Analytics & Webhooks: Preserved in call records and webhook notifications.
Lifecycle progression
- The call enters the queue as
queuedand emits acall.queuedevent. - Vaakyo dials queued calls oldest first, per workspace, as slots free up.
- The call transitions to
ringing(emittingcall.dequeuedandcall.placed). - When answered, status becomes
in-progressand conversation begins. - If the recipient does not answer, the call concludes as
no-answer,busy, orfailed.
Calls never run longer than the agent’s configured max_duration_seconds.
Cancel or hang up
POST /api/v1/calls/{id}/hangup cancels queued calls or terminates active calls:
curl -X POST https://api.vaakyo.com/api/v1/calls/$CALL_ID/hangup -H "Authorization: Bearer $VAAKYO_API_KEY"
{"ended": true}