api-referenceGET
GET
https://analytics.flowsery.com/analytics/api/v1/realtimeFetch the number of currently active visitors on your site (those with activity within the last 5 minutes).
Bearer Token (workspace token or website API key)
Workspace Tokens Need a Website Selector
Workspace API tokens can access every website in the workspace. Pass eitherwebsiteId or domain so Flowsery knows which website to query or mutate. Website API keys are already scoped to one website, so the selector can be omitted.Website Selector
| Parameter | Type | Description |
|---|---|---|
websiteId | string | Website ID to use with a workspace API token. Omit when authenticating with a website API key. |
domain | string | Website domain to use with a workspace API token when websiteId is not provided. Omit when authenticating with a website API key. |
Notes
Realtime data reflects visitors who have been active within the past 5 minutes. This endpoint is optimized for frequent polling and uses shorter cache durations. Date range filters are not supported -- it always returns current activity.Example Request (Curl)
curl --request GET \
--url https://analytics.flowsery.com/analytics/api/v1/realtime \
--header 'Authorization: Bearer <api-key>'200
{
"status": "success",
"data": [
{
"visitors": 42
}
]
}