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/user/info

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/user/info

Example: Fetching a Report

Here is a minimal example to retrieve daily pageviews and unique users of one property:

curl -X POST \
  -H "Authorization: Bearer <your-token>" \
  -H "Content-Type: application/json" \
  -d '{
    "metrics": [
      {"column": "pageview_count", "aggregation": null},
      {"column": "user_id", "aggregation": "countUnique"}
    ],
    "dimensions": [{"column": "day", "aggregation": null}],
    "series": {
      "a": [
        {"dimension": {"column": "property_id", "aggregation": null}, "operator": "IN", "values": ["<your-property-uuid>"]},
        {"dimension": {"column": "day", "aggregation": null}, "operator": "BE", "values": ["2026-03-01", "2026-03-15"]}
      ]
    },
    "order": [{"criteria": {"column": "day", "aggregation": null}, "direction": "asc"}],
    "limit": 100
  }' \
  https://api-analytics.alketech.eu/api/organizations/<your-organization-uuid>/report

Each row holds the dimensions and, for every metric, one value per series: {"day": "2026-03-01", "pageview_count": {"a": 1520}, "countUnique|user_id": {"a": 610}}. The available columns and their aggregations are listed by GET /api/organizations/<your-organization-uuid>/metadata.

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