Links
Get visitor charts for links
GET
/api/links/chartsReturns visitor totals and chart data for the requested links the caller can view, within the selected date range.
Try it
Headers
| Name | Type | Description |
|---|---|---|
| Authorizationrequired | string | Token returned by POST /api/auth/login, or an API key (`umami_…`) created under Settings → API keys (self-hosted only). Bearer <token>. |
| x-umami-share-contextrequired | string | Required context header when authenticating with a share token. <api-key>. |
| x-umami-share-tokenrequired | string | Signed token returned by a share endpoint. <api-key>. |
Query parameters
| Name | Type | Description |
|---|---|---|
| idsrequired | string | Comma-separated resource IDs. Provide between 1 and 20 IDs. |
| startAt | integer | Start of the date range as a Unix timestamp in milliseconds. |
| endAt | integer | End of the date range as a Unix timestamp in milliseconds. |
| timezone | string | IANA time zone used to interpret dates and group results, for example America/New_York. |
Responses
200The operation completed successfully.
| Name | Type | Description |
|---|---|---|
| datarequired | object | Data returned by the operation. |
200 example
400Bad request.
| Name | Type | Description |
|---|---|---|
| errorrequired | object | Error details returned when the operation fails. |
400 example
401Unauthorized.
| Name | Type | Description |
|---|---|---|
| errorrequired | object | Error details returned when the operation fails. |
401 example
Code samples
cURL