Messages API
Allows you to send messages containing text, image, audio, video or file to Contacts in the platform.
Channel token is required to access this API resource. Tokens can be generated by using the key icon, next to the desired channel in Settings.
Requests
The Messages API is composed of several type of requests:
This request sends a text message directly to the Contact as per defined in the Endpoint.
Sample POST Text Request
Response - Success (HTTP status → 200)
Please note that in case of Viber Channel - due to a certain limitation - the Contact ID needs to be provided in a Base64 encoded format.
Send Attachment Request
This request sends attachment in form of URL directly to the Contact as per defined in the Endpoint. The file can either be image, video, audio or file.
Sample POST Send Image Request
Response - Success (HTTP status → 200)
Sample POST Send Video Request
Response - Success (HTTP status → 200)
Sample POST Send Audio Request
Response - Success (HTTP status → 200)
Sample POST Send File Request
Response - Success (HTTP status → 200)
Send Text with Quick Replies Request
This request send text message with quick replies for the receivers.
Response - Success (HTTP status → 200)
Error Codes
Unauthorized (HTTP Status → 401)
Too Many Requests (HTTP Status → 429)
Method Not Allowed (HTTP Status → 405)
General (HTTP Status → 403)
Unmatched File Type (HTTP Status → 403)
Limitations
Only one message can be sent in 1 API call.
API has rate limit of 25 RPS.
10 Quick replies with 20 characters each are allowed.
Survey is not cancelled by default.
forceCancelSurvey : true
must explicitly be sent in the payload.Contact status will not be changed on API call.
Last updated