Skip to main content

Overview

List active API keys for the authenticated user, with optional filtering by last-used timestamps.

GET /api/v1/api-keys

Purpose: list active API keys for the authenticated user. Query parameters:
  • from (RFC3339 timestamp, optional): filter by last_used_at >= from
  • to (RFC3339 timestamp, optional): filter by last_used_at less than or equal to to
  • reveal (boolean, optional): include plaintext keys in the response (requires ENCRYPTION_KEY)
Notes:
  • When reveal=true, each key includes a plaintext key field.
  • Keys are masked by default using key_preview.
Example request:

Response

Status: 200 OK Example response:
Response fields:
  • keys[].key_preview: masked key (present when reveal=false).
  • keys[].key: plaintext key (present only when reveal=true).
Errors:
  • 400 invalid query parameters.
  • 401 unauthorized.
  • 500 internal error (including when reveal=true and ENCRYPTION_KEY is missing).