Skip to main content
POST

Overview

Rotates an existing API key by generating new key material. The old key is immediately invalidated and a new plaintext key is returned. The key’s name and permissions are preserved. Auth: Requires JWT (dashboard operation only). Important: The new plaintext key is shown only once in this response. Store it securely.

Path Parameters

key_id
string
required
The API key UUID to rotate

Response

id
string
API key UUID (unchanged)
key
string
New plaintext API key (shown once only — store it securely)
key_prefix
string
First 8 characters of the new key (for identification)
name
string
Key name (preserved from original)
created_at
string
Original creation timestamp
last_used
string
Last usage timestamp (reset on rotation)
permissions
object
Resource permissions (preserved from original). null means unrestricted.

Example