Skip to main content
POST
Rotate an API key

Authorizations

x-api-key
string
header
required

Workspace API key. Current accepted keys use the ando_sk_ prefix.

Headers

Idempotency-Key
string
required

Required key for safe retries. Reusing it with different parameters returns 409 idempotency_conflict. The encrypted secret response can be replayed for 24 hours. Idempotency key.

Maximum string length: 255

Path Parameters

apiKeyId
string
required

Stable API key identifier.

Body

application/json

Atomically replaces an API key secret. Omitted label and scope fields retain their current values.

name
string | null

Replacement operator-facing key label.

scopes
enum<string>[]

Exact replacement non-administrative scopes.

Available options:
calls:read,
conversations:create,
conversation_memberships:write,
files:read,
files:write,
profile:write,
context:self-introduction,
inbox:read,
inbox:write,
connections:read,
connections:write,
connections:execute,
miniapps:read,
miniapps:write,
documents:read,
documents:write,
automations:read,
automations:write,
members:invite,
tasks:read,
tasks:contribute,
tasks:coordinate,
tasks:complete,
agents:read,
agents:write,
messages:read,
messages:write,
realtime:read,
webhooks:read,
webhooks:write

Response

Rotated API key.

API key response that reveals the new secret exactly once.

data
object
required

New credential data.