Messages are the core functionality of the WhatsApp API, allowing you to send various types of content to recipients.
You can send different types of messages using our API, including text, media, and interactive messages.
Sends a simple text message to a WhatsApp recipient.
| Parameter | Type | Required | Description |
|---|---|---|---|
sessionId |
string | Required | ID of the WhatsApp session to use |
to |
string | Required | Recipient's phone number in international format (e.g., 14155552671) |
text |
string | Required | The text message to send |
quotedMessageId |
string | Optional | ID of a message to quote/reply to |
{
"success": true,
"data": {
"messageId": "msg_abc123",
"status": "sent",
"timestamp": "2025-09-14T15:45:30Z"
}
}
curl -X POST \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"sessionId": "session_123abc",
"to": "14155552671",
"text": "Hello from the WhatsApp API!"
}' \
https://api.messaging.com/v1/messages/text
Sends a media message (image, video, document, audio) to a WhatsApp recipient.
| Parameter | Type | Required | Description |
|---|---|---|---|
sessionId |
string | Required | ID of the WhatsApp session to use |
to |
string | Required | Recipient's phone number in international format |
mediaType |
string | Required | Type of media: image, video, document, audio |
media |
string | Required | URL or base64 data of the media |
caption |
string | Optional | Caption for the media (not applicable for audio) |
filename |
string | Optional | Filename for document type |
{
"success": true,
"data": {
"messageId": "msg_def456",
"status": "sent",
"timestamp": "2025-09-14T15:50:00Z",
"mediaType": "image"
}
}
curl -X POST \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"sessionId": "session_123abc",
"to": "14155552671",
"mediaType": "image",
"media": "https://example.com/image.jpg",
"caption": "Check out this image!"
}' \
https://api.messaging.com/v1/messages/media
Sends a location message to a WhatsApp recipient.
| Parameter | Type | Required | Description |
|---|---|---|---|
sessionId |
string | Required | ID of the WhatsApp session to use |
to |
string | Required | Recipient's phone number in international format |
latitude |
number | Required | Latitude coordinate |
longitude |
number | Required | Longitude coordinate |
name |
string | Optional | Name of the location |
address |
string | Optional | Address of the location |
{
"success": true,
"data": {
"messageId": "msg_ghi789",
"status": "sent",
"timestamp": "2025-09-14T15:55:00Z"
}
}
curl -X POST \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"sessionId": "session_123abc",
"to": "14155552671",
"latitude": 37.7749,
"longitude": -122.4194,
"name": "San Francisco",
"address": "San Francisco, CA, USA"
}' \
https://api.messaging.com/v1/messages/location
Sends an interactive button message to a WhatsApp recipient.
| Parameter | Type | Required | Description |
|---|---|---|---|
sessionId |
string | Required | ID of the WhatsApp session to use |
to |
string | Required | Recipient's phone number in international format |
text |
string | Required | Message text |
buttons |
array | Required | Array of button objects (max 3) |
footer |
string | Optional | Footer text for the message |
| Parameter | Type | Required | Description |
|---|---|---|---|
id |
string | Required | Unique identifier for the button |
text |
string | Required | Button text (max 20 characters) |
{
"success": true,
"data": {
"messageId": "msg_jkl012",
"status": "sent",
"timestamp": "2025-09-14T16:00:00Z"
}
}
curl -X POST \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"sessionId": "session_123abc",
"to": "14155552671",
"text": "Please select an option:",
"buttons": [
{"id": "btn1", "text": "Yes"},
{"id": "btn2", "text": "No"},
{"id": "btn3", "text": "Maybe"}
],
"footer": "Powered by WhatsApp API"
}' \
https://api.messaging.com/v1/messages/buttons
Messages can have the following statuses:
Retrieves the current status of a message.
| Parameter | Type | Required | Description |
|---|---|---|---|
messageId |
string | Required | ID of the message to check |
{
"success": true,
"data": {
"messageId": "msg_abc123",
"status": "delivered",
"timestamp": "2025-09-14T15:45:30Z",
"deliveredAt": "2025-09-14T15:45:35Z",
"readAt": null
}
}
curl -X GET \
-H "Authorization: Bearer YOUR_API_KEY" \
https://api.messaging.com/v1/messages/msg_abc123
The number of messages you can send depends on your subscription plan:
| Plan | Daily Message Limit |
|---|---|
| Free | 50 |
| Basic | 1,000 |
| Premium | 10,000 |
| Enterprise | Unlimited |