Skip to main content
POST
/
api
/
sdk
/
replay
Submit a replay batch
curl --request POST \
  --url https://batch-jobs-lucent.onrender.com/api/sdk/replay \
  --header 'Content-Type: application/json' \
  --header 'X-Lucent-Api-Key: <api-key>' \
  --data '
{
  "session": {
    "id": "<string>",
    "windowId": "<string>",
    "startedAt": 123,
    "lastActivityAt": 123,
    "url": "<string>"
  },
  "user": {
    "anonymousId": "<string>",
    "id": "<string>",
    "properties": {}
  },
  "page": {
    "url": "<string>",
    "referrer": "<string>",
    "viewport": {
      "width": 123,
      "height": 123
    }
  },
  "replay": {
    "events": [
      {
        "timestamp": 123,
        "type": 123,
        "data": "<unknown>"
      }
    ],
    "sequence": 1
  },
  "metadata": {
    "userAgent": "<string>",
    "language": "<string>"
  },
  "flush": "normal"
}
'
{
  "ok": true
}

Authorizations

X-Lucent-Api-Key
string
header
required

Public key prefixed with luc_pk_. Safe to expose in client-side code. For navigator.sendBeacon callers that cannot set headers, the key may also be passed as the api_key query parameter.

Body

application/json
session
object
required
user
object
required
page
object
required
replay
object
required
metadata
object
flush
enum<string>
default:normal

final tells the server this is the last batch for the session — typically sent from a beforeunload handler. final batches trigger immediate session processing.

Available options:
normal,
final

Response

Batch accepted.

ok
boolean
required