Skip to main content
GET
cURL
Use GET /chat/sessions/ to see how many sessions your organization is using. A user counts as one active session from their first question until five minutes pass with no new messages. Send X-API-KEY in the header.

Query parameters

Response

  • total_sessions — session limit for the organization; null if unlimited.
  • used_sessions — active sessions in the last five minutes, filtered by source.
  • available_sessions — remaining capacity; null if unlimited.
  • active_user_ids — the user_id strings currently active.
  • source — echoes the query parameter.

Example Request

Example Response

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