Overview
The Session Replay API handles uploading and retrieving session recordings. Replays are captured by the browser SDK using rrweb and sent to Proliferate when an error occurs.Authentication
Replay ingestion uses API key in payload authentication. Replay retrieval uses session-based authentication. See Authentication for details.Upload Session Replay
Upload a complete session replay associated with an error event.Endpoint
Request Schema
Your project API key (format:
pk_...)Session identifier (generated by SDK)
Window identifier for multi-tab tracking
Event ID of the error that triggered this replay
Start timestamp in milliseconds (Unix epoch)
End timestamp in milliseconds (Unix epoch)
Total duration in milliseconds
Number of rrweb events
Total size in bytes
Whether the replay contains a full DOM snapshot (required for playback)
Array of rrweb events (DOM snapshots, mutations, interactions)
Response
Success (202 Accepted):Upload Chunked Replay
For large replays, the SDK splits the data into chunks and uploads them separately.Endpoint
Request Schema
Your project API key
Session identifier
Window identifier
Error event ID
Zero-based index of this chunk (0, 1, 2, …)
Total number of chunks
rrweb events for this chunk
Full replay metadata (required on first chunk,
chunk_index=0)Response
Chunk Received (202 Accepted):Get Replay by ID
Retrieve a session replay by its ID.Newer replays are stored in S3 and provide an
events_url for efficient fetching. Older replays may have events stored inline.Get Replay for Error Event
Retrieve the session replay associated with a specific error event.null if no replay exists for this error.
List Replays for Project
List all replays for a project.Max replays to return
Pagination offset
How Replays Work
1
SDK Starts Recording
The browser SDK uses rrweb to record DOM snapshots and mutations in a ring buffer
2
Error Occurs
When an error is captured, the SDK packages the recent replay events
3
Upload Triggered
The replay is uploaded along with (or immediately after) the error event
4
Stored for Playback
The replay is stored in S3 (or database for small replays) and linked to the error
5
View in Dashboard
View the error in the dashboard and watch the replay to see what happened
rrweb Event Types
Replays use rrweb’s event format:| Type | Description |
|---|---|
| 0 | DOM Content Loaded |
| 1 | Load |
| 2 | Full Snapshot |
| 3 | Incremental Snapshot (mutations) |
| 4 | Meta (viewport, timestamp) |
| 5 | Custom Event |
Ring Buffer
The SDK maintains a ring buffer of replay events:- Max time: Default 5 minutes
- Max events: Default 10,000 events
- Max size: Default 5MB
Storage
- Small replays (under 1MB): Stored inline in PostgreSQL
- Large replays (over 1MB): Stored in S3, retrieved via presigned URL
- Check if
events_urlis present - If yes, fetch events from the presigned URL
- If no, use the inline
eventsarray
Privacy Considerations
Replays respect privacy settings configured in the SDK:- Inputs masked by default: Input values are replaced with
*** - Block elements: Elements with
blockClassare not recorded - Mask text: Elements with
maskTextClasshave text replaced - Canvas recording disabled: Canvas elements are not captured by default
Best Practices
Enable Selectively
Only enable session replay for errors, not all sessions:Respect Privacy
Configure privacy settings appropriately:Monitor Buffer Size
Large ring buffers consume memory. Adjust based on your needs:Test Playback
Verify replays work correctly:- Trigger a test error
- View the error in the dashboard
- Watch the replay to ensure it captured the expected activity

