Skip to content
v0.5.1GitHub

Using

Generates a new API key for the user and immediately invalidates the old one. The new key is returned **only in this response**. Use this after key leaks or for regular key rotation.

applies to v0.5.1
POST
/store-api/auth/users/{name}/rotate-key
curl --request POST \
--url https://example.com/store-api/auth/users/example/rotate-key \
--header 'Authorization: Bearer <token>'
name
required
string

Username

New API key generated (visible once)

Media typeapplication/json
object
api_key
required

New API key (visible only once — cannot be retrieved afterward).

string
name
required
string

Example generated

{
"api_key": "example",
"name": "example"
}

User not found

Media typetext/plain
string