API Access
Authenticate to the Alke Analytics API to build custom reports and integrations.
API Documentation
The full API reference is available as an interactive Swagger UI:
Open API ReferenceAll API endpoints require a Bearer token in the Authorization header:
Authorization: Bearer <your-token>
There are two ways to obtain a token: via a service account (recommended for automated integrations) or via your personal account.
Option 1: Service Account (recommended)
Service accounts are dedicated API identities scoped to an organization. They are the recommended approach for automated scripts, CI/CD pipelines, and third-party integrations.
Prerequisites
You must be an organization owner to create service accounts.
Step 1 — Create a service account
- In the Alke Analytics dashboard, open the sidebar and click the key icon at the bottom to access Service Accounts
- Enter a name for the service account (e.g.
reporting-pipeline) - Click Create account
The service account is automatically scoped to the current organization.
Step 2 — Generate a token
- On the Service Accounts page, find your newly created account
- Click Renew token
- Copy the token immediately — it is only displayed once
The token is valid for 1 year. You can regenerate it at any time (this invalidates the previous token).
Step 3 — Grant access to properties
Service accounts inherit access from the organization. If needed, an organization owner can adjust property-level permissions through the Users management page.
Step 4 — Use the token
curl -H "Authorization: Bearer <your-token>" \
https://api-analytics.alketech.eu/api/reports
Option 2: Personal Token
You can generate an API token from your own user account. This token has the same permissions as your account across all organizations you belong to.
Step 1 — Go to your profile
- In the Alke Analytics dashboard, click on your avatar in the top-right corner
- Select Profile
Step 2 — Generate a token
- In the API Token section, click Regenerate token
- Copy the token immediately — it is only displayed once
The token is valid for 1 year. Regenerating a new token invalidates the previous one.
Step 3 — Use the token
curl -H "Authorization: Bearer <your-token>" \
https://api-analytics.alketech.eu/api/reports
Example: Fetching a Report
Here is a minimal example to retrieve a pageview report for a property:
curl -X POST \
-H "Authorization: Bearer <your-token>" \
-H "Content-Type: application/json" \
-d '{
"propertyId": "<your-property-uuid>",
"dateFrom": "2026-03-01",
"dateTo": "2026-03-15",
"metrics": ["pageviews", "visits"],
"dimensions": ["date"]
}' \
https://api-analytics.alketech.eu/api/reports
Token Security
- Tokens are Bearer tokens (JWT) — treat them like passwords
- Store them in environment variables or secret managers, never in source code
- Regenerating a token immediately invalidates the previous one
- Each account (service or personal) can have only one active token at a time