Skip to main content
GET
Return real-time counts of live users (active streaming sessions) and queued users (waiting for a worker) for a single project. Use this to power live status indicators, capacity dashboards, and autoscaling triggers without pulling the full session list.
Live and queue state is read from Redis, so this endpoint is fast enough to poll on a short interval. A few seconds between polls is plenty — the counts update in near real time.
The legacy path GET /projects/userStats/{projectId} still works and returns the same response, but is deprecated — use GET /projects/{projectId}/user-stats in new integrations.

Typical workflow

1

Authenticate

Send your API key in the x-api-key request header. The project must belong to the key’s account.
2

Request the counts

Call GET /projects/{projectId}/user-stats for the project you want to inspect.
3

Render or react

Use liveUser and queueUser in your dashboard, or compare against thresholds to trigger alerts.

Prerequisites

Do not put the API key in the URL. Query-string keys (?apikey=) are rejected with 400 API_KEY_IN_QUERY. Send the key in the x-api-key header.

Path parameters

string
required
The ID of the project to fetch live and queue user counts for. Must belong to the authenticated account.

Headers

string
required
Your Streampixel API key.

Query parameters

string
Optional, for backward compatibility. If provided, it must be the ID of the authenticated account — any other value returns 403 Access denied. Omit it in new integrations.

Response

number
Number of users currently in an active streaming session for this project. Sessions in Terminated or Terminating state are excluded.
number
Number of users waiting in the project’s queue for a worker to become available.

Error reference

Polling pattern

For a live dashboard, poll on a short interval and stop the timer when the page is hidden. This keeps the UI responsive without hammering the API.
Node.js / Browser
Call this endpoint server-side only — shipping your API key to a browser exposes it to anyone who opens DevTools. If browsers need these counts, proxy the call through your backend and push updates over WebSocket or SSE.

Next

List projects

Enumerate every project so you can fetch stats for each.

Rate limits & errors

Limits per endpoint and the standard error response format.