curl -X POST "https://app.talkover.ai/api/v1/agents/agent-uuid/end-call" \
-H "Authorization: Bearer talq_your_environment_token_here" \
-H "Content-Type: application/json" \
-d '{ "call_sid": "call-uuid-123" }'
await fetch('https://app.talkover.ai/api/v1/agents/agent-uuid/end-call', {
method: 'POST',
headers: {
'Authorization': 'Bearer talq_your_environment_token_here',
'Content-Type': 'application/json'
},
body: JSON.stringify({ call_sid: 'call-uuid-123' })
});
{
"success": true,
"data": {
"id": "call-uuid-123",
"status": "completed",
"ended_at": "2024-01-15T11:35:42Z",
"ended_reason": "ended_by_api"
}
}
Make a Call
End Call
Hang up an active call placed by an agent
POST
/
api
/
v1
/
agents
/
{agent_id}
/
end-call
curl -X POST "https://app.talkover.ai/api/v1/agents/agent-uuid/end-call" \
-H "Authorization: Bearer talq_your_environment_token_here" \
-H "Content-Type: application/json" \
-d '{ "call_sid": "call-uuid-123" }'
await fetch('https://app.talkover.ai/api/v1/agents/agent-uuid/end-call', {
method: 'POST',
headers: {
'Authorization': 'Bearer talq_your_environment_token_here',
'Content-Type': 'application/json'
},
body: JSON.stringify({ call_sid: 'call-uuid-123' })
});
{
"success": true,
"data": {
"id": "call-uuid-123",
"status": "completed",
"ended_at": "2024-01-15T11:35:42Z",
"ended_reason": "ended_by_api"
}
}
End Call
Hang up an active call placed by a specific agent. Use this for emergency stops, user-requested cancellations, or to enforce custom timeout logic from your application.Endpoint
POST /api/v1/agents/{agent_id}/end-call
Path parameters
string
required
Agent UUID owning the call.
Request headers
string
required
Bearer token. Format:
Bearer talq_your_environment_token_herestring
required
Must be set to
application/jsonRequest body
string
required
Identifier of the call to hang up. Use the
id returned by Make a Call.Examples
curl -X POST "https://app.talkover.ai/api/v1/agents/agent-uuid/end-call" \
-H "Authorization: Bearer talq_your_environment_token_here" \
-H "Content-Type: application/json" \
-d '{ "call_sid": "call-uuid-123" }'
await fetch('https://app.talkover.ai/api/v1/agents/agent-uuid/end-call', {
method: 'POST',
headers: {
'Authorization': 'Bearer talq_your_environment_token_here',
'Content-Type': 'application/json'
},
body: JSON.stringify({ call_sid: 'call-uuid-123' })
});
Response
{
"success": true,
"data": {
"id": "call-uuid-123",
"status": "completed",
"ended_at": "2024-01-15T11:35:42Z",
"ended_reason": "ended_by_api"
}
}
Error responses
404 — Call Not Found
{
"success": false,
"message": "Call not found for this agent"
}
409 — Call Already Ended
{
"success": false,
"message": "Call is not active",
"code": "CALL_NOT_ACTIVE"
}
Notes
- Hangup propagation is asynchronous. The call status moves to
completedshortly after this endpoint returns. - The
ended_reasonwill beended_by_apito differentiate from natural hangups. - Webhook events
event_phone_call_endedwill fire normally.
Was this page helpful?