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
| Field | Type | Description |
|---|---|---|
idrequired | string · path | — |
Request body1 field
| Field | Type | Description |
|---|---|---|
include_failed | boolean | Also deliver the `failed` and `exhausted` deliveries again. Default false: only the `queued` ones (held while the webhook was suspended). |
Response · 202 fields3 fields
| Field | Type | Description |
|---|---|---|
objectrequired | enumwebhook_flush | — |
webhook_idrequired | string | — |
flushedrequired | integer | How many deliveries were handed back for delivery (0 when the backlog was empty). |
202400401403404409422429502