Webhook events
Every state of a send, low and expired credits, opt-outs and replies, each naming the sub-customer.
Register an endpoint for the Partner API events (Create a webhook endpoint):
POST /partner/webhook-endpoints
{"url": "https://hooks.example/messora",
"event_types": ["message.delivered", "message.failed", "message.unknown", "credit.low", "reply.received"]}The secret is returned once. List event types
lists the events, Set an endpoint's events
replaces an endpoint's events, and standard_event_types adds the workspace's other
events (such as message.received, or template.status for Meta's template
reviews; see the event catalogue)
to the same endpoint.
Partner events are delivered exactly like the workspace's other webhooks
(see Webhooks in the API reference):
the same envelope (id, type, version, created_at, data), the same
Messora-Signature header (HMAC-SHA256 of "<t>.<raw body>" with the
endpoint secret), the same retries and delivery log. Delivery is at least
once and not ordered: drop duplicates by the envelope's id.
{"id": "019a8c2e-…", "type": "message.delivered", "version": 1, "created_at": "2026-12-02T09:00:07Z", "data": {…}}Every payload names the sub-customer as
customer: {"id", "external_id", "display_name"}. It is null only when no
customer can be named (a reply from someone none of your customers
messaged, a global opt-out made without one).
Events
| Event | When |
|---|---|
message.sent | Meta reported the send sent (its credits are charged). |
message.delivered | Delivered to the recipient's phone. |
message.read | The recipient read it. |
message.failed | Meta reported a failure, or the attempt failed (its credits are given back). |
message.unknown | Meta reported no outcome within 7 days (its credits are given back). |
credit.low | A customer's available credits fell below its threshold (once per crossing). |
credit.expired | Some of a customer's credits expired. |
recipient.opted_out | A recipient opted out (a stop word or the API). |
reply.received | A recipient answered a number in notification mode. |
Each state of a send reaches you once.
Message events
message.sent, message.delivered, message.read, message.failed and
message.unknown carry the send as GET /partner/messages/{messageId}
returns it, with credits.state after settlement.
{"id": "019a8c2e-4f1b-7a00-9c3d-5e7a10000501",
"customer": {"id": "019a8c2e-4f1b-7a00-9c3d-5e7a10000001", "external_id": "acc-1042", "display_name": "Yıldız Muhasebe"},
"to": "+905551112233", "phone_number_id": "019a8c2e-4f1b-7a04-9c3d-5e7a10000004",
"template": {"name": "invoice_ready", "language": "tr"},
"status": "failed", "wamid": "wamid.HBgM…", "credits": {"amount": 2, "state": "released", "unlimited": false},
"error": {"code": "131026", "title": "Message undeliverable"},
"created_at": "2026-12-02T09:00:00Z", "sent_at": null, "delivered_at": null, "read_at": null,
"failed_at": "2026-12-02T09:00:04Z"}message.unknown has the same shape with credits.state: "released" and
the status the message last had (Meta took the request, but never reported it sent, delivered, read or failed). If Meta
reports the message later after all, its event still arrives and nothing is
charged.
credit.low
{"customer": {"id": "019a8c2e-…", "external_id": "acc-1042", "display_name": "Yıldız Muhasebe"},
"threshold": 100,
"balance": {"available": 96, "reserved": 4, "next_expiry": "2027-01-31T21:00:00Z", "next_expiry_amount": 96}}credit.expired
{"customer": {"id": "019a8c2e-…", "external_id": "acc-1042", "display_name": "Yıldız Muhasebe"},
"expired": 40,
"balance": {"available": 460, "reserved": 0, "next_expiry": "2027-02-28T21:00:00Z", "next_expiry_amount": 460}}recipient.opted_out
{"customer": {"id": "019a8c2e-…", "external_id": "acc-1042", "display_name": "Yıldız Muhasebe"},
"phone": "+905551112233", "scope": "global", "source": "keyword", "reason": "Keyword: İPTAL",
"opted_out_at": "2026-12-02T10:15:00Z", "attribution": "last_sent"}scope:global(no sub-customer may message the recipient) orcustomer(the one named).source:api(POST /partner/opt-outs) orkeyword(a stop word).- For a stop word,
customeris the sub-customer the stop word answered, found by the reply attribution below (attribution).
Stop words are global for the whole number. When a recipient sends a
stop word (İPTAL, DUR, STOP, … in any case, Turkish letters or not) to your
number, the opt-out covers every sub-customer that sends from that
number, not only the one it answered: the recipient cannot tell your
customers apart, since they all write from your number. Remove it with
DELETE /partner/opt-outs?phone=… if the recipient asks to hear from you
again. No confirmation message is sent. The same happens on a number not in
notification mode when one of your sub-customers had messaged the
recipient from it.
reply.received
reply.received fires only for numbers in notification mode. A reply
to any other number of your workspace belongs to the inbox and reaches you
as the workspace's own message.received event (subscribe it with
standard_event_types). On a number in notification mode both events
fire.
{"customer": {"id": "019a8c2e-…", "external_id": "acc-1042", "display_name": "Yıldız Muhasebe"},
"attribution": "quoted", "in_reply_to": "019a8c2e-4f1b-7a00-9c3d-5e7a10000501",
"other_customers": [{"id": "019a8c2e-…", "external_id": "acc-2210", "display_name": "Deniz Lojistik"}],
"message_id": "019a8c2e-…", "wamid": "wamid.HBgM…", "phone_number_id": "019a8c2e-…",
"from": "+905551112233", "profile_name": "Ayşe", "message_type": "text", "text": "Teşekkürler",
"media": null, "reply_to_wamid": "wamid.HBgL…", "received_at": "2026-12-02T09:05:00Z"}media (for an image, document, audio or video reply) is
{"file_id", "mime_type", "filename", "sha256", "caption"}; a reaction adds
reaction_to (the wamid it reacts to).
Reply attribution
All your sub-customers share your number, so every reply is attributed to one of them:
attribution | Rule |
|---|---|
quoted | The recipient quoted (swiped to reply to) or reacted to one of your sends: that send's customer. in_reply_to is the send's id. |
last_sent | Otherwise: the customer whose send reached the recipient last from the same number. |
none | None of your customers messaged the recipient from that number: customer is null. |
other_customers lists the other customers that messaged the recipient
from the number in the last 30 days, the latest first, so you can show the
reply to each of them if you prefer.
There is no automatic answer to replies.