> For the complete documentation index, see [llms.txt](https://peoplescourt.ai/llms.txt). This page is also available as Markdown.

# Request another delivery of an existing logical event

Partner platforms: requires a partner key with callbacks:manage and the platform_orchestrator role. Replay an existing logical event as a new delivery. All results are tenant scoped.

Reference

Webhooks

POST

live

`/api/webhooks/deliveries/{id}/replay`

`replayWebhookDelivery`

## Authentication and authority

Send one of the allowed bearer credential roles. Alternatives are OR; credentials named within one alternative are AND.

`platformOrchestratorBearer`

Credential bound to the platform_orchestrator role.

## Parameters

Name

Location

Requirement

Schema

`id`

path

Required

{"type":"string"}

`Idempotency-Key`

header

Required

{"type":"string","minLength":8,"maxLength":200}

## Request body

Required request body.

application/json

```json
{
  "type": "object",
  "additionalProperties": false
}
```

## Responses

### 201

New delivery for the existing logical event.

application/json

```json
{
  "type": "object",
  "required": [
    "data",
    "requestId"
  ],
  "properties": {
    "data": {
      "$ref": "#/components/schemas/PartnerWebhookDelivery",
      "type": "object",
      "additionalProperties": false,
      "required": [
        "eventId",
        "deliveryId",
        "sequence",
        "caseId",
        "type",
        "occurredAt",
        "status",
        "attempts",
        "deliveryAttempts"
      ],
      "properties": {
        "caseEvent": {
          "$ref": "#/components/schemas/CanonicalCaseEvent",
          "type": "object",
          "additionalProperties": false,
          "required": [
            "schemaVersion",
            "id",
            "cursor",
            "type",
            "occurredAt"
          ],
          "properties": {
            "schemaVersion": {
              "type": "string",
              "const": "case-event-v1"
            },
            "id": {
              "type": "string"
            },
            "cursor": {
              "type": "string",
              "description": "Opaque cursor identifying a position in the case event stream. Never interpret or compare cursor text."
            },
            "label": {
              "type": "string",
              "description": "Party-facing label for the event."
            },
            "type": {
              "type": "string"
            },
            "occurredAt": {
              "type": "string",
              "format": "date-time"
            }
          }
        },
        "eventId": {
          "type": "string"
        },
        "deliveryId": {
          "type": "string"
        },
        "sequence": {
          "type": "integer",
          "minimum": 1
        },
        "caseId": {
          "type": "string"
        },
        "type": {
          "type": "string"
        },
        "occurredAt": {
          "type": "string",
          "format": "date-time"
        },
        "endpointId": {
          "type": "string"
        },
        "status": {
          "type": "string",
          "enum": [
            "pending",
            "sending",
            "delivered",
            "failed",
            "suppressed",
            "dead_letter"
          ]
        },
        "attempts": {
          "type": "integer",
          "minimum": 0
        },
        "nextAttemptAt": {
          "type": "string",
          "format": "date-time"
        },
        "deadLetteredAt": {
          "type": "string",
          "format": "date-time"
        },
        "replayOfDeliveryId": {
          "type": "string"
        },
        "deliveredAt": {
          "type": "string",
          "format": "date-time"
        },
        "lastError": {
          "type": "string"
        },
        "deliveryAttempts": {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/PartnerWebhookDeliveryAttempt",
            "type": "object",
            "additionalProperties": false,
            "required": [
              "attemptNumber",
              "status",
              "keyId",
              "signedAt"
            ],
            "properties": {
              "attemptNumber": {
                "type": "integer",
                "minimum": 1
              },
              "status": {
                "type": "string",
                "enum": [
                  "prepared",
                  "delivered",
                  "retryable_failure",
                  "terminal_failure"
                ]
              },
              "responseStatus": {
                "type": "integer"
              },
              "errorCode": {
                "type": "string"
              },
              "keyId": {
                "type": "string"
              },
              "signedAt": {
                "type": "string",
                "format": "date-time"
              },
              "completedAt": {
                "type": "string",
                "format": "date-time"
              }
            }
          }
        }
      }
    },
    "requestId": {
      "type": "string"
    }
  }
}
```

### default

RFC 9457 style problem response.

application/problem+json

```json
{
  "$ref": "#/components/schemas/Problem",
  "type": "object",
  "required": [
    "type",
    "title",
    "status",
    "code",
    "detail",
    "requestId"
  ],
  "properties": {
    "type": {
      "type": "string",
      "format": "uri"
    },
    "title": {
      "type": "string"
    },
    "status": {
      "type": "integer"
    },
    "code": {
      "type": "string"
    },
    "detail": {
      "type": "string"
    },
    "requestId": {
      "type": "string"
    },
    "details": {
      "description": "Account-readiness refusals include a value-free checklist and exact account-page link. Other error codes may provide different details.",
      "anyOf": [
        {
          "$ref": "#/components/schemas/AccountReadinessDetails",
          "type": "object",
          "additionalProperties": false,
          "required": [
            "ready",
            "accountSetupUrl",
            "missing"
          ],
          "properties": {
            "ready": {
              "type": "boolean"
            },
            "accountSetupUrl": {
              "type": "string",
              "format": "uri"
            },
            "missing": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/AccountReadinessRequirement",
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "code",
                  "label",
                  "section",
                  "accountUrl"
                ],
                "properties": {
                  "code": {
                    "type": "string"
                  },
                  "label": {
                    "type": "string"
                  },
                  "section": {
                    "type": "string",
                    "enum": [
                      "email",
                      "identity",
                      "legal_documents"
                    ]
                  },
                  "accountUrl": {
                    "type": "string",
                    "format": "uri"
                  }
                }
              }
            }
          }
        },
        {
          "$ref": "#/components/schemas/LegalDocumentsRequiredDetails",
          "type": "object",
          "additionalProperties": false,
          "required": [
            "legalDocumentsUrl"
          ],
          "properties": {
            "legalDocumentsUrl": {
              "type": "string",
              "format": "uri",
              "description": "Absolute account-page URL where the person reviews and accepts the current Terms and Privacy Notice. Uses the configured public application origin. After accepting the documents, retry the original operation."
            },
            "ready": {
              "type": "boolean"
            },
            "accountSetupUrl": {
              "type": "string",
              "format": "uri"
            },
            "missing": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/AccountReadinessRequirement",
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "code",
                  "label",
                  "section",
                  "accountUrl"
                ],
                "properties": {
                  "code": {
                    "type": "string"
                  },
                  "label": {
                    "type": "string"
                  },
                  "section": {
                    "type": "string",
                    "enum": [
                      "email",
                      "identity",
                      "legal_documents"
                    ]
                  },
                  "accountUrl": {
                    "type": "string",
                    "format": "uri"
                  }
                }
              }
            }
          }
        },
        {}
      ]
    }
  }
}
```

## Example response

### Successful response

```json
{
  "data": {
    "eventId": "event_test_123",
    "deliveryId": "delivery_test_123",
    "sequence": 1,
    "caseId": "pcase_test_123",
    "type": "type_test",
    "occurredAt": "2026-08-09T12:00:00.000Z",
    "status": "pending",
    "attempts": 1,
    "deliveryAttempts": [
      {
        "attemptNumber": 1,
        "status": "prepared",
        "keyId": "keyId_test",
        "signedAt": "2026-08-09T12:00:00.000Z"
      }
    ]
  },
  "requestId": "requestId_test"
}
```

## Errors

Read the response status and stable error code. See [errors](https://peoplescourt.ai/docs/api/errors.md) and [rate limits](https://peoplescourt.ai/docs/api/rate-limits.md) for recovery. Refresh the resource before resolving a state or digest conflict.

## Idempotency and retries

- For throttling, honor Retry-After when present. Back off on retryable server failures.
- Send a unique Idempotency-Key. An exact retry returns the stored result; reusing the key with a different request fails.
- The request is accepted only when its credential, authority, case state, and resource preconditions are satisfied.

## Request examples

Use `https://peoplescourt.ai` with the test credential issued for your integration.

```sh
curl --request POST \
  --url 'https://peoplescourt.ai/api/webhooks/deliveries/delivery_test_123/replay' \
  --header 'Authorization: Bearer pk_test_replace_me' \
  --header 'Idempotency-Key: idem_test_12345678' \
  --header 'Content-Type: application/json' \
  --data '{}'
```

```ts
const input = {};

const response = await fetch("https://peoplescourt.ai/api/webhooks/deliveries/delivery_test_123/replay", {
  method: "POST",
  headers: {
    "Authorization": "Bearer pk_test_replace_me",
    "Idempotency-Key": "idem_test_12345678",
    "Content-Type": "application/json"
  },
  body: JSON.stringify(input),
});
if (!response.ok) throw await response.json();
const result = await response.json();
```

```python
import requests

response = requests.post(
    "https://peoplescourt.ai/api/webhooks/deliveries/delivery_test_123/replay",
    headers={
      "Authorization": "Bearer pk_test_replace_me",
      "Idempotency-Key": "idem_test_12345678",
      "Content-Type": "application/json"
    },
    json={},
    timeout=30,
)
response.raise_for_status()
result = response.json()
```
