Skip to main content
POST
Create Api Key

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

workspace
string
required

Slug of the workspace the request acts in

Maximum string length: 120
Pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$

Body

application/json
name
string
required

Human-friendly label for this API key

Required string length: 1 - 255
agent_id
string<uuid> | null

Bind the key to one agent of this workspace: it then reaches only that agent over A2A, nothing else. The key to hand to a caller outside the workspace.

expires_in_days
integer | null

Optional expiry in days (omit for non-expiring)

Required range: 1 <= x <= 3650

Response

Successful Response

Extends APIKeyResponse with the raw token — shown ONCE at creation.

access_count
integer
required
created_at
string<date-time>
required
expires_at
string<date-time> | null
required
id
string<uuid>
required
is_active
boolean
required
last_accessed_at
string<date-time> | null
required
name
string
required
token
string
required

Raw token value — copy it now, it won't be shown again

token_prefix
string
required
agent_id
string<uuid> | null

The one agent the key reaches over A2A; None for a workspace key