Rotate API key
Account
Rotate API key
POST /v1/keys/rotate
POST
Rotate API key
Rotates theDocumentation Index
Fetch the complete documentation index at: https://docs.nixflex.com/llms.txt
Use this file to discover all available pages before exploring further.
key_secret of your API key. The key_id stays the same — only the secret changes. The old secret stops working immediately.
This is the same model used by Stripe and other major APIs. Your
key_id acts as a stable account identifier across logs and integrations; only the secret material rotates. Most developers rotate via the dashboard.Request
Authenticate with your current key. The endpoint returns a new secret paired with the samekey_id.
Body parameters
None. The endpoint identifies the key from theAuthorization header.
Response
200 OK:
Important
When to rotate
- A secret was leaked (committed to a public repo, shared in a chat, etc.)
- Routine security hygiene (every 90 days is a common cadence)
- An employee with access leaves your team
What stays the same
Because only the secret changes, these are not affected by rotation:- Existing calls, agents, phone numbers, SMS messages, batch jobs, campaigns
- Webhook configurations
- Billing and usage history
key_iditself (still appears in logs, dashboard, and API responses)