POST
/
v1
/
chat
/
messages
curl --request POST \
  --url https://api.botpress.cloud/v1/chat/messages \
  --header 'Content-Type: application/json' \
  --data '{
  "payload": {},
  "userId": "<string>",
  "conversationId": "<string>",
  "type": "<string>",
  "tags": {},
  "schedule": {
    "dateTime": "<string>",
    "delay": 123
  }
}'
{
  "message": {
    "id": "<string>",
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z",
    "type": "<string>",
    "payload": {},
    "direction": "incoming",
    "userId": "<string>",
    "conversationId": "<string>",
    "tags": {}
  }
}

Body

application/json
Message data
payload
object
required

Payload is the content type of the message. Accepted payload options: Text, Image, Choice, Dropdown, Card, Carousel, File, Audio, Video, Location

userId
string
required

ID of the User

Required string length: 28 - 36
conversationId
string
required

ID of the Conversation

Required string length: 28 - 36
type
string
required

Type of the Message represents the resource type that the message is related to

Maximum length: 200
tags
object
required

Set of Tags that you can attach to a Message. The set of Tags available on a Message is restricted by the list of Tags defined previously by the Bot. Individual keys can be unset by posting an empty value to them.

schedule
object

Schedule the Message to be sent at a specific time. Either dateTime or delay must be provided.

Response

201
application/json
Returns a [Message](#schema_message) object if creation succeeds.
message
object
required

The Message object represents a message in a Conversation for a specific User.