Server side background messages
# support
d
Is it possible to send a background message to update the conversation history from a server? Or is that only possible from a client?
v
Based on the documentation, background messages are added to the chat history using the
vapi.send()
function, typically in a client-side context:
Copy code
js
vapi.send({
  type: "add-message",
  message: {
    role: "system",
    content: "The user has pressed the button, say peanuts",
  },
});
However, the documentation does not specify if this can be done from a server. For server-side support, you may need to contact Vapi support or check for a dedicated server API endpoint for background messages. (Source: [Vapi background messages documentation](https://docs.vapi.ai/assistants/background-messages))