Skip to main content

Replay API

Replay recreates delivery of an event from retained payload/context. Replay differs from Retry — retry re-attempts delivery to the original target, while replay can deliver to the same or different target using the retained payload.

Status: WIRED_SANDBOX. This page describes the current contract surface and known non-claims. It is not a production-live availability claim.

Audience

Customer / developer recovering deliveries from retained payload.

Important caveat

Replay requires retained payload/context. If the payload has exceeded the retention window or was never retained, replay is not available.

PlanRetentionReplay availability
Free7 days3-day basic DLQ/replay
Pro30 days7-day advanced
BusinessLonger30+ days
EnterpriseCustomCustom

Endpoint table

MethodPathDescriptionRead/WriteStatusAuth/scopesIdempotencyOpenAPI
POST/tenants/{tid}/deliveries/{did}/replayReplay a single deliveryWrite (gated)WIRED_SANDBOXwrite:deliveriesSupportedPartial
POST/tenants/{tid}/replay/batchBatch replayWrite (gated)PLANNEDwrite:deliveriesSupportedNot covered

Read/write status

OperationReadWriteStatus
Replay single deliveryYes (gated)WIRED_SANDBOX
Batch replayPlannedPLANNED

Read support for replay eligibility/context is available through the Delivery Attempts API. Write (replay) is gated by retained payload/context availability and plan-based retention limits. Replay requires tenant authorization and audit logging.

See Write Safety Model for details.

Single replay

curl -X POST \
-H "Authorization: Bearer <api_key>" \
-H "Idempotency-Key: <unique_key>" \
"https://api.zen-mesh.io/v1/tenants/<tenant_id>/deliveries/<delivery_id>/replay"

Request body:

{
"delivery_id": "del_abc123"
}

Response:

{
"status": "queued",
"delivery_id": "del_abc123",
"message": "Replay initiated from retained payload"
}

Error examples

400 Retained payload unavailable

{
"type": "https://api.zen-mesh.io/errors/validation-error",
"title": "Validation Error",
"status": 400,
"detail": "Retained payload for delivery del_abc123 is no longer available (retention exceeded).",
"instance": "req_abc123"
}

403 Insufficient scope

{
"type": "https://api.zen-mesh.io/errors/insufficient-scope",
"title": "Insufficient Scope",
"status": 403,
"detail": "API key does not have write:deliveries scope.",
"required_scope": "write:deliveries"
}

404 Delivery not found

{
"type": "https://api.zen-mesh.io/errors/not-found",
"title": "Not Found",
"status": 404,
"detail": "Delivery del_abc123 not found.",
"instance": "req_abc123"
}

Auth

Bearer JWT or API key in Authorization header. Tenant-scoped via path parameter. Write operations require write:deliveries scope. See Authentication for scope model.

OpenAPI coverage

Single replay partially covered in zen-back.v1.yaml. Batch replay not covered. See OpenAPI Spec Index.

UI mapping

Traffic → Replay

Non-claims

  • WIRED_SANDBOX: implemented in local/sandbox runtime. Not production-live.
  • Replay is gated by retained payload/context availability.
  • Batch and dry-run replay are planned (post-V1), not available.
  • Replay respects retention and plan limits — expired payloads cannot be replayed.
  • Saved payload templates are not production retained payloads.