Skip to main content
POST
Rotate an API key

Authorizations

Authorization
string
header
required

Supabase Auth access token passed as Bearer token

Path Parameters

id
string<uuid>
required

API key ID

Body

application/json
name
string | null

Optional human-readable key label.

scope
string | null

Optional advisory free-text scope label (T08 Phase 10). Persisted on the row and surfaced by the console KeysPage, but not enforced server-side at request time.

Response

Replacement API key created

id
string<uuid>
required
key
string
required

Plaintext API key returned only at creation time.

Example:

"ns_live_a1b2c3d4e5f67890a1b2c3d4e5f67890"

prefix
string
required

Stored display prefix for identifying the key.

Example:

"ns_live_a1b2"

name
string | null
scope
string | null

Echo of the advisory scope label provided at creation, if any.

expires_at
string<date-time> | null

Expiration time when returned from a rotation flow; null for normal keys.