Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
{ "detail": [ { "loc": [ "<string>" ], "msg": "<string>", "type": "<string>" } ] }
Terminate an ongoing call.
This will hang up the call via the telephony provider (Twilio, Telnyx, or SIP). Only works for calls that are currently in ‘ongoing’ status.
call_sid
curl -X POST "https://api.burki.dev/api/v1/calls/CAxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/terminate" \ -H "Authorization: Bearer YOUR_API_KEY"
{ "success": true, "message": "Call terminated successfully via twilio" }
success
message
{ "detail": "Cannot terminate call - current status is 'completed'" }
{ "detail": "Call not found or you don't have permission to terminate it" }
{ "detail": "Failed to terminate call via twilio" }
import requests def terminate_call(call_sid): response = requests.post( f"https://api.burki.dev/api/v1/calls/{call_sid}/terminate", headers={"Authorization": "Bearer YOUR_API_KEY"} ) if response.status_code == 200: print(f"Call {call_sid} terminated successfully") return response.json() else: print(f"Failed to terminate: {response.json()['detail']}") return None
const axios = require('axios'); async function terminateCall(callSid) { try { const response = await axios.post( `https://api.burki.dev/api/v1/calls/${callSid}/terminate`, {}, { headers: { 'Authorization': 'Bearer YOUR_API_KEY' } } ); console.log('Call terminated:', response.data); return response.data; } catch (error) { console.error('Failed to terminate:', error.response.data.detail); throw error; } }
import requests def terminate_all_active_calls(): # First, get all ongoing calls calls_response = requests.get( "https://api.burki.dev/api/v1/calls", headers={"Authorization": "Bearer YOUR_API_KEY"}, params={"status": "ongoing"} ) ongoing_calls = calls_response.json()["items"] # Terminate each one for call in ongoing_calls: terminate_call(call["call_sid"]) print(f"Terminated call {call['call_sid']}")
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Bearer <token>
<token>
Successful Response