---
title: "Add events to existing session replay"
method: POST
path: "/_temps/session-replay/events"
tags: ["Analytics"]
---

# Add events to existing session replay

`POST /_temps/session-replay/events`

## Request

- Base URL: `/api` (relative, and the document was published on a file host, not at the API’s origin)
- URL: `/api/_temps/session-replay/events`
- Auth: none declared

## Query parameters

- `temps_key` string

## Headers

- `x-temps-analytics-key` string, nullable

## Request body

- SessionReplayEventsRequest
  - `batchId` string, nullable: Client-generated id, stable across retries of the same batch. When present the append is idempotent; omitted, delivery is at-least-once.
  - `events` string, required
  - `sessionId` string, required

## Response `200`

Events added successfully

- AddEventsResponse
  - `event_count` integer, required
  - `message` string, required

## Other responses

- `400`: Bad request
- `403`: The project tracks visitors cookieless, so replay data is not stored
- `404`: Session not found
- `500`: Internal server error

## Changes

- **2026-11-20** `1a920722ba7e`: 1 info
  - added the non-success response with the status `403`
- **2026-09-07** `c2a1f69745e7`: 2 info
  - added the new optional `header` request parameter `x-temps-analytics-key`
  - added the new optional `query` request parameter `temps_key`
- **2026-09-07** `7a3103561bd0`: 2 warning
  - deleted the `header` request parameter `x-temps-analytics-key`
  - deleted the `query` request parameter `temps_key`
- **2026-09-07** `7fcff272f099`: 2 info
  - added the new optional `header` request parameter `x-temps-analytics-key`
  - added the new optional `query` request parameter `temps_key`
- **2026-09-07** `c1fa498b6377`: 2 warning
  - deleted the `header` request parameter `x-temps-analytics-key`
  - deleted the `query` request parameter `temps_key`

[Operation history](https://skmtc.dev/gotempsh/apis/temps/changes/_temps/session-replay/events/post.md)

---

[API](https://skmtc.dev/gotempsh/apis/temps.md) - [All operations](https://skmtc.dev/gotempsh/apis/temps/llms.txt) - [OpenAPI document](https://skmtc.dev/gotempsh/apis/temps/revisions/3b040526eb43?raw)
