Replace one of your API keys with a new secret

Issues a replacement key and revokes the old one. This is the answer to a leaked or lost key: the new secret is returned once, the old secret stops working immediately, and the label carries over unless you supply a new one. The replacement is issued at your account's current allowance — your paid plan if you have one — not at the old key's. Rotating does not count against the active-key limit, because it replaces rather than adds. Free, and it works while you are out of quota.

post/v1/keys/{id}/rotate

Request

  • Base URL: https://agentmandate-api.com
  • URL: https://agentmandate-api.com/v1/keys/{id}/rotate
  • Auth: HTTP bearer

Path parameters

idstring required

Request body

namestring

Optional new label. Defaults to the old key's.

Response

Success

apiKeystring

The new secret. Shown once.

keyIdstring
replacedstring

The id of the key that was revoked.

productstring
quotaPerPeriodinteger nullable
planstring
warningstring
requestIdstring

Changes

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