Send a message as an agent
Authentication
The API key should be passed in the request headers as api-key for authentication.
Request
visitor’s ID received from a webhook or generated by you to bind existing user account to Conversations
agent email. When sending messages from a standalone system, it’s hard to maintain a 1-to-1 relationship between the users of both systems. In this case, an agent can be specified by their email address.
agent ID. It can be found on agent’s page or received from a webhook. Alternatively, you can use agentEmail + agentName + receivedFrom instead (all 3 fields required).
Response
ID of the agent on whose behalf the message was sent (only in messages sent by an agent).
Agent’s name as displayed to the visitor. Only in the messages sent by an agent.
An array containing details of the blind carbon copy (BCC) recipients (applicable only to messages in email threads).
An array containing details of the carbon copy (CC) recipients (applicable only to messages in email threads).
An object containing details about the email sender (applicable only to messages in email threads).
true for automated messages generated by an AI bot.
true for missed and offline messages.
true for unread agent’s messages in finished chats.
true for pushed messages
true for automatic messages from “Targeted chats & triggers” and API (https://developers.brevo.com/docs/javascript-api-reference#sendautomessage)
Unescaped HTML content of the message (may include unsafe HTML).
In two-way integrations, messages sent via REST API can be marked with receivedFrom property and then filtered out when received in a webhook to avoid infinite loop.
An object containing details of the reply-to email address (applicable only to messages in email threads).
The subject line of the email message (only for messages sent to email threads).
An array containing details of the recipients (applicable only to messages in email threads).
"agent" for agents’ messages, "visitor" for visitors’ messages.
visitor’s ID