Skip to main content
POST
Rotate an API key

Authorizations

Authorization
string
header
required

User session JWT or instance API key (iak_*). Send as Authorization: Bearer <token>.

Path Parameters

knowledgeBaseId
string
required

Knowledge base id. Legacy physical prefix vs_ (the kb_ rename is deferred).

Maximum string length: 128
Pattern: ^vs_[A-Za-z0-9-]+$
apiKeyId
string
required

Knowledge-base API key identifier - the key slug (auto-generated as kb-{knowledge_base_id}-{uuid}, or caller-supplied). This is the value returned as ApiKey.id.

Maximum string length: 128
Pattern: ^kb-[A-Za-z0-9_-]+$

Response

Rotated; new secret present (once).

Per-knowledge-base API key metadata (no secret).

id
string
required

The key slug (also exposed as slug).

Pattern: ^kb-[A-Za-z0-9_-]+$
object
enum<string>
required
Available options:
knowledge_base.api_key
knowledge_base_id
string
required
Pattern: ^vs_[A-Za-z0-9-]+$
scope
string
required

Currently storage:vector_stores:{knowledge_base_id} (the storage:knowledge_bases:{id} rename is deferred with the platform allowlist change).

created_at
integer
required
name
string | null
Maximum string length: 256
slug
string | null

Path-safe key identifier (kb-{knowledge_base_id}-{uuid}, or caller-supplied at mint). Equal to id.

permissions
string[]

The storage:-prefixed permission strings the key grants (caller-provided at mint, else config.api_key_default_permissions).

prefix
string | null

Non-secret leading characters, for identification in lists.

last_used_at
integer | null
expires_at
integer | null
created_by
string | null
updated_at
integer