rotate_key

Rotate your tenant API key. All existing keys are revoked immediately.

Parameters

None.

Response Example

New tenant key: sk_live_newkey123... All previous keys have been revoked. Update your MCP client configuration with this new key.

Error Cases

Error Cause
401 Unauthorized Invalid or expired secret key

Example Prompt

"Rotate my API key for security."

WARNING

Key rotation has immediate side effects:

  • All existing keys are permanently revoked -- there is no undo
  • The current MCP session will disconnect since the bearer token used to authenticate becomes invalid
  • All API integrations using the old key will fail with 401 Unauthorized

After rotation, update the Authorization header in your MCP client configuration with the new key.

TIP

CLI equivalent: npx formdata-dev keys rotate. The CLI automatically saves the new key to your credentials file and prints updated MCP configuration.