Sends a message to chat

Each content part in the parts array is defined as follows:

PropertyTypeDescription
name*stringThe name of your part, usually the file name
type*stringThe MIME type for the part e.g. image/png
urlstring

The URL to the file data.

If this isn't specified then thedata property must be

datastring

For text based types the text string, or the base64 encoded data for file based types.

If this isn't specified then theurl property must be

sizestringThe size in bytes of the data for the message part
🚧

Choose URL or base64 data

You must choose to get your file data from either a URL or inline using base64 encoded data but not both!

Some common examples are given below:

"parts": [
    {
      "name": "Body text",
      "type": "text/plain",
      "data": "Bot's message to the customer"
    }
  ]
"parts": [
    {
      "name": "Picture",
      "type": "image/png",
      "url": "http://cdn.dnky.co/3rdparty/comapi/images/laptop.png"
    }
  ]
Path Params
string
required
^([a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12})|[a-f0-9]{32}$

The app space id

string
required

The id of the chat

Body Params

Detail of the message to send

Details of a message to post to the chat

from
object

Set of identifiers for the message sender.

parts
array of objects
required
parts*
alert
object

Details of the alert to be displayed on receipt of the message

string
enum

Indicates the direction of the message

Allowed:
boolean

Indicates if a message was an automated send - will be ommitted from analytics

Response

Language
Credentials
Bearer
JWT
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json