Skip to main content

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

ParameterTypeRequiredDescription
idstringYesThe WhatsApp message ID (wamid.…) returned when the message was sent.

Try it

Loading playground…

Code Examples

curl -X GET "https://prod-api.superfone.co.in/superfone/api/dragonfly/whatsapp/messages/wamid.HBgMOTE3MDkzMjQ1NDI4FQIAERgSODQ5QjhCQjIzNUMxODk0NzhEAA==" \
-H "x-api-key: your_api_key_here"

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

FieldTypeDescription
_idstringThe WhatsApp message ID (wamid)
dataobjectThe message payload that was sent (e.g. { "body": "hi" } for text)
statusstringLatest delivery status: sent, delivered, read, or failed
statusesobject[]Full status history, newest entries appended. Failed entries carry a Meta errors[] array with code, title, and error_data.details
timestampstringISO 8601 time the message was created
phone_number_idstringMeta phone-number ID of your business number
phone_numberstringYour WhatsApp business number
typestringMessage type (text, template, …)
senderobjectWho triggered the send. API sends show { "user_id": null, "name": "Bot User" }
org_idnumberYour organisation ID
inboundbooleanfalse for messages you sent
repliesobject[]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

StatusMessageWhen it occurs
401UnAuthorized, Please Provide Valid API KeyMissing or invalid x-api-key
404(not found)No message with this wamid exists on your account
  • Send Message — produces the wamid this endpoint looks up