Docs

REST API

API Keys

API Keys

API Keys

Manage your API keys over the API. Keys authenticate both the REST API and the MCP server — see Authentication.

List keys

GET /api/api-keys

Returns your keys with a masked preview (the secret is never returned again after creation):

[
  {
    "id": "1234567890abcdef",
    "name": "Production Server",
    "key_preview": "••••••••abcdef",
    "last_used_at": "2026-06-06T12:30:00Z",
    "created_at": "2026-06-05T10:00:00Z"
  }
]

Create a key

POST /api/api-keys
Field Type Required Notes
name string yes A label to identify the key. Max 255 characters.
curl -X POST https://schedulenchill.com/api/api-keys \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{ "name": "CI pipeline" }'

Returns 201 Created. The full token is included only in this response — store it securely, it cannot be retrieved again:

{
  "id": "abc123",
  "name": "CI pipeline",
  "token": "abc123|long-secret-string-shown-once",
  "created_at": "2026-06-06T17:40:00Z"
}

Revoke a key

DELETE /api/api-keys/{id}

Immediately invalidates the key. Returns 204 No Content. Any request using a revoked key returns 401.