Skip to main content
POST
Rotate an API key

Authorizations

Authorization
string
header
required

User session JWT. Send as Authorization: Bearer <token>.

Path Parameters

collection_id
string<uuid>
required

Collection identifier returned at creation.

key_id
string
required

Response

Key rotated. secret is shown only once.

API key metadata. The raw key is never included here.

id
string
object
string
Example:

"collection.api_key"

collection_id
string
slug
string
name
string
scope
string
Example:

"ai-collection-v3:collections:3f2a9c1e-..."

permissions
string[]
expires_at
integer

Unix seconds.

secret
string

The raw API key (iak_...). Returned only once, on create and rotate.