Send WhatsApp Text Messages
Send instant and direct WhatsApp text messages via the DoubleTick API for seamless customer communication within the last 24-hour session window. π
API Endpoint
Use the following endpoint to send a text message:
POST https://public.doubletick.io/whatsapp/message/text
Request Headers
{
"Authorization": "YOUR_API_KEY",
"Content-Type": "application/json"
}
Request Body Parameters
{
"to": "customer_number",
"from": "sender_number",
"messageId": "uuid-v4xxx",
"content": {
"text": "Hello, this is a sample message from DoubleTick!"
}
}
Parameters
to
(string, required): Customerβs phone number in international format.from
(string, required): Your registered sender phone number in international format.messageId
(string, optional):- Message ID (UUID v4) to be used for the message.
- If not provided, a random UUID v4 will be generated automatically.
- Length to be exact 36 characters.
content
(object, required)text
(string, required): The text message content.
Responses
Success Response (201)
{
"status": "SENT",
"recipient": "customer_number",
"messageId": "unique_message_id"
}
Bad Request (400)
{
"message": "error_message",
"error": "Bad Request",
"statusCode": 400
}
Unauthorized (401)
{
"message": "Invalid public api key",
"error": "Unauthorized",
"statusCode": 401
}
Unprocessable Entity (422)
{
"message": "invalid file type for audio: text/html; charset=utf-8",
"error": "Unprocessable Entity",
"statusCode": 422
}
Best Practices
- If messaging outside the 24-hour window, use template messages instead.
Updated 14 days ago
Whatβs Next
Explore more message types and enhance your WhatsApp communication with DoubleTick API