Skip to content

API Keys

API keys allow programmatic access to Warden’s API. Only admins can create and manage API keys.

  1. Navigate to Settings → API Keys
  2. Click Create API Key
  3. Enter a name to identify the key (e.g., “CI/CD Pipeline” or “Terraform”)
  4. Select a role for the key — this determines what the key can access (defaults to Editor)
  5. Click Create

API keys use the format sk_live_ followed by a 64-character hex string.

Include the key in the Authorization header of your HTTP requests:

Terminal window
curl -H "Authorization: Bearer sk_live_your_key_here" \
https://your-warden-instance.com/api/monitors

The key’s role determines which endpoints it can access. See Roles & Permissions for the full permission matrix.

API keys follow the same RBAC system as users:

RoleAccess Level
AdminFull API access including user management and settings
EditorCan create/modify monitors, incidents, maintenance, and notifications
ViewerRead-only access to monitors, incidents, and reports
Status ViewerCan only access assigned status pages via API

The API Keys page shows:

  • Key name
  • Key prefix (first 12 characters, e.g., sk_live_abcd)
  • Assigned role
  • Date created
  • Last used timestamp
  1. Navigate to Settings → API Keys
  2. Find the key and click Delete

The key is immediately invalidated. Any requests using it will receive a 401 Unauthorized response.

  • API keys are hashed with bcrypt before storage — the raw key is never stored
  • Only the key prefix is stored in plaintext for identification purposes
  • The last_used_at timestamp is updated on each use so you can identify stale keys