regenerate_api_key
Issues a replacement API key with the same name, environment, scopes, and sub-account; the old key stops working immediately and the new secret is returned once.
Instructions
Regenerate an API key: issues a new key (a new id and secret) with the same name, environment, scopes and sub-account. The old key stops working immediately; use the id in this response from now on. The new key lists the old one in replaced_key_ids, so its requests and usage stay with it. The new secret is returned ONLY in this response. Note: the secret will be visible in the AI conversation context.
Agent usage: This operation requires 2FA. Before calling, complete the 2FA flow: (1) call start_2fa with action_type "api_key_regenerate", (2) wait for user to verify the code, (3) poll get_2fa_status until "verified", (4) then call regenerate_api_key.
ACCESS: needs a Proof account. Set PROOF_API_KEY and restart this server, or sign in with start_login — a session opens this tool — then call this tool again.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | API key ID to regenerate |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | MongoDB ObjectId | |
| key | Yes | The full API key. Returned only in this response; it cannot be read again. | |
| name | Yes | ||
| prefix | Yes | ||
| scopes | Yes | ||
| warning | Yes | ||
| created_at | Yes | ||
| profile_id | Yes | Sub-account (PublicProfile) the key is bound to; null for unbound keys. | |
| environment | Yes |