How can I do end call with the create call functio...
# support
a
title
v
To end a call with a custom message in Vapi, you can use the control URL approach:
Copy code
bash
# First send your custom end message
curl -X POST "https://aws-us-west-2-production1-phone-call-websocket.vapi.ai/YOUR_CALL_ID/control" \
-H 'content-type: application/json' \
--data-raw '{
  "type": "add-message",
  "message": {
    "role": "assistant",
    "content": "Thank you for your time. I will end this call now. Goodbye!"
  },
  "triggerResponseEnabled": true
}'

# Then end the call after message is spoken
curl -X POST "https://aws-us-west-2-production1-phone-call-websocket.vapi.ai/YOUR_CALL_ID/control" \
-H 'content-type: application/json' \
--data-raw '{"type": "end-call"}'
Source: - [Discord message about ending calls](https://discord.com/channels/1211482211119796234/1296705973737488505)
c
Hey, you can use the End Call tool and trigger it using your promptings. Also, set the end call phrase this way - when the end call tool is triggered, right before ending the call, the end call phrase will be voiced out. You can set the end call phrases from VAPI dashboard inside your assistant.
6 Views