Replay Webhook Events

Initiates a replay of webhooks that failed to deliver. This is particularly useful when recovering from server downtime or when you need to reprocess events with updated logic.

POSThttps://api.100ms.live/v2/analytics/webhooks/replay
curl --location --request POST \ 'https://api.100ms.live/v2/analytics/webhooks/replay' \ --header 'Authorization: Bearer <management_token>' \ --header 'Content-Type: application/json' \ --data-raw '{ "start_time": "2025-12-28T00:00:00Z", "end_time": "2025-12-29T00:00:00Z", "event_names": ["peer.join.success"] }'

Allowed Filters

To be specified as query parameters

NameTypeDescriptionRequired
start_timestringStart of time range to replay in RFC3339 format (Default: 24 hours ago). Must be within the last 30 days.no
end_timestringEnd of time range to replay in RFC3339 format (Default: Now). Must be after start_time but within 14 days of start time.no
room_idstringUnique identifier of the room you wish to replay webhooks forno
event_namesstring[]Filter by original event types (e.g., peer.join.success)no
limitintMax webhooks to replay (Default: 50000, Max: 50000)no
offsetintSkip first N webhooks for pagination (Default: 0)no
statusstringFilter by delivery status: all, failed, success (Default: failed)no

Response

RESPONSE
Status: 200 OK
{ "workflow_id": "webhook-replay-customer123-a1b2c3d4", "status": "started", "message": "Webhook replay has been queued for processing", "filters": { "start_time": "2025-12-28T00:00:00Z", "end_time": "2025-12-29T00:00:00Z", "room_id": "", "event_types": ["peer.join.success", "peer.leave.success"] } }

Status Values:

StatusDescription
startedWorkflow has been started
already_runningIdentical replay is already in progress

Supported Event Types

You can filter specific webhooks to replay by the following event types:

Event TypeDescription
session.open.successSession started
session.close.successSession ended
peer.join.successPeer joined the room
peer.leave.successPeer left the room
recording.successRecording completed
recording.failedRecording failed
transcription.successTranscription completed
beam.started.successRTMP/HLS streaming started
beam.stopped.successRTMP/HLS streaming stopped
beam.recording.successBrowser recording completed
hls.recording.successHLS recording completed
stream.recording.successStream recording completed

How Replay Works

Once a replay is triggered, the system:

  1. Starts a workflow that fetches webhooks from the database in batches
  2. Each webhook is sent to your configured webhook URL with an is_replay: true flag
  3. Webhook replay events are sent at a rate of 10 events per second to your endpoint
  4. Maximum 50,000 webhooks are supported per replay request
  5. Duplicate replay requests with identical filters will automatically reuse the existing workflow

Note: Ensure your webhook endpoints are scaled appropriately before triggering the replay API to handle the incoming event rate.

Pagination for Large Replays

For replays with more than 50,000 webhooks, use pagination by making multiple requests with different offsets:

# First batch (0-50,000) curl --location --request POST \ 'https://api.100ms.live/v2/analytics/webhooks/replay' \ --header 'Authorization: Bearer <management_token>' \ --header 'Content-Type: application/json' \ --data-raw '{ "start_time": "2025-12-28T00:00:00Z", "limit": 50000, "offset": 0 }' # Second batch (50,000-100,000) - Run after first completes curl --location --request POST \ 'https://api.100ms.live/v2/analytics/events/webhooks/replay' \ --header 'Authorization: Bearer <management_token>' \ --header 'Content-Type: application/json' \ --data-raw '{ "start_time": "2025-12-28T00:00:00Z", "limit": 50000, "offset": 50000 }'

Error Responses

Error CodeMessageDescription
400start_time must be within the last 30 daysInvalid time range parameters
400end_time must be within 14 days after start_timeInvalid time range parameters
403insufficient permissionsUnauthorized access or invalid management token
404workflow not foundThe specified workflow ID does not exist
429rate limit exceeded, retry after 45 secondsToo many requests, rate limit exceeded
503webhook replay service unavailableService is temporarily unavailable

Why would you use this API?

  • Recover from downtime: Replay failed webhooks after your server recovers from an outage or maintenance period
  • Reprocess events: Replay specific event types following bug fixes, data corrections, or logic updates in your webhook handler

Check Replay Results

Monitor the status and progress of a webhook replay workflow.

GEThttps://api.100ms.live/v2/analytics/webhooks/replay/{workflow_id}
curl --location --request GET \ 'https://api.100ms.live/v2/analytics/webhooks/replay/webhook-replay-customer123-a1b2c3d4' \ --header 'Authorization: Bearer <management_token>'

Allowed Filters

To be specified as query parameters

NameTypeDescriptionRequired
workflow_idstringThe workflow ID returned from POST /webhooks/replayyes

Response

RESPONSE
Status: 200 OK
{ "workflow_id": "webhook-replay-customer123-a1b2c3d4", "status": "completed", "started_at": "2025-12-29T10:00:00Z", "completed_at": "2025-12-29T10:15:00Z", "filters": { "start_time": "2025-12-28T00:00:00Z", "end_time": "2025-12-29T00:00:00Z", "room_id": "", "event_types": ["peer.join.success"], "limit": 50000, "offset": 0 }, "progress": { "total": 150, "completed": 148, "failed": 2 }, "result": { "total": 150, "completed": 148, "failed": 2, "failed_events": ["event-id-1", "event-id-2"] } }

Status Values:

StatusDescription
RunningWorkflow is currently processing webhooks
completedAll webhooks replayed successfully
completed_with_failuresReplay finished but some webhooks failed
failedAll webhooks failed to replay
CanceledWorkflow was canceled
TerminatedWorkflow was terminated

Why would you use this API?

  • Track workflow progress: Monitor the total number of events queued for replay, completion counts, and failure rates in real-time
  • Analyze failure statistics: Retrieve a detailed list of webhook events that failed to replay within the current workflow for troubleshooting

Postman collection

You can use our Postman collection to start exploring 100ms APIs.

Run in Postman

Refer to the Postman guide to get started with 100ms API collection.


Have a suggestion? Recommend changes ->

Run in postman

Was this helpful?

1234