Skip to main content
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" }'
{
  "success": true,
  "data": {
    "id": "call-uuid-123",
    "status": "completed",
    "ended_at": "2024-01-15T11:35:42Z",
    "ended_reason": "ended_by_api"
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.talkover.ai/llms.txt

Use this file to discover all available pages before exploring further.

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

agent_id
string
required
Agent UUID owning the call.

Request Headers

Authorization
string
required
Bearer token. Format: Bearer talq_your_environment_token_here
Content-Type
string
required
Must be set to application/json

Request Body

call_sid
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" }'

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 completed shortly after this endpoint returns.
  • The ended_reason will be ended_by_api to differentiate from natural hangups.
  • Webhook events event_phone_call_ended will fire normally.