API Reference

Users Endpoint

Profile details, preferences, session info for the API key's user.

GET /api/v1/users/me

The user behind this API key. Always allowed for the key's owner — no scope required.

{
  "id": 42,
  "email": "[email protected]",
  "full_name": "Alice Smith",
  "organization_id": 1,
  "role": "admin",
  "preferences": {
    "default_time_range": "1h",
    "timezone": "Europe/Berlin",
    "theme": "light"
  },
  "last_login": "2026-04-25T08:14:00Z"
}

PATCH /api/v1/users/me/preferences

Update UI preferences. Useful for scripted onboarding — set theme/timezone for new users without making them click through preferences pages.

{
  "default_time_range": "6h",
  "theme": "dark"
}

GET /api/v1/users/me/api-keys

List your own keys. Implicit scope.

POST /api/v1/users/me/api-keys

Create a key. Response shows the raw key one time only:

{
  "name": "Grafana integration",
  "scopes": ["read:metrics", "read:alerts"],
  "expires_at": "2027-04-25T00:00:00Z"
}

DELETE /api/v1/users/me/api-keys/:id

Revoke a key. Effective within 60 seconds.