> ## Documentation Index
> Fetch the complete documentation index at: https://opentrain.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Redeliver Webhook Events

> Requeue failed webhook deliveries for an endpoint, or one specific delivery by ID, regardless of its status.

Requeues [webhook deliveries](/docs/developers/annotation-platforms/webhooks) for retry. With a `deliveryId`, requeues that specific delivery regardless of its status; without one, requeues **all `FAILED` deliveries** for the endpoint. Requeued deliveries are only attempted while the endpoint is `ACTIVE` — when [recovering from auto-disable](/docs/developers/annotation-platforms/webhooks#auto-disable-and-recovery), re-enable first, then redeliver.

**Requirements:** `webhooks:manage` scope.

## Request

<ParamField path="endpointId" type="string" required>
  The webhook endpoint ID.
</ParamField>

<ParamField body="deliveryId" type="string">
  A specific delivery to requeue — the value of the `X-OpenTrain-Delivery` header. Omit to requeue every `FAILED` delivery on the endpoint.
</ParamField>

## Response

<ResponseField name="webhookEndpoint" type="object">
  The endpoint: `{id, url, eventTypes, status, createdAt, consecutiveFailures, disabledAt, disabledReason}` — same shape as [`GET /webhook-endpoints/{endpointId}`](/docs/developers/annotation-platforms/api-reference/webhook-endpoints/get).
</ResponseField>

<ResponseField name="requeued" type="integer">
  How many deliveries were requeued.
</ResponseField>

<ResponseField name="message" type="string">
  When the requeued deliveries will be attempted — or a reminder that nothing is attempted while the endpoint is `DISABLED`.
</ResponseField>

## Errors

| Status | `code`         | Meaning                                        |
| ------ | -------------- | ---------------------------------------------- |
| `400`  | `BAD_REQUEST`  | Body not valid JSON                            |
| `401`  | `UNAUTHORIZED` | Missing, invalid, or revoked token             |
| `403`  | `FORBIDDEN`    | Token lacks `webhooks:manage`                  |
| `404`  | `NOT_FOUND`    | Endpoint or delivery not found on this install |

<RequestExample>
  ```bash curl (all failed) theme={null}
  curl -sS -X POST https://app.opentrain.ai/api/partner/v1/webhook-endpoints/<ENDPOINT_ID>/redeliver \
    -H "Authorization: Bearer $OT_PARTNER_TOKEN" \
    -H "Content-Type: application/json" \
    -d '{}'
  ```

  ```bash curl (one delivery) theme={null}
  curl -sS -X POST https://app.opentrain.ai/api/partner/v1/webhook-endpoints/<ENDPOINT_ID>/redeliver \
    -H "Authorization: Bearer $OT_PARTNER_TOKEN" \
    -H "Content-Type: application/json" \
    -d '{"deliveryId": "<DELIVERY_ID>"}'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "webhookEndpoint": {
      "id": "<ENDPOINT_ID>",
      "url": "https://your-platform.example.com/webhooks/opentrain",
      "eventTypes": ["contract.started", "contract.ended"],
      "status": "ACTIVE",
      "createdAt": "2026-06-12T10:00:00.000Z",
      "consecutiveFailures": 0,
      "disabledAt": null,
      "disabledReason": null
    },
    "requeued": 3,
    "message": "Requeued deliveries will be attempted on the next delivery run (within ~5 minutes)."
  }
  ```
</ResponseExample>
