Skip to main content

Overview

Generates a new API key for the user. The old key is immediately invalidated.
This action cannot be undone! The old API key will stop working immediately.

Authentication

Requires User API Key in the X-API-Key header (the old key you’re replacing).

Request

No request body required.

Response

success
boolean
Always true on successful regeneration
api_key
string
Your new API key. Save this immediately - it will never be shown again.

When to Regenerate

Security Breach

If your API key is exposed:

Regular Rotation

Rotate keys periodically as a security best practice:

User Flow

Settings Page

Automated Rotation

Best Practices

Show Key Only Once

Require Confirmation

Audit Trail

Security Considerations

Immediate Invalidation

The old key stops working immediately:

Never Share Keys

Error Responses

Invalid API Key

Rate Limit

User Info

View user profile

User Preferences

Update scheduling preferences