---
title: "Redrive (re-enqueue) failed webhook deliveries"
method: POST
path: "/api/v1/webhooks/{id}/deliveries/redrive"
tags: ["Webhooks"]
---

# Redrive (re-enqueue) failed webhook deliveries

`POST /api/v1/webhooks/{id}/deliveries/redrive`

## Request

- Base URL: `https://legal.nexusquantum.legal`
- URL: `https://legal.nexusquantum.legal/api/v1/webhooks/{id}/deliveries/redrive`
- Auth: HTTP bearer

Re-enqueues `failed`/`exhausted` deliveries of a webhook endpoint. OPS action: only the **master** of the owning organization (or the solo owner of an account with no org) can trigger it; a `child` sub-key → `403 FORBIDDEN`.

Body: `{ delivery_id }` re-enqueues one specific delivery, or `{ redrive_all_failed: true }` re-enqueues ALL of the endpoint's failed/exhausted deliveries (cap 100).

Semantics: only `failed`/`exhausted` rows whose payload is still retained are re-enqueued → `status`→`pending`, `attempts`→0, `next_retry_at`→now(), `last_error`→null. The `event_id`/`payload.id` does NOT change (the SIEM keeps deduplicating). After the reset a best-effort immediate delivery is fired; the cron picks up whatever stays pending.

Zero-Retention: a `success` delivery already has its payload redacted (`{redacted:true}`) → nothing to resend → `409 PAYLOAD_REDACTED`. A status that cannot be re-enqueued → `409 NOT_REDRIVABLE`. Uniform anti-enumeration 404 (does not exist OR is not yours).

## Path parameters

- `id` string, uuid, required

## Request body

- object
  - `delivery_id` string, uuid: Re-enqueues this specific delivery.
  - `redrive_all_failed` boolean: If `true`, re-enqueues ALL of the endpoint's failed/exhausted deliveries (cap 100).

## Response `202`

Deliveries re-enqueued.

- RedriveResult: Result of `POST /api/v1/webhooks/{id}/deliveries/redrive` (HTTP 202). Only `failed`/`exhausted` deliveries with a still-retained payload are re-enqueued (status→pending, attempts→0); `event_id`/`payload.id` are preserved so SIEM dedupe stays intact.
  - `redriven` integer, required: Number of deliveries re-enqueued.
  - `delivery_ids` string[], required: Ids of the re-enqueued deliveries.
  - `skipped_redacted` integer: Batch mode only: rows skipped because their payload was already redacted (Zero-Retention).
  - `capped` boolean: Batch mode only: true when the batch hit the cap (100) and more may remain.
  - `requestId` string

## Other responses

- `400`: VALIDATION_ERROR — missing `delivery_id`/`redrive_all_failed`, or invalid JSON.
- `403`: FORBIDDEN — redrive is restricted to the master key (child → 403).
- `404`: NOT_FOUND — webhook or delivery does not exist, or is not owned by the caller (indistinguishable by design).
- `409`: State conflict. `ENDPOINT_INACTIVE` (the webhook endpoint is `active=false` — reactivate it before redriving) · `PAYLOAD_REDACTED` (payload redacted after a successful delivery — nothing to resend) · `NOT_REDRIVABLE` (status cannot be re-enqueued) · `REDRIVE_CONFLICT` (the delivery changed state between the read and the conditional update — 0 rows affected, retry).
- `429`: REDRIVE_COOLDOWN — per-endpoint cooldown after a recent `redrive_all_failed`. Retry after the `Retry-After` header (seconds).

---

[API](https://skmtc.dev/nexusquantum/apis/nexus-legal-api.md) · [All operations](https://skmtc.dev/nexusquantum/apis/nexus-legal-api/llms.txt) · [OpenAPI document](https://skmtc.dev/nexusquantum/apis/nexus-legal-api/revisions/4084d8d4eb0b?raw)
