One API
Response will contain status information for any channel relevant to the message.
The timestamp field indicates the time of the last status change.
If the message is in an unknown state (message not found), the format is different (since there is no channel) and the timestamp should be set to the current time as it is presently unknown at the time of the request.
Omni message id
Success
Account not found
GET /v1/message/{omniMessageId} HTTP/1.1
Host: platform.clickatell.com
Authorization: YOUR_API_KEY
Accept: */*
{
"sms": {
"status": "QUEUED",
"timestamp": 1506607698000
}
}Note that on message send responses, there are two possible locations for error information: one for global level (where entire payload is rejected) and one where a message level reject is applicable. Errors Table Message Status Table Supported content types and limitations
One api send message request
Success
Returned on a message when more than one message was submitted, but they have a different status (example: one message was accepted, and one was rejected
Bad Request. Note that the global error object is not used because this is a message-level error
Unauthorized
Payment Required. User is out of funds/credits/currency/balance
Request was sent to a resource that does not exist
Service Unavailable
POST /v1/message HTTP/1.1
Host: platform.clickatell.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 81
{
"messages": [
{
"channel": "sms",
"to": "2799900001",
"content": "Here is my message"
}
]
}{
"messages": [
{
"apiMessageId": "77fb29998253415fa5d66971d519d362",
"accepted": true,
"to": "2799900001",
"error": null
}
],
"error": null
}Send Business Read Status notification request
Success
Returned on a request when more than one notification was submitted, but they have a different status (example: one notification was accepted, and one was rejected
Bad request
Unauthorized
Request was sent to a resource that does not exist
Service Unavailable
POST /v1/notification HTTP/1.1
Host: platform.clickatell.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 174
{
"event": {
"messageStatusUpdate": [
{
"channel": "whatsapp",
"statusCode": 1001,
"messageId": "3a89680503414383af44dcd0e4e5f184",
"clientEventId": "2993b6b548000a80989a20549e7558a5"
}
]
}
}{
"event": {
"messageStatusUpdate": [
{
"apiEventId": "77fb29998253415fa5d66971d519d362",
"accepted": true,
"messageId": "3a89680503414383af44dcd0e4e5f184",
"clientEventId": "2993b6b548000a80989a20549e7558a5",
"error": null
}
]
},
"error": null
}Response returns metadata of uploaded media
ID of the file that was returned in media upload request
Success
Bad request
Account/file not found
GET /v1/media/{fileId} HTTP/1.1
Host: platform.clickatell.com
Authorization: YOUR_API_KEY
Accept: */*
{
"expirationTime": 1583845974,
"broadcastAllowed": true
}Media file will be available for download for 30 days
The response body will contain:
the binary media data if it is not client side encrypted
the encrypted binary media data if client side encrypted
The download URL is specified in the moMedia event in the downloadUrl parameter of the files object array
ID of the file that is presented in MO Callbacks
If encryption is client, value should be 'client'
Hash of file that is presented in MO Callbacks
Success
Bad request
Account/file not found
GET /v1/media?fileId=text&sha256Hash=text HTTP/1.1
Host: platform.clickatell.com
Authorization: YOUR_API_KEY
Accept: */*
TUYASDBJHWETTASDGJUploaded media file will be available for message sending for 30 days after uploading
The body must contain the binary media data
Media size limit is 30MB
Field that marks this upload file for delivery to a single destination user. Limits message sending to only this number
- Field that marks this upload file for delivery to any destination users.
- Value must be set to true
- Broadcasts for media and interactive media templates are supported.
- Note: The above is dependent on terms and conditions and best practices as prescribed by Meta.
File name of the file being uploaded
Content type of file
image/jpgSuccess
Bad request
Account not found
POST /v1/media?fileName=text HTTP/1.1
Host: platform.clickatell.com
Authorization: YOUR_API_KEY
Content-Type: */*
Accept: */*
Content-Length: 188
"curl -X POST -H \"Authorization: YOUR-API-KEY\" -H 'Content-Type: image/jpg' --data-binary @myFilename.jpg https://platform.clickatell.com/v1/media?fileName=myFilename.jpg&to=27999123456"{
"fileId": "uuid.xxx",
"accepted": true,
"error": null
}Success
Account not found
GET /v1/balance HTTP/1.1
Host: platform.clickatell.com
Authorization: YOUR_API_KEY
Accept: */*
{
"balance": 1267.92865,
"currency": "ZAR"
}Last updated