Server events
All messages sent to your Server URL are POST
requests with this body shape:
Common metadata included on most events:
phoneNumber
,timestamp
artifact
(recording, transcript, messages, etc.)assistant
,customer
,call
,chat
Most events are informational and do not require a response. Responses are only expected for these types sent to your Server URL:
- “assistant-request”
- “tool-calls”
- “transfer-destination-request”
- “knowledge-base-request”
Note: Some specialized messages like “voice-request” and “call.endpointing.request” are sent to their dedicated servers if configured (e.g. assistant.voice.server.url
, assistant.startSpeakingPlan.smartEndpointingPlan.server.url
).
Function Calling (Tools)
Vapi supports OpenAI-style tool/function calling. Assistants can ping your server to perform actions.
Example assistant configuration (excerpt):
When tools are triggered, your Server URL receives a tool-calls
message:
Respond with results for each tool call:
Optionally include a message to speak to the user while or after running the tool.
If a tool does not need a response immediately, you can design it to be asynchronous.
Retrieving Assistants
For inbound phone calls, you can specify the assistant dynamically. If a PhoneNumber doesn’t have an assistantId
, Vapi may request one from your server:
Respond with either an existing assistant ID, a transient assistant, or transfer destination:
Or return an error message to be spoken to the caller:
Status Updates
scheduled
: Call scheduled.queued
: Call queued.ringing
: The call is ringing.in-progress
: The call has started.forwarding
: The call is about to be forwarded.ended
: The call has ended.
End of Call Report
Hang Notifications
Use this to surface delays or notify your team.
Conversation Updates
Sent when an update is committed to the conversation history.
Transcript
Partial and final transcripts from the transcriber.
For final-only events, you may receive type: "transcript[transcriptType=\"final\"]"
.
Speech Update
Model Output
Tokens or tool-call outputs as the model generates.
Transfer Destination Request
Requested when the model wants to transfer but the destination is not yet known.
Respond with a destination and optionally a message:
Transfer Update
Fires whenever a transfer occurs.
User Interrupted
Language Change Detected
Sent when the transcriber switches based on detected language.
Phone Call Control (Advanced)
When requested in assistant.serverMessages
, hangup and forwarding are delegated to your server.
Knowledge Base Request (Custom)
If using assistant.knowledgeBase.provider = "custom-knowledge-base"
.
Respond with documents (and optionally a custom message to speak):
Voice Input (Custom Voice Providers)
Voice Request (Custom Voice Server)
Sent to assistant.voice.server.url
. Respond with raw 1-channel 16-bit PCM audio at the requested sample rate (not JSON).
Call Endpointing Request (Custom Endpointing Server)
Sent to assistant.startSpeakingPlan.smartEndpointingPlan.server.url
.
Respond with the timeout before considering the user’s speech finished:
Chat Events
chat.created
: Sent when a new chat is created.chat.deleted
: Sent when a chat is deleted.
Session Events
session.created
: Sent when a session is created.session.updated
: Sent when a session is updated.session.deleted
: Sent when a session is deleted.