Guides
Delivery statuses
The sent, delivered, read and failed webhooks, pricing, delivery errors and retries when your callback fails.
The response of POST /messages only says the message was accepted. What happens next arrives in the messages field, in value.statuses[].
Lifecycle
| Status | When |
|---|---|
sent | The message left the platform |
delivered | It reached the customer's device |
read | The customer opened the conversation (only with read receipts turned on) |
failed | It could not be delivered; carries errors[] |
played exists for voice messages and only goes out when forced through the control API.
{
"messaging_product": "whatsapp",
"metadata": { "display_phone_number": "555532704202", "phone_number_id": "424361664134261" },
"statuses": [{
"id": "wamid.HBgNNTUxMTk4NzY1NDMyMRUCABEYEkEzRERCRDI2Q0RBNTA0NUZGRgA=",
"status": "delivered",
"timestamp": "1793914188",
"recipient_id": "5511987654321",
"pricing": { "billable": false, "pricing_model": "PMP", "category": "service", "type": "free_customer_service" }
}]
}pricing.category is the template category (marketing, utility, authentication) with billable: true and type: "regular", or service (free) for free-form messages. If you sent biz_opaque_callback_data, it comes back in every status.
Failures
{
"id": "wamid.HBgNNTUxMTk4NzY1NDMyMRUCABEYEkZENEQ4MzIwNUMzOEI1MThFMAA=",
"status": "failed",
"timestamp": "1794004198",
"recipient_id": "5511987654321",
"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/"
}]
}| Code | Meaning | How to trigger it in Mimicr |
|---|---|---|
131026 | Message undeliverable (no WhatsApp, for example) | no_whatsapp persona, no_whatsapp OTP scenario |
131047 | Outside the 24-hour window | Free-form message with no customer reply, or clock moved forward |
131049 | Meta chose not to deliver (ecosystem) | marketing_saturated persona with marketing |
131050 | The customer stopped marketing | opt_out persona or preferences stop |
131056 | Business–customer pair rate limit | Audience rules |
| any | — | POST /v1/whatsapp/{slug}/messages/{wamid}/status with {"status": "failed", "error_code": 131000} |
After failed, no other status goes out for the message.
Order and duplicates
Statuses can arrive out of order and repeated, with Meta too. Use the id and a priority order (failed > read > delivered > sent) instead of arrival order. In Mimicr, a status never goes backwards and each one goes out once; turn on out_of_order_statuses and duplicate_webhooks in the chaos settings to test your handling (see Sandbox testing).
Retries
A delivery succeeds when your callback answers 2xx within 10 seconds. With retry_with_backoff on (the default), a failed delivery is retried, as with Meta, for up to 7 days:
| Attempt | After |
|---|---|
| 2nd | 30 s |
| 3rd | 5 min |
| 4th | 15 min |
| 5th | 1 h |
| 6th | 3 h |
| 7th | 6 h |
| 8th | 12 h |
| 9th | 24 h |
| 10th | 48 h |
| 11th | 72 h |
In Mimicr, these intervals are divided by clock_speed (default 60: 30 s becomes 1 s, 1 h becomes 1 min). With retry_with_backoff off, there is a single attempt. Resend whenever you want:
POST /v1/whatsapp/{slug}/webhooks/{id}/resend: tries again now, without scheduling more.POST /v1/whatsapp/{slug}/webhooks/resend-failed: the ones that failed in the last 24 hours (up to 25), or with{"template": "promo_outubro"}the ones of that template's campaign (up to 200).
Wait for a status in a test
npx mimicr wait whatsapp:docs webhook field=messages wamid=<wamid> status=success
The status filter here is the delivery's (pending, success, failed, skipped), not the message's. To wait for the message status: npx mimicr wait whatsapp:docs message wa_id=5511987654321 direction=outbound status=read.