Rotate ONE key; sibling keys of the same kind keep working
The replacement inherits the target's name, scopes, endpoint allowlist, pricing, audience (legacy policy-bearing rows are normalized to the execution audience), and — unless expiresIn is passed — its expiry deadline. A human caller cannot rotate a secret key whose inherited scopes include authority absent from their own effective membership scopes. Only the target is superseded: with gracePeriodSeconds > 0 it keeps authenticating until the overlap ends (capped at the target's own expiry), otherwise it is revoked with this response. Rotating a key that is already rotating out is rejected (rotate its replacement instead), as is rotating an expired key without a fresh expiresIn. This is the rotation the dashboard uses; the kind-level /keys/rotate remains the rotate-everything cutover. Requires a workspace owner or admin with MFA or passkey step-up completed in the last ten minutes.
Request
- Base URLhttps://api.paywithlocus.com/api
- URLhttps://api.paywithlocus.com/api/credits/tenants/me/keys/{keyId}/rotate
- AuthHTTP bearer
Path parameters
Key record id from GET /credits/tenants/me/keys.
Headers
Short-lived raw MFA/passkey step-up token bound to the authenticated Cognito subject. Send it alongside the dashboard Bearer token for workspace-administrator mutations when the base session does not itself prove MFA within the last ten minutes. Never send it with a tenant secret key.
Request body
Response
New raw key (returned exactly once) with keyMetadata.
Changes
No recorded changes to this operation across all 1 revision of this API.