When you get a messages webhook indicating a received message, you can use the message.id
value to mark the message as read.
It's good practice to mark an incoming messages as read within 30 days of receipt. Marking a message as read will also mark earlier messages in the thread as read.
Use the POST /<WHATSAPP_BUSINESS_PHONE_NUMBER_ID>/messages endpoint to mark a message as read.
curl -X POST \ 'https://graph.facebook.com/<API_VERSION>/<WHATSAPP_BUSINESS_PHONE_NUMBER_ID>/messages' -H 'Authorization: Bearer <ACCESS_TOKEN>' \ -H 'Content-Type: application/json' \ -d ' { "messaging_product": "whatsapp", "status": "read", "message_id": "<WHATSAPP_MESSAGE_ID>" }'
Placeholder | Description | Example value |
---|---|---|
String | Required. |
|
String | Optional. Graph API version. | v23.0 |
String | Required. WhatsApp business phone number ID. |
|
String | Required. WhatsApp message ID. This ID is assigned to the |
|
Upon success:
{ "success": true }
curl 'https://graph.facebook.com/v23.0
/106540352242922/messages' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer EAAJB...' \
-d '
{
"messaging_product": "whatsapp",
"status": "read",
"message_id": "wamid.HBgLMTY1MDM4Nzk0MzkVAgARGBJDQjZCMzlEQUE4OTJBMTE4RTUA"
}'
{ "success": true }