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

# Set maximum session count

`POST /max-session-count`

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

---

[API](https://skmtc.net/tenstorrent/apis/tt-media-server-api-c-drogon.md) · [All operations](https://skmtc.net/tenstorrent/apis/tt-media-server-api-c-drogon/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/tenstorrent/tt-media-server-api-c-drogon/versions/f1176db3fd15/schema)
