Place an outbound call
POST
https://server.heyrik.com/api/v1/calls/dispatchHeaders
AuthorizationstringRequiredUse Bearer $HEYRIK_API_KEY with an account-scoped API key. Keep the key on your server.
Parameters 4
Fields documented for this operation. See the request example for placement and structure.
phone_number_idstringRequiredWhich of YOUR numbers to call from (GET /phone-numbers).
tostringRequiredDestination in E.164, e.g. +919876543210.
agent_idstringAgent to speak. Defaults to the number's assigned agent.
variablesobjectMerged into the prompt — {{name}}, {{order_id}}…
Response
Explore the example values. This is not a complete response schema.
dataobjectExplore 2 properties
call_idstringExample "call_1dd990f7"
statusstringExample "dialing"
POST/calls/dispatch
cURL
curl -X POST https://server.heyrik.com/api/v1/calls/dispatch \
-H "Authorization: Bearer $HEYRIK_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"phone_number_id": "sip_45723ca5",
"to": "+919876543210",
"agent_id": "agc_9f2a1c30",
"variables": { "name": "Ravi", "order_id": "AC-8842" }
}'Response example
JSON
{ "data": { "call_id": "call_1dd990f7", "status": "dialing" } }Illustrative examples · No live request is sent
