Get Message by ID
Retrieve a sent WhatsApp message by its WhatsApp message ID (wamid), including its
current delivery status, the full status history, and failure reasons if the send failed.
Use the wamid returned in data.messages[0].id by Send Message.
Authentication Required
Requires the x-api-key header. See Overview for details.
HTTP Request
GET /api/dragonfly/whatsapp/messages/:id
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | The WhatsApp message ID (wamid.…) returned when the message was sent. |
Try it
Loading playground…
Code Examples
- cURL
- JavaScript
- Python
curl -X GET "https://prod-api.superfone.co.in/superfone/api/dragonfly/whatsapp/messages/wamid.HBgMOTE3MDkzMjQ1NDI4FQIAERgSODQ5QjhCQjIzNUMxODk0NzhEAA==" \
-H "x-api-key: your_api_key_here"
const wamid = 'wamid.HBgMOTE3MDkzMjQ1NDI4FQIAERgSODQ5QjhCQjIzNUMxODk0NzhEAA==';
const response = await fetch(
`https://prod-api.superfone.co.in/superfone/api/dragonfly/whatsapp/messages/${encodeURIComponent(wamid)}`,
{ headers: { 'x-api-key': process.env.SF_API_KEY } }
);
const result = await response.json();
console.log(result.data.status);
import os
import requests
from urllib.parse import quote
wamid = 'wamid.HBgMOTE3MDkzMjQ1NDI4FQIAERgSODQ5QjhCQjIzNUMxODk0NzhEAA=='
url = f'https://prod-api.superfone.co.in/superfone/api/dragonfly/whatsapp/messages/{quote(wamid, safe="")}'
headers = {'x-api-key': os.environ['SF_API_KEY']}
response = requests.get(url, headers=headers)
response.raise_for_status()
print(response.json()['data']['status'])
Success Response
Status Code: 200 OK
The example below shows a failed send — a free-form message attempted outside the
24-hour window (Meta error 131047):
{
"data": {
"_id": "wamid.HBgMOTE3MDkzMjQ1NDI4FQIAERgSODQ5QjhCQjIzNUMxODk0NzhEAA==",
"data": { "body": "hi" },
"status": "failed",
"statuses": [
{
"id": "wamid.HBgMOTE3MDkzMjQ1NDI4FQIAERgSODQ5QjhCQjIzNUMxODk0NzhEAA==",
"status": "failed",
"timestamp": "2025-03-15T15:07:39.000Z",
"recipient_id": "917093245428",
"errors": [
{
"code": 131047,
"title": "Re-engagement message",
"message": "Re-engagement message",
"error_data": {
"details": "Message failed to send because more than 24 hours have passed since the customer last replied to this number."
},
"href": "https://developers.facebook.com/docs/whatsapp/cloud-api/support/error-codes/"
}
]
}
],
"timestamp": "2025-03-15T15:07:30.007Z",
"phone_number_id": "107382632456885",
"phone_number": "919429690872",
"type": "text",
"sender": { "user_id": null, "name": "Bot User" },
"org_id": 18805,
"inbound": false,
"replies": [],
"createdAt": "2025-03-15T15:07:30.017Z",
"updatedAt": "2025-03-15T15:07:40.884Z"
},
"message": "success"
}
Response Fields
| Field | Type | Description |
|---|---|---|
_id | string | The WhatsApp message ID (wamid) |
data | object | The message payload that was sent (e.g. { "body": "hi" } for text) |
status | string | Latest delivery status: sent, delivered, read, or failed |
statuses | object[] | Full status history, newest entries appended. Failed entries carry a Meta errors[] array with code, title, and error_data.details |
timestamp | string | ISO 8601 time the message was created |
phone_number_id | string | Meta phone-number ID of your business number |
phone_number | string | Your WhatsApp business number |
type | string | Message type (text, template, …) |
sender | object | Who triggered the send. API sends show { "user_id": null, "name": "Bot User" } |
org_id | number | Your organisation ID |
inbound | boolean | false for messages you sent |
replies | object[] | Replies threaded onto this message |
note
Statuses arrive asynchronously from Meta. Immediately after sending, status may still
be sent — poll this endpoint or use a
WhatsApp events webhook for delivery/read receipts.
Error Responses
| Status | Message | When it occurs |
|---|---|---|
401 | UnAuthorized, Please Provide Valid API Key | Missing or invalid x-api-key |
404 | (not found) | No message with this wamid exists on your account |
Related Endpoints
- Send Message — produces the
wamidthis endpoint looks up