tobbelin
01/18/2025, 10:09 PMVapi
01/18/2025, 10:11 PMVapi
01/18/2025, 10:11 PMtobbelin
01/18/2025, 10:39 PMVapi
01/18/2025, 10:40 PMhttps://api.vapi.com/calls/{call_id}
where {call_id}
is the identifier of the call you want to end.
3. **Headers**: You'll likely need to include authorization headers to authenticate your request.
4. **Body**: If the method is POST, you might need to include a JSON body with instructions to end the call, such as { "action": "end" }
.
Here's a conceptual example using a POST request:
http
POST /calls/{call_id} HTTP/1.1
Host: api.vapi.com
Authorization: Bearer your_api_token
Content-Type: application/json
{
"action": "end"
}
To send this request, you would use your server-side code in the language of your choice, such as Node.js, Python, Java, etc., using libraries like axios
, requests
, or HttpURLConnection
.
If you provide me with the specific details or if there's a particular server-side language you're using, I can give you a more tailored example.tobbelin
01/18/2025, 10:42 PMVapi
01/18/2025, 10:42 PMtobbelin
01/18/2025, 10:42 PMVapi
01/18/2025, 10:42 PMtobbelin
01/18/2025, 10:43 PMVapi
01/18/2025, 10:43 PMtobbelin
01/18/2025, 10:44 PMVapi
01/18/2025, 10:44 PMtobbelin
01/18/2025, 10:44 PMVapi
01/18/2025, 10:44 PMtobbelin
01/18/2025, 10:44 PMVapi
01/18/2025, 10:45 PMtobbelin
01/18/2025, 10:47 PMShubham Bajaj
01/20/2025, 5:11 AMcurl -X POST 'https://aws-us-west-2-production1-phone-call-websocket.vapi.ai/<call-id>/control'
-H 'content-type: application/json'
--data-raw '{
"type": "end-call",
}'