One API: Send media message

This command allows you to send messages containing images, documents or audio files to your consumer. Sending of video in messages is not supported.

Clickatell supports media sending by byte streams whereby the message content will be set to the base64 encoded file content value and the content-type correctly set to describe the data contained in the message body. If set incorrectly, the message API may not be able to process the content appropriately and the delivery may fail. If left blank, the message will be considered as a text message type by default and processed accordingly.

The caption parameter is optional and can be used to reference or name the media content being sent.

Media message limitations

  • The maximum number of messages allowed in a single batch call is 200
  • The maximum allowable size of a single media message is 1MB
  • The maximum size per whole packet is 20MB

The base URL for all API call strings is https://platform.clickatell.com/v1/message

Request headers


POST /v1/message
Content-Type: application/json
Authorization: Your API KEY

JSON Request


{
   "messages": [
     {
       "channel": "whatsapp",
       "to": "27999000001",
       "content": "/9j/4AAQSkZJRgABAQEASABIAAD/2w...SDayT2Nha/OIUS3FhlyHzB8ic6ctekf/9k=",
       "contentType":"image/png",
       "caption":"First image File"
     }
   ]
 }

Response


HTTP 202
 {
   "messages": [
     {
       "apiMessageId": "77fb29998253415fa5d66971d519d362",
       "accepted": true,
       "to": "2799900001",
       "error": null
     }
   ],
   "error": null
 }

Media Supported file types Associated content type
Document PDF, DOC, PPT, XLS application/pdf
application/msword
application/vnd.ms-powerpoint
application/vnd.ms-excel
Image JPG, JPEG, PNG application/pdf
image/jpg
image/jpeg
image/png
Audio AAC, MP4, MP4, AMR, OPUS application/pdf
audio/aac
audio/mp4
audio/mp3
audio/amr
audio/ogg
This command allows you to send messages containing images, documents or audio files to your consumer. Sending of video in messages is not supported. Clickatell supports media sending by byte streams whereby the message content will be set to the base64 encoded file content value and the content-type correctly set to describe the data contained in the message body. If set incorrectly, the message API may not be able to process the content appropriately and the delivery may fail. If left blank, the message will be considered as a text message type by default and processed accordingly. The caption parameter is optional and can be used to reference or name the media content being sent. Media message limitations
  • The maximum number of messages allowed in a single batch call is 200
  • The maximum allowable size of a single media message is 1MB
  • The maximum size per whole packet is 20MB
The base URL for all API call strings is https://platform.clickatell.com/v1/message Request headers

POST /v1/message
Content-Type: application/json
Authorization: Your API KEY
JSON Request

{
   "messages": [
     {
       "channel": "whatsapp",
       "to": "27999000001",
       "content": "/9j/4AAQSkZJRgABAQEASABIAAD/2w...SDayT2Nha/OIUS3FhlyHzB8ic6ctekf/9k=",
       "contentType":"image/png",
       "caption":"First image File"
     }
   ]
 }
Response

HTTP 202
 {
   "messages": [
     {
       "apiMessageId": "77fb29998253415fa5d66971d519d362",
       "accepted": true,
       "to": "2799900001",
       "error": null
     }
   ],
   "error": null
 }
Media Supported file types Associated content type
Document PDF, DOC, PPT, XLS application/pdf application/msword application/vnd.ms-powerpoint application/vnd.ms-excel
Image JPG, JPEG, PNG application/pdf image/jpg image/jpeg image/png
Audio AAC, MP4, MP4, AMR, OPUS application/pdf audio/aac audio/mp4 audio/mp3 audio/amr audio/ogg