Webhook deliveries
Ready logs every POST it makes to your webhook, with what your endpoint answered. Use the log to find events your endpoint missed and send them again. Test keys can read the log but can’t resend (403 test_key_not_allowed).
#List webhook deliveries
Every POST Ready made to your webhook in the last 30 days, newest first: first tries, retries and resends, with the answer your endpoint gave. Test events are not listed. When your webhook takes your sub-accounts’ events, their copies are listed too. Needs the manage_integrations permission, because the bodies hold your contacts’ numbers and texts.
Query parameters
eventstring- Only this event, one of the webhook events.
resultenumsucceededorfailed.sub_account_idstring- A sub-account’s id for its events only, or
mainfor your own account’s. qstring- Search the event id, event name, response code, error, sub-account name and body. A phone number in any format matches by its digits. Up to 200 characters.
limitintegerDefault50- 1 to 100.
before_idinteger- The next page: pass the
next_before_idof the last answer.
Returns
dataobject[]- One per POST:
id,event_id(theX-Ready-Event-Idit carried),event,attempt,trigger(live,retryorresend),url,succeeded,response_code,error,duration_ms,sub_account({ "id", "name" }ornull) andcreated_at. next_before_idinteger | null- Pass it as
before_idfor the next page.nullon the last page.
Errors
| HTTP | Code | When |
|---|---|---|
| 400 | invalid_field | A query value isn’t one listed above. |
| 403 | permission_denied | The key’s user lacks manage_integrations. |
#Get a webhook delivery
One delivery from the list, with what Ready sent and what your endpoint answered. Needs the manage_integrations permission.
Returns
dataobject- The fields of a list item, plus
request_headers,request_body(the exact body that was signed),response_body, andevent_delivered:trueonce any try of this event succeeded.
Errors
| HTTP | Code | When |
|---|---|---|
| 404 | not_found | No delivery with this id on your account. |
#Resend a webhook delivery
Sends a failed event to your webhook again now, with the same body and the same X-Ready-Event-Id. Each call is one more try, listed as a new delivery. Takes no body. Needs the manage_integrations permission and a live key.
Returns
dataobjectid(the new delivery),attempt,event_id,succeeded,response_code,duration_msanderror. A failed resend still answers200withsucceeded: false. A resend sends the original body, so itstimestampis the original event time: a receiver that rejects old timestamps must allow up to 30 days, and should drop repeats byX-Ready-Event-Idinstead.
Errors
| HTTP | Code | When |
|---|---|---|
| 404 | not_found | No delivery with this id on your account. |
| 409 | delivery_succeeded | The event already got through. |
| 409 | retry_pending | Ready is still retrying it on its own. Wait for that retry. |
| 409 | webhook_not_set | No webhook URL is saved. Save one with PUT /v1/webhooks, then resend. |
| 409 | webhook_off | Your webhook is off (enabled: false). Turn it on with PUT /v1/webhooks and "enabled": true, then resend. |
| 409 | event_off | Your webhook no longer takes this event. Add it to events with PUT /v1/webhooks, then resend. |
| 429 | rate_limited | Too many resends at once. Wait and try again. |