---
title: "Add events to an existing session"
method: POST
path: "/visitors/{visitor_id}/session-replays/{session_id}/events"
tags: ["Analytics"]
---

# Add events to an existing session

`POST /visitors/{visitor_id}/session-replays/{session_id}/events`

## Request

- Base URL: `/api` (relative, and the document was published on a file host, not at the API’s origin)
- URL: `/api/visitors/{visitor_id}/session-replays/{session_id}/events`
- Auth: HTTP bearer

## Path parameters

- `visitor_id` integer, required
- `session_id` string, required

## Request body

- AddEventsRequest
  - `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

## Response `200`

Events added successfully

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

## Other responses

- `400`: Bad request
- `401`: Authentication required
- `403`: Insufficient permissions
- `404`: Session not found
- `500`: Internal server error

## Changes

- **2026-09-07** `943f7f929e7c`: 1 info
  - added the new optional request property `batchId`
- **2026-09-07** `f7404eb7ac98`: 1 warning
  - removed the request property `batchId`
- **2026-08-21** `b871f6bff9d7`: 1 info
  - added the new optional request property `batchId`
- **2026-08-21** `749d286f4b76`: 1 warning
  - removed the request property `batchId`
- **2026-08-20** `de2c869fd879`: 1 info
  - added the new optional request property `batchId`

[Operation history](https://skmtc.dev/gotempsh/apis/temps/changes/visitors/:visitor_id/session-replays/:session_id/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)
