regenerate_api_key
Rotate an API key's secret: the old key stops working immediately, while a new key with the same name and permissions is created for you.
Instructions
Requires an API key with the admin scope or higher. Replace an API key's secret: a new key with the same name, scope and, for a tracing key, the same monitor is created, and THE OLD KEY STOPS WORKING IMMEDIATELY, in every job, exporter, dotfile and agent that still holds it. If it is the key you are calling with, your next call fails until you switch to the new one. The new key has a NEW id. A key that never expired still never expires; one that had an expiry gets a fresh 90 days, capped at your own key's expiry. Unlike revoke_api_key this does not cascade: keys the old key created keep working. Refused (403, with max_scope) for a key with a higher scope than yours. The plaintext key is returned ONCE and cannot be retrieved again: write it where the old one was used, and never echo it back to the person.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| api_key_id | Yes | UUID of the key to regenerate. Get it from list_api_keys. |