Skip to main content
Calseta uses API key authentication. Both the REST API and MCP server accept the same keys.

API Key Format

All keys use the cai_ prefix followed by a 32-character URL-safe random string:
Keys are stored as bcrypt hashes. The full key is shown once on creation and cannot be retrieved again.

Creating an API Key

Via API

Save the returned API key immediately. It cannot be retrieved after creation.

Key Types

Every API key has a key_type — either "human" (default) or "agent": The trigger_source for workflow execution is derived server-side from the API key’s key_type — it is not a request body field. This ensures agents cannot bypass approval gates by claiming to be human.
Create separate keys for human operators and AI agents. This gives you audit clarity and lets approval gates distinguish between human and agent triggers automatically.

Using API Keys

Include the key in the Authorization header with the Bearer prefix:
The MCP server uses the same header format.

Scopes

Each API key has one or more scopes that control access:
Follow the principle of least privilege. An agent that only reads alerts and posts findings needs alerts:read and alerts:write — not admin.

Key Prefix Display

For display and audit purposes, only the key prefix (first 8 characters, e.g., cai_a1b2) is stored. This identifies which key was used in logs without exposing the full secret.

Rate Limiting

All endpoints are rate-limited. Authenticated requests are limited by API key prefix. Unauthenticated requests are limited by IP address. When rate-limited, the response includes a Retry-After header.

Allowed Sources

API keys can optionally restrict which alert sources they can ingest from:
When allowed_sources is null (default), the key can ingest from any source.