Skip to main content
npayload is launching soon.
npayloadDocs
API ReferenceMessages

Replay messages

Re-deliver messages from a time range to one or all subscriptions. Useful for recovery scenarios.

POST/v1/channels/{channelId}/replay

Authorization

ApiKeyAuth
AuthorizationBearer <token>

API key authentication. Keys are prefixed with environment:

  • npk_live_ for production
  • npk_test_ for testing/staging

In: header

Path Parameters

channelId*string

Channel ID

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

curl -X POST "https://api.npayload.com/v1/channels/string/replay" \  -H "Content-Type: application/json" \  -d '{    "since": "2024-01-01T00:00:00Z",    "until": "2024-01-02T00:00:00Z",    "subscriptionId": "sub_xyz789"  }'
{
  "replayId": "string",
  "messageCount": 0,
  "status": "queued"
}
{
  "error": {
    "code": "INVALID_REQUEST",
    "message": "Validation failed",
    "details": {
      "field": "name",
      "reason": "Name is required"
    }
  }
}
{
  "error": {
    "code": "UNAUTHORIZED",
    "message": "Invalid or missing API key"
  }
}

Was this page helpful?