PrerequisitesMake sure that your webhook endpoint is listening for
whatsapp.template.reviewedevents. See also Configure Webhooks, Retrieve a webhook endpoint API.
Template Approved
In this case, your webhook endpoint received a template APPROVED event:
- The template
statusUpateEventisAPPROVED. - The template
statusis nowAPPROVED.
Code sample
curl 'https://YOUR-WEBHOOK-ENDPOINT-URL' \
-H 'Content-Type: application/json' \
-d '{
"id": "evt_eEMtA0PkkyACiS5o",
"type": "whatsapp.template.reviewed",
"apiVersion": "v2",
"createTime": "2023-02-20T12:00:00.000Z",
"whatsappTemplate": {
"wabaId": "WABA-ID",
"name": "template_name",
"language": "en",
"category": "MARKETING",
"status": "APPROVED",
"reason": "NONE",
"statusUpdateEvent": "APPROVED"
}
}'Note
- Use
wabaId,name, andlanguageto identify the template in your system. - The
statusUpdateEventdescribes what happened on this template status, while thestatusis the current status of the template. They are not always the same. - This event occurs when a template is approved by Meta. The template can be the one you created or edited before. This also happens when a paused template changes to approved automatically.
- Once a template is approved, you can use it to send template messages.
Template Rejected
In this case, your webhook endpoint received a template REJECTED event:
- The template
statusUpateEventisREJECTED. - The template
statusis nowREJECTED.
Code sample
curl 'https://YOUR-WEBHOOK-ENDPOINT-URL' \
-H 'Content-Type: application/json' \
-d '{
"id": "evt_eEMtA0PkkyACiS5o",
"type": "whatsapp.template.reviewed",
"apiVersion": "v2",
"createTime": "2023-02-20T12:00:00.000Z",
"whatsappTemplate": {
"wabaId": "WABA-ID",
"name": "template_name",
"language": "en",
"category": "MARKETING",
"status": "REJECTED",
"reason": "SCAM",
"statusUpdateEvent": "REJECTED"
}
}'Note
- This event occurs when a template is rejected. The template can be the one you created or edited before.
- Once a template is rejected, you cannot use it to send template messages. You can edit this template to start a new review.
Template Paused
In this case, your webhook endpoint received a template PAUSED event:
- The template
statusUpateEventisPAUSED. - The template
statusis nowPAUSED. - The eason why the template is paused.
Code sample
curl 'https://YOUR-WEBHOOK-ENDPOINT-URL' \
-H 'Content-Type: application/json' \
-d '{
"id": "evt_eEMtA0PkkyACiS5o",
"type": "whatsapp.template.reviewed",
"apiVersion": "v2",
"createTime": "2023-02-20T12:00:00.000Z",
"whatsappTemplate": {
"wabaId": "WABA-ID",
"name": "template_name",
"language": "en",
"category": "MARKETING",
"status": "PAUSED",
"reason": "NONE",
"statusUpdateEvent": "PAUSED"
}
}'Note
- This event occurs when a template is paused. You cannot use it to send messages.
- Pausing durations are as follows:
- 1st Instance: Paused for 3 hours
- 2nd Instance: Paused for 6 hours
- 3rd Instance: Disabled
- A
APPROVEDevent occurs when a paused template changes to normal status. - See also Template Pausing.
Template Flagged
In this case, your webhook endpoint received a template FLAGGED event:
- The template
statusUpateEventisFLAGGED. - The template status is now
APPROVED. - Contains the date when the template will be disabled.
Code sample
curl 'https://YOUR-WEBHOOK-ENDPOINT-URL' \
-H 'Content-Type: application/json' \
-d '{
"id": "evt_eEMtA0PkkyACiS5o",
"type": "whatsapp.template.reviewed",
"apiVersion": "v2",
"createTime": "2023-02-20T12:00:00.000Z",
"whatsappTemplate": {
"wabaId": "WABA-ID",
"name": "template_name",
"language": "en",
"category": "MARKETING",
"status": "APPROVED",
"reason": "Your WhatsApp message template has been paused for 3 hours until Feb 23 at 5:28 AM UTC because it had issues.",
"statusUpdateEvent": "FLAGGED",
"disableDate": "February 28, 2023"
}
}'Note
- The
statusUpdateEventdescribes what happened on this template status, while thestatusis the current status of the template. They are not always the same.
Template Disabled
In this case, your webhook endpoint received a template DISABLED event:
- The template
statusUpateEventisDISABLED. - The template status is now
DISABLED.
Code sample
curl 'https://YOUR-WEBHOOK-ENDPOINT-URL' \
-H 'Content-Type: application/json' \
-d '{
"id": "evt_eEMtA0PkkyACiS5o",
"type": "whatsapp.template.reviewed",
"apiVersion": "v2",
"createTime": "2023-02-20T12:00:00.000Z",
"whatsappTemplate": {
"wabaId": "WABA-ID",
"name": "template_name",
"language": "en",
"category": "MARKETING",
"status": "DISABLED",
"reason": "NONE",
"statusUpdateEvent": "DISABLED"
}
}'Note
- A template status changes to
DISABLEDat its 3rd pausing. - See also Template Pausing.
Template Pending Deletion
In this case, your webhook endpoint received a template PENDING_DELETION event:
- The template
statusUpateEventisPENDING_DELETION. - The template status is now
DELETED.
Code sample
curl 'https://YOUR-WEBHOOK-ENDPOINT-URL' \
-H 'Content-Type: application/json' \
-d '{
"id": "evt_eEMtA0PkkyACiS5o",
"type": "whatsapp.template.reviewed",
"apiVersion": "v2",
"createTime": "2023-02-20T12:00:00.000Z",
"whatsappTemplate": {
"wabaId": "WABA-ID",
"name": "template_name",
"language": "en",
"category": "MARKETING",
"status": "DELETED",
"reason": "NONE",
"statusUpdateEvent": "PENDING_DELETION"
}
}'Note
- Occurs when you delete a template.
- The message template is being deleted. Remember that the name of this template can't be used again for 30 days. You'll need to use a different name to create new message templates.
