Skip to main content
API Reference

Replay API

The Replay API lets you re-deliver past XRPL events to a webhook endpoint. Use it to recover from downtime, backfill a new data store, or test your event handling code against real historical data.

Common use cases

Recover from downtime

Your endpoint was unreachable for a period. Replay missed events to catch up without gaps in your data.

Test event handling

Re-deliver specific historical events to test how your code handles edge cases or new logic you've added.

Backfill new data stores

Added a new webhook or database? Replay past events to populate it without needing direct XRPL access.

Quota usage: Replay events count against your plan's monthly delivery quota. Large filter-based replays may generate thousands of deliveries. Large replay jobs may take several minutes to complete.

Plan availability

FeatureFreeStarterProEnterprise
Replay by event_ids
Replay with filters (date range, type)
Concurrent replay jobs125Custom

All plans can replay specific events by providing event_ids. Filter-based replay (by date range, event type, or account) requires Pro or Enterprise.

POST/v1/replay

Create a new replay job. You can specify exact event IDs to replay, or use filters to select events by type, account, or time range. The two modes are mutually exclusive.

Request body

FieldTypeRequiredDescription
webhook_idstringRequiredThe webhook to deliver replay events to
event_idsstring[]OptionalSpecific event IDs to replay. Use this OR filters.
filtersobjectOptionalFilter-based selection (Pro+ only). Use this OR event_ids.
filters.event_typesstring[]OptionalOnly replay events of these types
filters.sinceISO timestampOptionalReplay events created after this time
filters.untilISO timestampOptionalReplay events created before this time
filters.accountsstring[]OptionalOnly replay events involving these XRPL accounts

Request — replay by event IDs (all plans)

curl -X POST https://api.xrnotify.io/v1/replay \
  -H "X-XRNotify-Key: xrn_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "webhook_id": "wh_abc123",
    "event_ids": [
      "xrpl:89547832:A4B2F1:payment.xrp",
      "xrpl:89547900:C3D5E2:nft.minted:0"
    ]
  }'

Request — replay with filters (Pro+)

curl -X POST https://api.xrnotify.io/v1/replay \
  -H "X-XRNotify-Key: xrn_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "webhook_id": "wh_abc123",
    "filters": {
      "event_types": ["payment.xrp"],
      "since": "2024-01-01T00:00:00Z",
      "until": "2024-01-02T00:00:00Z",
      "accounts": ["rPT1Sjq2YGrBMTttX4GZHjKu9dyfzbpAYe"]
    }
  }'

Response 202 Accepted

{
  "job_id": "rpl_job_xyz123",
  "status": "queued",
  "webhook_id": "wh_abc123",
  "estimated_events": 150,
  "created_at": "2024-01-15T12:00:00Z"
}
GET/v1/replay/:job_id

Check the status and progress of a replay job. Poll this endpoint to track completion.

Job statuses

StatusDescription
queuedJob has been created and is waiting to start
runningReplay is in progress — events are being re-delivered
completedAll events have been queued for delivery
cancelledJob was cancelled via the DELETE endpoint before completion
failedJob encountered an unrecoverable error. Contact support.

Request

curl https://api.xrnotify.io/v1/replay/rpl_job_xyz123 \
  -H "X-XRNotify-Key: xrn_live_..."

Response 200 OK

{
  "job_id": "rpl_job_xyz123",
  "status": "running",
  "webhook_id": "wh_abc123",
  "total_events": 150,
  "processed_events": 87,
  "failed_events": 2,
  "created_at": "2024-01-15T12:00:00Z",
  "completed_at": null
}
DELETE/v1/replay/:job_id

Cancel a replay job. Only jobs with status queued or running can be cancelled. Events that have already been queued for delivery before cancellation may still be delivered.

Note: Cancelling a replay job stops future event processing, but deliveries that are already in-flight will not be recalled. Check the processed_events count to understand how many events were sent before cancellation.

Request

curl -X DELETE \
  https://api.xrnotify.io/v1/replay/rpl_job_xyz123 \
  -H "X-XRNotify-Key: xrn_live_..."

Response 200 OK

{
  "job_id": "rpl_job_xyz123",
  "status": "cancelled",
  "processed_events": 87,
  "cancelled_at": "2024-01-15T12:03:42Z"
}

Related