Billing

Rotate a personal API key

Atomically mints a replacement key with the same name and scopes as the original, then immediately revokes the old key. The full new secret is returned in the response — this is your only chance to capture it. Old key is invalid as soon as the response is returned; if you need overlap with an in-flight deploy, create a second key first via POST /api-keys, ship your code, then DELETE the old key. Rotation is for the suspect/compromised-key case where overlap is the opposite of what you want. Authorization: key_id is matched together with the authenticated caller's user id, so a key owned by another user is invisible (404) and no one else's personal key can be rotated.

post/api-keys/{key_id}/rotate

Request

  • Base URL: https://api.mnemom.ai/v1
  • URL: https://api.mnemom.ai/v1/api-keys/{key_id}/rotate
  • Auth: HTTP bearer

Path parameters

key_idstring required

ID of the API key to act on (mk-{8-hex}).

Response

New key minted, old key revoked.

key_idstring
keystring

Full secret. Capture now — never returned again.

key_prefixstring
namestring
scopesstring[]
rotated_fromstring

key_id of the now-revoked predecessor

old_key_revoked_atstring date-time
created_atstring date-time

Changes

No recorded changes to this operation across all 1 revision of this API.