---
title: "Deliver a webhook's backlog"
description: "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). `POST /api/v1/webhooks/{id}/flush`"
url: https://www.unitpost.com/docs/platform/post-webhooks-id-flush
section: "Platform API reference"
updated: 2026-10-13
---
# Deliver a webhook's backlog

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

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](https://www.unitpost.com/docs/platform/patch-webhooks-id) first. Re-enabling never delivers the backlog on its own. Requires the `webhooks:manage` capability.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes | — |

## 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 API key. |
| 403 | Insufficient scope. |
| 404 | Webhook not found. |
| 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`). |
| 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/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
  }'
```

## 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-webhooks-id-flush
- OpenAPI 3.1 (full schemas): https://www.unitpost.com/api/v1/openapi.json
