Websites

Get visitor charts for websites

GET/api/websites/charts

Returns visitor totals and chart data for the requested websites the caller can view, within the selected date range.

Try it

GET/api/websites/charts
Authorization

Credentials stay in this browser tab and are never sent anywhere except the API.

Query parameters
Response

Send a request to see the response.

Headers

NameTypeDescription
AuthorizationrequiredstringToken returned by POST /api/auth/login, or an API key (`umami_…`) created under Settings → API keys (self-hosted only). Bearer <token>.
x-umami-share-contextrequiredstringRequired context header when authenticating with a share token. <api-key>.
x-umami-share-tokenrequiredstringSigned token returned by a share endpoint. <api-key>.

Query parameters

NameTypeDescription
idsrequiredstringComma-separated resource IDs. Provide between 1 and 20 IDs.
startAtintegerStart of the date range as a Unix timestamp in milliseconds.
endAtintegerEnd of the date range as a Unix timestamp in milliseconds.
timezonestringIANA time zone used to interpret dates and group results, for example America/New_York.
periodenum<string>Relative date range, for example 7d or 30day, used instead of an explicit startAt/endAt range.
Options: today, 24h, 7d, 30d, 0day, 24hour, 0week, 7day, 0month, 30day, 90day, 0year, 6month, 12month

Responses

200The operation completed successfully.
NameTypeDescription
datarequiredobjectData returned by the operation.
200 example
400Bad request.
NameTypeDescription
errorrequiredobjectError details returned when the operation fails.
400 example
401Unauthorized.
NameTypeDescription
errorrequiredobjectError details returned when the operation fails.
401 example

Code samples

cURL