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 Reference

All 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.


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

  1. In the Alke Analytics dashboard, open the sidebar and click the key icon at the bottom to access Service Accounts
  2. Enter a name for the service account (e.g. reporting-pipeline)
  3. Click Create account

The service account is automatically scoped to the current organization.

Step 2 — Generate a token

  1. On the Service Accounts page, find your newly created account
  2. Click Renew token
  3. 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

  1. In the Alke Analytics dashboard, click on your avatar in the top-right corner
  2. Select Profile

Step 2 — Generate a token

  1. In the API Token section, click Regenerate token
  2. 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
Explore the API
Use the interactive API documentation to discover all available endpoints, try requests directly, and see response schemas.

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