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
| Feature | Free | Starter | Pro | Enterprise |
|---|---|---|---|---|
| Replay by event_ids | ✓ | ✓ | ✓ | ✓ |
| Replay with filters (date range, type) | ✗ | ✗ | ✓ | ✓ |
| Concurrent replay jobs | 1 | 2 | 5 | Custom |
All plans can replay specific events by providing event_ids. Filter-based replay (by date range, event type, or account) requires Pro or Enterprise.
/v1/replayCreate 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
| Field | Type | Required | Description |
|---|---|---|---|
webhook_id | string | Required | The webhook to deliver replay events to |
event_ids | string[] | Optional | Specific event IDs to replay. Use this OR filters. |
filters | object | Optional | Filter-based selection (Pro+ only). Use this OR event_ids. |
filters.event_types | string[] | Optional | Only replay events of these types |
filters.since | ISO timestamp | Optional | Replay events created after this time |
filters.until | ISO timestamp | Optional | Replay events created before this time |
filters.accounts | string[] | Optional | Only 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"
}/v1/replay/:job_idCheck the status and progress of a replay job. Poll this endpoint to track completion.
Job statuses
| Status | Description |
|---|---|
| queued | Job has been created and is waiting to start |
| running | Replay is in progress — events are being re-delivered |
| completed | All events have been queued for delivery |
| cancelled | Job was cancelled via the DELETE endpoint before completion |
| failed | Job 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
}/v1/replay/:job_idCancel 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"
}