Skip to content

Issue an agent API key (secret shown once)

POST
/v1/admin/orgs/{org_id}/projects/{project_id}/agent-keys
org_id
required
string
project_id
required
string
object
agent_id
required
string
scopes
required
Array<string>
expires_in_hours
integer

Created (key shown once).

object
id
string
agent_id
string
agent_handle
string
agent_name
string
key

Raw agent API key

string
prefix
string
scopes
Array<string>
key_tier
string
Allowed values: org project inbox
ceiling_inbox_id
string
enrollment_token_id
string
expires_at
string format: date-time
created_at
string format: date-time

Invalid request.

The canonical error envelope. error is a stable machine code.

object
error
required

Stable error code (e.g. unauthorized, forbidden, not_found, invalid, quota_exceeded, rate_limited).

string
Example
forbidden
message

Human-readable detail (never leaks internals).

string
Example
missing required scope

Missing or invalid credential.

The canonical error envelope. error is a stable machine code.

object
error
required

Stable error code (e.g. unauthorized, forbidden, not_found, invalid, quota_exceeded, rate_limited).

string
Example
forbidden
message

Human-readable detail (never leaks internals).

string
Example
missing required scope

Authenticated but lacking the required scope, or out of quota.

The canonical error envelope. error is a stable machine code.

object
error
required

Stable error code (e.g. unauthorized, forbidden, not_found, invalid, quota_exceeded, rate_limited).

string
Example
forbidden
message

Human-readable detail (never leaks internals).

string
Example
missing required scope

Resource not found.

The canonical error envelope. error is a stable machine code.

object
error
required

Stable error code (e.g. unauthorized, forbidden, not_found, invalid, quota_exceeded, rate_limited).

string
Example
forbidden
message

Human-readable detail (never leaks internals).

string
Example
missing required scope