post https://api.comapi.com/apispaces//chats//messages
Each content part in the parts array is defined as follows:
Property | Type | Description |
---|---|---|
name * | string | The name of your part, usually the file name |
type * | string | The MIME type for the part e.g. image/png |
url | string | The URL to the file data. If this isn't specified then the data property must be |
data | string | For text based types the text string, or the base64 encoded data for file based types. If this isn't specified then the url property must be |
size | string | The 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"
}
]