Create Key
Authorizations
Primary scheme: Authorization: Key <key_id>:<secret>.
Body
Human-readable label for the key.
Scopes granted to the key; omitted means full access.
Least-privilege grants carried by v3 API keys.
Stored as text[] on api_keys; NULL scopes means full access (legacy keys). Scopes are stored as text so new least-privilege surfaces can be introduced without a database-enum migration.
jobs:read, jobs:write, models:read, files:write, webhooks:manage, log_drains:manage, usage:read, keys:manage personal (default) dies with the member; service is workspace-shared, OWNER/ADMIN-managed, and survives member removal.
personal, service Target workspace; omitted means the authenticating key's workspace.
ISO-8601 instant the key stops authenticating; omitted means it never expires.
Response
Successful Response
The key's public identifier.
The full <key_id>:<secret> pair — a valid Bearer credential. Returned exactly once, at creation; store it now.
Personal keys die with the member; service keys belong to the workspace.
personal, service Human-readable label for the key.
Scopes granted to the key; null means full access (a legacy key predating scopes).
The workspace the key bills and acts in.
ISO-8601 instant the key stops authenticating; null means it never expires.
ISO-8601 instant the key was created.