Queue a call to a phone number using an existing TaskVocal agent.
Request fields
to_numberstring · required
Destination phone number in E.164 format.
agent_idstring · required
ID of the configured TaskVocal assistant.
scheduled_atISO 8601 · optional
Timezone-aware future timestamp for a one-time scheduled call.
lead_namestring · optional
Contact name made available to the agent.
call_reasonstring · optional
Context fed into the system prompt.
variablesobject · optional
Additional context echoed back on webhooks.
tts_voice_id / voice_genderstring · optional
Per-call voice overrides.
Idempotency-Keyheader · recommended
Reuse this unique key on retries to prevent duplicate calls.
curl --request POST 'http://localhost:8000/v1/calls' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: order-123-call' \
--data '{ "to_number": "+919876543210", "agent_id": "ASSISTANT_ID", "lead_name": "Raj", "call_reason": "User has remaining EMI of 6 months", "variables": { "case_id": "CRM-123" }}'Successful response
{
"call_sid": "CALL_SID",
"status": "queued"
}The call is queued; completion is asynchronous.
Idempotency
Idempotency-Key: <unique-request-id>
Reuse the same key when retrying a request to avoid duplicate call dispatch.
