Tenants

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.

post/credits/tenants/me/keys/{keyId}/rotate

Request

  • Base URL
    https://api.paywithlocus.com/api
  • URL
    https://api.paywithlocus.com/api/credits/tenants/me/keys/{keyId}/rotate
  • Auth
    HTTP bearer

Path parameters

keyIdstring uuid required

Key record id from GET /credits/tenants/me/keys.

Headers

X-Locus-Step-Upstring password

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

gracePeriodSecondsinteger

Overlap during which the old key still works. Omitted or 0 means it dies with this response.

expiresIninteger

Lifetime of the replacement in seconds. Omit to inherit the target's deadline.

Response

New raw key (returned exactly once) with keyMetadata.

Changes

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