Deliver an organization webhook's backlog

Deliver an organization webhook's backlog

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

POST /organizations/{id}/webhooks/{webhook_id}/flush
curl -X POST 'https://www.unitpost.com/api/v1/organizations/org_123/webhooks/wh_123/flush' \
  -H 'Authorization: Bearer YOUR_ORG_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 endpoint was suspended (queued); with include_failed also the ones that failed for good. The endpoint must be enabled: re-enabling never delivers the backlog on its own. Takes an organization key (ok_live_…) with organizations:write.

Parameters2 fields
FieldTypeDescription
idrequiredstring · pathThe organization's id (`org_…`), from `GET /whoami` or Organization → API.
webhook_idrequiredstring · pathThe organization webhook endpoint's id (`wh_…`).
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.