rotate_api_key
Atomically mint a new API key with the same agent / workspace / scopes / name and revoke the old one. Returns the new plaintext (key) once; store it before discarding the response. Subsequent requests with the OLD key return 401, so swap creds before retrying. Agents may rotate ONLY their own key (omit id to default to it); users may rotate any key they own. Use this for routine credential hygiene or after a suspected leak.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | API key id to rotate. Omit when called by an agent; defaults to the agent's own current key. Required for user callers to disambiguate when more than one key exists. |