Deliver a webhook's backlog

Deliver a webhook's backlog

POST/api/v1/webhooks/{id}/flush

POST /webhooks/{id}/flush
curl -X POST 'https://www.unitpost.com/api/v1/webhooks/wh_123/flush' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'User-Agent: my-app/1.0' \
  -H 'Content-Type: application/json' \
  -d '{
    "include_failed": true
  }'
Response · 202
{
  "object": "webhook_flush",
  "webhook_id": "webhook_123",
  "flushed": 0
}

Deliver the deliveries held while the webhook was suspended (queued), as the dashboard's "Retry queued" does; with include_failed also the ones that failed for good (failed, exhausted). The webhook must be enabled: re-enable it with Update a webhook endpoint first. Re-enabling never delivers the backlog on its own. Requires the webhooks:manage capability.

Parameters1 field
FieldTypeDescription
idrequiredstring · path—
Request body1 field
FieldTypeDescription
include_failedbooleanAlso deliver the `failed` and `exhausted` deliveries again. Default false: only the `queued` ones (held while the webhook was suspended).
Response · 202 fields3 fields
FieldTypeDescription
objectrequiredenumwebhook_flush—
webhook_idrequiredstring—
flushedrequiredintegerHow many deliveries were handed back for delivery (0 when the backlog was empty).
202400401403404409422429502

Search docs and guides

Search the docs and product guides.