Calls API
Trigger outbound calls and retrieve historical call logs and transcripts.
Trigger Outbound Call
POST
/calls/outboundDescription
Initiates an outbound phone call from a specific AI agent to a target phone number.
Permissions
Requires Admin or Manager role.
Request Body
{
"agent_id": "agt_112233",
"recipient_number": "+1234567890",
"metadata": {
"crm_lead_id": "lead_9988",
"first_name": "Jane"
}
}
Note: The metadata object is passed to the agent's prompt, allowing it to personalize the greeting (e.g., "Hi Jane...").
Response
{
"call_id": "call_554433",
"status": "queued",
"message": "Call has been queued for dialing."
}
Get Call Details
GET
/calls/{call_id}Description
Retrieves the full details, transcript, and recording URL of a completed call.
Permissions
Requires any role (Admin, Manager, or Viewer).
Response
{
"call_id": "call_554433",
"agent_id": "agt_112233",
"status": "completed",
"duration_seconds": 125,
"disposition": "Lead Qualified",
"recording_url": "https://storage.kantaswara.com/audio/call_554433.mp3",
"transcript": [
{"speaker": "agent", "text": "Hi Jane, this is KantaSwara calling..."},
{"speaker": "user", "text": "Yes, I am interested..."}
]
}