---
title: "Update session duration"
method: PUT
path: "/visitors/{visitor_id}/session-replays/{session_id}/duration"
tags: ["Analytics"]
---

# Update session duration

`PUT /visitors/{visitor_id}/session-replays/{session_id}/duration`

## 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}/duration`
- Auth: HTTP bearer

## Path parameters

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

## Request body

- UpdateSessionDurationRequest
  - `duration` integer, required

## Response `200`

Session duration updated successfully

- UpdateSessionDurationResponse
  - `message` string, required

## Other responses

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

## Changes

- **2026-07-27** `1b060c0a4ba3`: 3 info
  - the endpoint scheme security `bearer_auth` was added to the API
  - added the non-success response with the status `401`
  - added the non-success response with the status `403`

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