Skip to main content
POST
CLI
Early access. Agents are enabled per organization alongside per-key transfer policy — ask your account team. Until enabled, create and key issuance return 403 agents_not_enabled.

Authorizations

Authorization
string
header
required

API Key in Bearer format (e.g., Bearer sk_test_...)

Headers

X-API-Key
string

API key

Path Parameters

id
string
required

Body

application/json
name
string

Label for the key. Defaults to the agent name.

Maximum string length: 64
Example:

"procurement-runtime"

expiresAt
string<date-time>

Optional hard expiry

Example:

"2027-01-01T00:00:00Z"

Response

id
string
required
Example:

"ak_abc123"

agentId
string
required
Example:

"agt_abc123"

name
string
required
Example:

"procurement-runtime"

keyHint
string
required

Last 4 characters of the secret

Example:

"9f3a"

status
enum<string>
required
Available options:
ACTIVE,
REVOKED,
EXPIRED
createdAt
string<date-time>
required
expiresAt
string<date-time> | null
required
lastUsedAt
string<date-time> | null
required
secret
string

Full API key. Present only in the create response. Prefix sk_live_agent_ (production) or sk_sandbox_agent_ (sandbox).

Example:

"sk_sandbox_agent_1a2b3c4d5e6f7g8h9f3a"