---
title: "Set maximum session count"
method: POST
path: "/max-session-count"
tags: ["Health"]
---

# Set maximum session count

`POST /max-session-count`

## Request

- Base URL: `/` (relative, and the document was published on a file host, not at the API’s origin)
- URL: `/max-session-count`
- Auth: none required
- TypeScript: <https://skmtc.dev/tenstorrent/apis/tt-media-server-api-c-drogon/docs/max-session-count/post.ts> (a function with typed inputs; its response is checked against the schema)

Sets the maximum session count at runtime. This overrides the MAX_SESSIONS_COUNT environment variable. Set to 0 to clear the override and revert to the environment variable value. Changes take effect immediately for new session allocation attempts.

## Request body

- MaxSessionCountRequest
  - `max_session_count` integer, required: New maximum session count. Set to 0 to clear override and use environment variable value.

## Response `200`

Successfully set max session count

- MaxSessionCountSetResponse
  - `max_session_count` integer, required: The new maximum session count that was set
  - `status` 'success', required: Operation status

## Other responses

- `400`: Invalid request (e.g. missing field or invalid value)
- `500`: Internal server error

## Changes

- **2026-04-28** `5b93bff1aca3`: 1 info
  - endpoint added
- **2026-04-03** `d051d35964ca`: 1 breaking
  - api path removed without deprecation

[Operation history](https://skmtc.dev/tenstorrent/apis/tt-media-server-api-c-drogon/changes/max-session-count/post.md)

---

[API](https://skmtc.dev/tenstorrent/apis/tt-media-server-api-c-drogon.md) - [All operations](https://skmtc.dev/tenstorrent/apis/tt-media-server-api-c-drogon/llms.txt) - [OpenAPI document](https://skmtc.dev/tenstorrent/apis/tt-media-server-api-c-drogon/revisions/f1176db3fd15?raw)
