Chat

Sending Message

POST
/conversation/chat/v1/bots/{bot-ID}/messages

Use this API to send a Text message or media message (Image, Video, Audio and Document) to your end-user. You can send a card message using your cards created in Cequens Chat.

Authorization

bearerAuth
AuthorizationBearer <token>

JWT access token returned by Signing In (POST /auth/v1/tokens/).

In: header

Path Parameters

bot-ID*string

An identifier for your Bot provided from Cequens Chat

Request Body

application/json

type*string

A type of the message "text " | "audio" | "document" | "image" | "video" | "custom"

Default"text"
target*string

An identifier for the conversation between your Bot and end-user. It is included in the incoming message to your bot.

payload?

An object defines the text message to send

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/conversation/chat/v1/bots/string/messages" \  -H "Content-Type: application/json" \  -d '{    "type": "text",    "target": "2fc889cc6fa3bb32bcbb08a458ae113f",    "payload": {      "type": "text",      "text": "<your text message>"    }  }'
"{\n  \"message\": \"message sent successfully\"\n}"