Skip to main content

Message Status Event

Triggered when the delivery status of a message changes. Use this to track message delivery, read receipts, and playback status.

Event Type

message-status

Payload Structure

{
"event": "message-status",
"instanceId": "instance-uuid",
"data": {
"timestamp": 1702500000,
"messageId": "3EB0...",
"status": "READ",
"chat": {
"id": "chat-id",
"jid": "[email protected]",
"lid": null,
"profilePictureUrl": "https://...",
"name": "John Doe",
"isGroup": false,
"isLid": false
},
"sender": {
"id": "sender-id",
"jid": "[email protected]",
"lid": null,
"name": "John Doe",
"profilePictureUrl": "https://..."
},
"instanceId": "instance-uuid",
"connectedNumber": "5511999999999"
}
}

Data Fields

FieldTypeDescription
timestampnumberUnix timestamp of the status change
messageIdstringWhatsApp message ID
statusstringNew message status
chatobjectChat information
senderobjectSender information
instanceIdstringInstance ID
connectedNumberstringConnected phone number

Chat Object

FieldTypeDescription
idstringInternal chat ID
jidstring | nullWhatsApp JID ([email protected])
lidstring | nullWhatsApp LID (local identifier)
profilePictureUrlstring | nullProfile picture URL
namestring | nullChat name
isGroupbooleanWhether this is a group chat
isLidbooleanWhether using LID identifier

Sender Object

FieldTypeDescription
idstringInternal sender ID
jidstring | nullWhatsApp JID
lidstring | nullWhatsApp LID
namestring | nullSender name
profilePictureUrlstring | nullProfile picture URL

Status Values

StatusDescription
UNKNOWNStatus could not be determined
ERRORMessage failed to send
PENDINGMessage is queued for sending
SENTMessage sent to WhatsApp servers
RECEIVEDMessage delivered to recipient's device
READMessage read by recipient
PLAYEDAudio/video message played by recipient

Status Flow

PENDING → SENT → RECEIVED → READ/PLAYED

ERROR
tip

The PLAYED status is only sent for audio and video messages when the recipient plays them.

Example: Tracking Delivery

app.post('/webhook', (req, res) => {
const { event, data } = req.body;

if (event === 'message-status') {
const { messageId, status } = data;

switch (status) {
case 'SENT':
console.log(`Message ${messageId} sent to server`);
break;
case 'RECEIVED':
console.log(`Message ${messageId} delivered`);
break;
case 'READ':
console.log(`Message ${messageId} read by recipient`);
break;
case 'ERROR':
console.log(`Message ${messageId} failed to send`);
break;
}
}

res.status(200).send('OK');
});