# Replay webhook events

`POST https://api.cademi.com.br/api/v3/webhooks/{webhook_id}/replays`

Operation ID: `webhooks.replays.create` · API v3

Resends, in bulk, events that were already delivered to this webhook endpoint. The selection can be narrowed by `event_ids`, by an `occurred_after`/`occurred_before` time range, and by `event_types`. Only events that occurred before the request was received and are still retained are eligible.

The replay is processed asynchronously as an operation with one item per event. Use the `Location` header to track its progress and per-event results.

A replay adds new attempts to the existing deliveries; it never creates new deliveries. The request is rejected if no eligible events match the selection.

Required permissions: `webhooks.replay`.

## Parameters

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `webhook_id` | path | string | yes |  |

## Request body

Content type: `application/json`.

| Field | Type | Required | Description |
|---|---|---|---|
| `event_ids` | array of string or null | no |  |
| `event_types` | array of string or null | no |  |
| `occurred_after` | string or null (date-time) | no |  |
| `occurred_before` | string or null (date-time) | no |  |

## Responses

### 202

The replay was accepted for asynchronous processing. Returns the operation that tracks it.

Body: `data`: Operation.

Fields of Operation:

| Field | Type | Required | Description |
|---|---|---|---|
| `attempt` | object or null | yes |  |
| `cancellation_requested` | boolean | yes |  |
| `created_at` | string (date-time) | yes |  |
| `error` | object or null | yes |  |
| `expires_at` | string (date-time) | yes |  |
| `finished_at` | string or null (date-time) | yes |  |
| `id` | string | yes | Public ID, with the op_ prefix. |
| `items_url` | string | yes |  |
| `object` | string, one of `operation` | yes |  |
| `progress` | object | yes |  |
| `result_url` | string or null | yes |  |
| `started_at` | string or null (date-time) | yes |  |
| `status` | string, one of `queued`, `running`, `succeeded`, `partially_succeeded`, `failed`, `canceled` | yes |  |
| `type` | string | yes | Type of the operation, from a fixed set of values. |

### 401

The credential is missing, malformed, expired, or revoked.

Body: Error.

### 403

The current credentials do not have the permission required by this operation.

Body: Error.

### 404

The webhook endpoint was not found or is not accessible with the current credentials.

Body: Error.

### 422

The request body or query parameters failed validation.

Body: ValidationFailed.

Full schema: https://cademi.dev/openapi/v3.json
