POST
/
v1
/
chat
/
messages
/
get-or-create
curl --request POST \
  --url https://api.botpress.cloud/v1/chat/messages/get-or-create \
  --header 'Content-Type: application/json' \
  --data '{
  "payload": {},
  "userId": "<string>",
  "conversationId": "<string>",
  "type": "<string>",
  "tags": {},
  "schedule": {
    "dateTime": "<string>",
    "delay": 123
  },
  "discriminateByTags": [
    "<string>"
  ]
}'
{
  "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

The body is of type object.

Response

200
application/json

Returns a Message object if a valid identifier was provided. Returns an Error otherwise

The response is of type object.