API Keys

Manage your API keys.

List keys

GET /api/v1/api-keys/ Response
{
  "api_keys": [
    {
      "id": 1,
      "name": "Server key",
      "prefix": "a1b2c3d4",
      "is_active": true,
      "last_used": "2025-06-09T11:22:33Z",
      "created_at": "2025-06-08T12:00:00Z",
      "updated_at": "2025-06-08T12:00:00Z"
    }
  ]
}

Create key

POST /api/v1/api-keys/ Body
{ "name": "Server key" }
Response (note: key is only returned once)
{
  "id": 2,
  "name": "Server key",
  "prefix": "9f84ab12",
  "is_active": true,
  "last_used": null,
  "created_at": "2025-06-09T10:00:00Z",
  "updated_at": "2025-06-09T10:00:00Z",
  "key": "9f84ab12.qwerty..."
}

Rotate key

POST /api/v1/api-keys/{id}/rotate/ Response
{
  "id": 2,
  "name": "Server key",
  "prefix": "6c3a9d77",
  "is_active": true,
  "last_used": null,
  "created_at": "2025-06-09T10:00:00Z",
  "updated_at": "2025-06-09T10:05:00Z",
  "key": "6c3a9d77.abcd..."
}
  • Old key is invalidated immediately

Revoke key

POST /api/v1/api-keys/{id}/revoke/ Response
{ "success": true }

Notes

  • Store the key securely when creating/rotating; you won’t be able to retrieve the secret again.
  • Use the prefix to identify keys without exposing the full secret.