---
title: "Deliver an organization webhook's backlog"
description: "Deliver the deliveries held while the endpoint was suspended (queued); with include_failed also the ones that failed for good. `POST /api/v1/organizations/{id}/webhooks/{webhook_id}/flush`"
url: https://www.unitpost.com/docs/platform/post-organizations-id-webhooks-webhook-id-flush
section: "Platform API reference"
updated: 2026-11-17
---
# Deliver an organization webhook's backlog

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

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`.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes | The organization's id (`org_…`), from `GET /whoami` or Organization → API. |
| `webhook_id` | path | string | yes | The organization webhook endpoint's id (`wh_…`). |

## Request body

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `include_failed` | boolean | no | Also deliver the `failed` and `exhausted` deliveries again. Default false: only the `queued` ones (held while the webhook was suspended). |

## Response fields (202)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `object` | enum | yes | One of: `webhook_flush`. |
| `webhook_id` | string | yes | — |
| `flushed` | integer | yes | How many deliveries were handed back for delivery (0 when the backlog was empty). |

## Responses

| Status | Description |
| --- | --- |
| 202 | How many deliveries were handed back for delivery. |
| 400 | The body isn't JSON. |
| 401 | Missing or invalid organization key (a workspace key is refused). |
| 403 | API access not approved for the organization, the key lacks the capability, or no User-Agent. |
| 404 | Not this key's organization, or not one of its webhook endpoints (a workspace's endpoint is a 404 here). |
| 409 | The webhook is disabled or suspended: re-enable it first. |
| 422 | A bad `include_failed`, or an unknown key. |
| 429 | Too many backlog retries this hour (`Retry-After`), or the organization's rate limit. |
| 502 | `engine_unavailable`: the delivery service couldn't be reached; nothing was retried. Retry. |

## Example request

```bash
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
  }'
```

## Example response (202)

```json
{
  "object": "webhook_flush",
  "webhook_id": "webhook_123",
  "flushed": 0
}
```

## Links

- HTML reference (with Node.js, Python, Ruby, PHP, Laravel, Go, Java, Rust, .NET and CLI examples): https://www.unitpost.com/docs/platform/post-organizations-id-webhooks-webhook-id-flush
- OpenAPI 3.1 (full schemas): https://www.unitpost.com/api/v1/openapi.json
