Calls
Create an outbound call
Initiate an outbound call using a configured phone number and agent. This endpoint queues the call and returns immediately with the call details.
Authorization<token>
API key in the format: Bearer YOUR_API_KEY
In: header
agentIdstring
The ID of the agent to use for this call
Format
uuidphoneNumberIdstring
The ID of the phone number to call from
Format
uuidtostring
The destination phone number in E.164 format (e.g., +14155551234)
contextVariables?
Optional variables to use in the agent's system prompt and greeting template
metadata?
Optional metadata to store with the call record
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://api.chorus-ai.co/v1/calls" \ -H "Content-Type: application/json" \ -d '{ "agentId": "bc309ecf-5f66-4057-93c5-6611cc9cb7b2", "phoneNumberId": "8e9ce3fb-4d22-4fe3-baa7-b7892dd942d7", "to": "string" }'{
"data": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"organizationId": "7bc05553-4b68-44e8-b7bc-37be63c6d9e9",
"agentId": "bc309ecf-5f66-4057-93c5-6611cc9cb7b2",
"phoneNumberId": "8e9ce3fb-4d22-4fe3-baa7-b7892dd942d7",
"callSid": "string",
"provider": "string",
"direction": "inbound",
"status": "string",
"customerNumber": "string",
"durationSeconds": 0,
"cost": 0,
"recordingUrl": "string",
"turnCount": 0,
"transcript": [
{
"role": "user",
"content": "string"
}
],
"analysis": {
"summary": "string",
"extractions": {}
},
"endedReason": "string",
"contextVariables": {},
"metadata": {},
"parentCallId": "429ac6c7-ec5a-4ab0-83cf-f52248dbb28d",
"transferType": "warm_briefing",
"transferStatus": "initiated",
"transferCalls": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"transferType": "warm_briefing",
"transferStatus": "initiated",
"durationSeconds": 0,
"customerNumber": "string",
"recordingUrl": "string",
"transcript": [
{
"role": "user",
"content": "string"
}
],
"startedAt": "2019-08-24T14:15:22Z",
"endedAt": "2019-08-24T14:15:22Z",
"cost": 0,
"status": "string"
}
],
"startedAt": "2019-08-24T14:15:22Z",
"endedAt": "2019-08-24T14:15:22Z",
"createdAt": "2019-08-24T14:15:22Z"
}
}{
"error": "string",
"details": [
{}
]
}{
"error": "Insufficient funds. Please top up your balance."
}{
"error": "string",
"details": [
{}
]
}{
"error": "Too many concurrent calls. Please try again later."
}{
"error": "string",
"details": [
{}
]
}Last updated on