Messages API

This page is used to implement SendTalk messages APIs, please refer to these following APIs

post
Send Message

https://sendtalk-api.taptalk.io/api/v1/message/send_whatsapp
Send a message to the specified number via WhatsApp
Request
Response
Request
Headers
API-Key
required
string
The integration API key for accessing the API
Content-Type
optional
string
Content-type of the body request
User-Agent
optional
string
The user agent of the client accessing the API
Body Parameters
phone
required
string
The recipient number (example: 62811001234)
messageType
required
string
The message type Values: "otp", "text", "image" Use OTP to send a message related to OTP, or you can use type text or image to send a message or notification that is not related to OTP
body
required
string
The message body (text message or file URL for the image)
filename
optional
string
The name of the file (required for all message type, except for "text")
caption
optional
string
The caption, if any (for message type "image")
Response
200: OK
Successfully add the message to the queue
{
"status": 200,
"error": {
"code": "",
"message": "",
"field": ""
},
"data": {
"success": true,
"message": "The message has been added to queue",
"reason": "",
"id": "f26ccf7a-d867-b3a4-d333-117ec668718d"
}
}
400: Bad Request
The request validation is failed
// Failed to validate request headers
{
"status": 400,
"error": {
"code": "40001",
"message": "Request headers are required (API-Key)",
"field": ""
},
"data": {}
}
// Failed to validate request body
{
"status": 400,
"error": {
"code": "40002",
"message": "Phone is required",
"field": "phone"
},
"data": {}
}