Send a message as an agent
Send a message as an agent to an existing visitor’s conversation. You must provide either agentId alone, or all three of agentEmail + agentName + receivedFrom to identify the agent.
Authentication
The API key should be passed in the request headers as api-key for authentication.
Request
Agent’s email address. 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.
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.
‘true if the message was sent via JavaScript API.’
The type of message content (e.g. for integration-specific message types).
‘true if the message is a forwarded message.’
visitor’s ID