Skip to main content
POST
/
v1
/
sessions
/
{id}
/
end
curl -X POST https://api.kallglot.com/v1/sessions/sess_01HXYZ123456789/end \
  -H "Authorization: Bearer sk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "reason": "completed"
  }'
{
  "id": "sess_01HXYZ123456789",
  "object": "session",
  "status": "ended",
  "mode": "bidirectional_translation",
  "source_language": "de",
  "target_language": "en",
  "provider": {
    "type": "twilio",
    "phone_number": "+14155551234",
    "status": "disconnected",
    "call_sid": "CA1234567890abcdef"
  },
  "duration": 245.3,
  "recording": {
    "enabled": true,
    "id": "rec_01HABC987654321",
    "duration": 245.3
  },
  "transcript": {
    "available": true,
    "word_count": 512
  },
  "metadata": {
    "customer_id": "cust_123"
  },
  "created_at": "2026-03-26T11:00:00Z",
  "started_at": "2026-03-26T11:00:15Z",
  "ended_at": "2026-03-26T11:04:20Z",
  "end_reason": "completed"
}
End an active session. This will disconnect any active calls, stop recording, and finalize the transcript. Billing stops when the session ends.

Path Parameters

id
string
required
The unique session identifier (e.g., sess_01HXYZ123456789).

Request Body

reason
string
Optional reason for ending the session. Stored in the session metadata.
  • completed - Conversation completed normally (default)
  • customer_hangup - Customer ended the call
  • agent_hangup - Agent ended the call
  • error - Session ended due to an error
  • timeout - Session timed out

Response

Returns the updated session object with status: "ended".
id
string
Unique session identifier.
object
string
Always session.
status
string
Will be ended after successful request.
duration
number
Final session duration in seconds.
recording
object
Recording details including the recording ID.
ended_at
string
Session end timestamp (ISO 8601).
end_reason
string
The reason the session ended.
curl -X POST https://api.kallglot.com/v1/sessions/sess_01HXYZ123456789/end \
  -H "Authorization: Bearer sk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "reason": "completed"
  }'
{
  "id": "sess_01HXYZ123456789",
  "object": "session",
  "status": "ended",
  "mode": "bidirectional_translation",
  "source_language": "de",
  "target_language": "en",
  "provider": {
    "type": "twilio",
    "phone_number": "+14155551234",
    "status": "disconnected",
    "call_sid": "CA1234567890abcdef"
  },
  "duration": 245.3,
  "recording": {
    "enabled": true,
    "id": "rec_01HABC987654321",
    "duration": 245.3
  },
  "transcript": {
    "available": true,
    "word_count": 512
  },
  "metadata": {
    "customer_id": "cust_123"
  },
  "created_at": "2026-03-26T11:00:00Z",
  "started_at": "2026-03-26T11:00:15Z",
  "ended_at": "2026-03-26T11:04:20Z",
  "end_reason": "completed"
}

Notes

Ending a session is idempotent. If the session has already ended, the request will return the existing session state with a 200 status code.
Make sure to end sessions when conversations complete to stop billing. Sessions that remain active without audio activity for more than 30 minutes are automatically ended.