v1

latestSwagger 2.0MIT2026-07-17233380637.0 KB
Conversations

Send a message as an agent

post/conversations/messages

Request body

visitorIdstring required

visitor’s ID received <a href="https://developers.brevo.com/docs/conversations-webhooks">from a webhook</a> or generated by you to <a href="https://developers.brevo.com/docs/customize-the-widget#identifying-existing-users">bind existing user account to Conversations</a>

textstring required

message text

agentIdstring

agent ID. It can be found on agent’s page or received <a href="https://developers.brevo.com/docs/conversations-webhooks">from a webhook</a>. Alternatively, you can use agentEmail + agentName + receivedFrom instead (all 3 fields required).

receivedFromstring

mark your messages to distinguish messages created by you from the others.

agentEmailstring email

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.

agentNamestring

agent name

Example request

{
  "visitorId": "kZMvWhf8npAu3H6qd57w2Hv6nh6rnxvg",
  "text": "Hello! How can I help you?",
  "agentId": "d9nKoegKSjmCtyK78",
  "receivedFrom": "SuperAwesomeHelpdesk",
  "agentEmail": "liz@getwear.com",
  "agentName": "Liz"
}

Response

Newly created message is returned as a response

idstring

Message ID. It can be used for further manipulations with the message.

type'agent' | 'visitor'

"agent" for agents’ messages, "visitor" for visitors’ messages.

textstring

Message text or name of the attached file

visitorIdstring

visitor’s ID

agentIdstring

ID of the agent on whose behalf the message was sent (only in messages sent by an agent).

agentNamestring

Agent’s name as displayed to the visitor. Only in the messages sent by an agent.

createdAtinteger

Timestamp in milliseconds.

isPushedboolean

true for pushed messages

receivedFromstring

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.

Example response

{
  "createdAt": 1470222622433,
  "isPushed": true,
  "agentId": "d9nKoegKSjmCtyK78",
  "file": {
    "isImage": true,
    "filename": "conversations.png",
    "size": 15538,
    "imageInfo": {
      "previewUrl": "https://ucarecdn.com/03cd56cd-1de9-4f65-996d-08afdf27fa1b/-/preview/800x800/-/quality/lighter/",
      "width": 1129,
      "height": 525
    },
    "url": "https://ucarecdn.com/cee5c10c-8302-45c1-b1fb-43860ca941a9/"
  },
  "receivedFrom": "SuperAwesomeHelpdesk",
  "agentName": "Liz",
  "id": "eYBEm3gq3zc5ayE2g",
  "text": "Good morning! How can I help you?",
  "type": "agent",
  "visitorId": "kZMvWhf8npAu3H6qd57w2Hv6nh6rnxvg"
}