POST /api/v1/webhook-deliveries/{deliveryId}/replay
Creates a new delivery of the same event, to the same subscription, with the
same eventId — so a receiver that deduplicates on it stays safe. Only a
finished delivery can be replayed: succeeded or exhausted. No new domain
event is created.
| Role in the organization | This endpoint |
|---|---|
OWNER | Allowed |
ADMIN | Allowed |
MEMBER | Refused — 403 |
| Requirement | Rule for this endpoint |
|---|---|
| Business role | None beyond the organization role |
| Resource scope | The delivery belongs to the key's organization |
| Participation | None |
| Resource state | succeeded or exhausted |
| Parameter | Type | Required | Description |
|---|---|---|---|
deliveryId | UUID | yes | Webhook delivery of the key's organization |
| Header | Required | Description |
|---|---|---|
x-api-key | yes | API key created for this organization |
Idempotency-Key | yes | Stable key for this command; a replay returns the first result |
X-Correlation-Id | no | Caller correlation id, returned or generated |
| Field | Type | Required | Nullable | Description |
|---|---|---|---|---|
reason | string | yes | no | Why you replay, 3 to 500 characters, trimmed |
{"reason": "Receiver was down during the 2026-09-21 incident"}curl -X POST "$COHORTE_API_BASE_URL/api/v1/webhook-deliveries/$DELIVERY_ID/replay" \
-H "x-api-key: $COHORTE_API_KEY" \
-H "Idempotency-Key: replay-8c2d4e6f-001" \
-H "Content-Type: application/json" \
-d '{"reason":"Receiver was down during the 2026-09-21 incident"}'201 Created — the new delivery was created, replayed: false.200 OK — the same Idempotency-Key returned the delivery created the first time, replayed: true.400 Bad Request — invalid_request: missing Idempotency-Key, invalid JSON, or reason out of bounds; details names the field.401 Unauthorized — unauthorized: the key is missing, invalid, expired or no longer attached to a member.403 Forbidden — forbidden: the bearer is not OWNER or ADMIN.404 Not Found — not_found: the delivery is unknown or belongs to another organization.409 Conflict — conflict: the delivery is still pending, delivering or retry_scheduled.500 Internal Server Error — internal_error: unexpected failure.| Field | Type | Nullable | Description |
|---|---|---|---|
success | boolean | no | true for a successful request |
replayed | boolean | no | true when the idempotency key was already used |
data.id | UUID | no | Delivery identifier |
data.subscriptionId | UUID | no | Subscription the delivery targets |
data.eventId | UUID | no | Event identifier, identical across retries and replays; deduplicate on it |
data.eventName | string | no | Event name, for example enrollment.created |
data.subjectType | string | no | Kind of resource the event is about |
data.subjectId | string | no | Identifier of that resource |
data.correlationId | string | no | Correlation id of the originating command, or of the replay request |
data.occurredAt | ISO 8601 string | no | When the event happened, in UTC |
data.status | string | no | pending, delivering, retry_scheduled, succeeded or exhausted |
data.attemptCount | integer | no | Attempts made so far, up to 5 |
data.nextAttemptAt | ISO 8601 string | yes | Next scheduled attempt, in UTC; null once terminal |
data.lastStatusCode | integer | yes | HTTP status of the last attempt; null if no answer was received |
data.lastError | string | yes | http_error, redirect_refused, network_error or delivery_error; null after a success |
data.replayOfDeliveryId | UUID | yes | Original delivery when this one is a replay |
data.createdAt | ISO 8601 string | no | Creation time, in UTC |
data.updatedAt | ISO 8601 string | no | Last change, in UTC |
correlationId | string | no | Correlation id for support |
{
"success": true,
"replayed": false,
"data": {
"id": "c3d4e5f6-a7b8-4c9d-8e0f-2a3b4c5d6e7f",
"subscriptionId": "6b1e2c3d-4f50-4a61-8b72-93a4b5c6d7e8",
"eventId": "0e4f8a2b-6c1d-4e3f-9a5b-7c8d9e0f1a2b",
"eventName": "enrollment.created",
"subjectType": "Enrollment",
"subjectId": "2f6a9c3e-1b4d-4a7e-8c0f-5d2e6b9a1c3f",
"correlationId": "d4e5f6a7-b8c9-4d0e-9f1a-3b4c5d6e7f8a",
"occurredAt": "2026-09-21T10:00:00.000Z",
"status": "pending",
"attemptCount": 0,
"nextAttemptAt": "2026-09-22T09:00:00.000Z",
"lastStatusCode": null,
"lastError": null,
"replayOfDeliveryId": "8c2d4e6f-0a1b-4c3d-9e5f-7a8b9c0d1e2f",
"createdAt": "2026-09-22T09:00:00.000Z",
"updatedAt": "2026-09-22T09:00:00.000Z"
},
"correlationId": "d4e5f6a7-b8c9-4d0e-9f1a-3b4c5d6e7f8a"
}pending with its own attempt counter and is sent
on the next delivery cycle, only while the subscription is active.data.id is the new delivery; data.replayOfDeliveryId points to the one you
replayed. The reason is recorded in the organization's audit trail.Idempotency-Key returns the first replay and creates
no second delivery.