jooles
09/04/2024, 8:57 AMVapi
09/04/2024, 8:58 AM.send()
function is exactly what you need to use to send intermediate messages during a call. When a call is established, you can send a message using this function with the type set to "add-message". Here's how you can do it:
javascript
vapi.send({
type: "add-message",
message: {
role: "system",
content: "Your custom message here",
},
});
Replace "Your custom message here" with the message you want to add as soon as the call is established. If you need any further assistance or have additional questions, feel free to ask!Vapi
09/04/2024, 8:58 AMVapi
09/04/2024, 8:59 AMjooles
09/04/2024, 9:00 AMjooles
09/04/2024, 9:06 AMjooles
09/04/2024, 2:41 PMDNAngelX
05/27/2025, 9:00 PMVapi Support Bot
05/27/2025, 9:02 PM.send()
method as shown below:
javascript
vapi.send({
type: "add-message",
message: {
role: "system", // or "user", "assistant", etc.
content: "Your background message here",
},
});
This will silently add a message to the chat history during an active call.
For REST API usage, there is currently no official documentation on sending background messages directly via HTTP requests.
[See documentation](https://docs.vapi.ai/assistants/background-messages)
Sources:
- [Background messages documentation](https://docs.vapi.ai/assistants/background-messages)
- [Vapi Web SDK documentation](https://docs.vapi.ai/sdk/web)Kyle Brunker
05/28/2025, 6:29 AMDNAngelX
05/28/2025, 11:34 AMKyle Brunker
05/29/2025, 4:32 PM