Skip to main content
GET
/
chat
/
sessions
/
cURL
curl --request GET \
  --url https://api-prod.voltai.ai/chat/sessions/ \
  --header 'x-api-key: <api-key>'
{
  "total_sessions": 123,
  "used_sessions": 123,
  "available_sessions": 123,
  "active_user_ids": [
    "<string>"
  ]
}
Use GET /chat/sessions/ to inspect how many floating sessions your organization is using. This matches the same 5-minute sliding window used for floating-seat limits on /chat/query/: after a user’s first question, that identity counts as one session until five minutes pass with no new messages. Additional questions in that window do not open extra sessions. Send your API key in the X-API-KEY header.

Query parameters

NameTypeDefaultDescription
source"all" | "api" | "web""all"Restrict the active-session count to a specific traffic origin. api counts only POST /chat/query/ calls authenticated with an API key, web counts only in-app chats from the web UI, and all combines both. Any other value returns 400.

Response Notes

  • total_sessions is the maximum number of floating sessions allowed for the organization. It is null when no limit is configured (unlimited).
  • used_sessions is how many distinct user_id values have at least one qualifying conversation in the last five minutes (the same rule as floating-seat counting), filtered by source.
  • available_sessions is the remaining capacity (total_sessions - used_sessions). It is null when unlimited.
  • active_user_ids lists those identities (the same user_id strings you send on /chat/query/).
  • source echoes the query parameter so clients can tell which slice of traffic the counts cover.

Example Request

curl -s "https://api-prod.voltai.ai/chat/sessions/?source=api" \
  -H "X-API-KEY: $API_KEY"

Example Response

{
  "total_sessions": 10,
  "used_sessions": 3,
  "available_sessions": 7,
  "active_user_ids": [
    "usr_82af91",
    "usr_d4f012",
    "usr_7ba3ee"
  ],
  "source": "all"
}

Example Response (unlimited)

{
  "total_sessions": null,
  "used_sessions": 1,
  "available_sessions": null,
  "active_user_ids": [
    "usr_82af91"
  ],
  "source": "api"
}

Authorizations

x-api-key
string
header
required

Query Parameters

source
enum<string>
default:all

Restrict the active-session count to a specific traffic origin. api counts only POST /chat/query/ calls authenticated with an API key, web counts only in-app chats from the web UI, and all (the default) combines both.

Available options:
all,
api,
web

Response

Session status

Floating-session usage for the organization. A session is active for five minutes after a user's first qualifying message; further messages in that window still count as one session per user identity.

total_sessions
integer | null
required

Maximum floating sessions allowed for this organization. null if unlimited.

used_sessions
integer
required

Number of distinct user identities with qualifying chat activity in the last five minutes.

available_sessions
integer | null
required

Remaining floating sessions (total_sessions - used_sessions). null if unlimited.

active_user_ids
string[]
required

Sorted list of user_id values that have an active floating session (recent activity in the five-minute window).

source
enum<string>
required

Traffic origin the counts were computed over. Echoes the source query parameter.

Available options:
all,
api,
web