API keys

Rotate an API key secret

Generates a new 32-byte base64url secret for the key and invalidates the old secret immediately; name, expiry, and access are unchanged. The response contains the new plaintext secret exactly once. Revoked or expired keys cannot be rotated (409).

post/apiKeys/{apiKeyId}/rotate

Request

  • Base URL: https://api.cactal.ai/v1
  • URL: https://api.cactal.ai/v1/apiKeys/{apiKeyId}/rotate
  • Auth: HTTP bearer

Path parameters

apiKeyIdstring required

Response

The key metadata and the new plaintextKey secret. Store the secret now; it is never shown again.

plaintextKeystring required

The plaintext secret, a 32-byte base64url string. Store it now; it is never shown again, and only a SHA-256 hash is kept.

Changes

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