Rotate API Key
API Key Management
Rotate API Key
Generates a new API key with the same configuration as the invoking key.
POST
Rotate API Key
For the full rotation workflow, decryption steps, and error reference, see the API Key Rotation guide.
Body
application/json
How long the old key remains active after the new key is approved, in seconds. Set to 0 for immediate expiry on approval. Cannot extend beyond the original key's expiry.
Example:
3600
Response
200 - application/json
A successful response.
Base64-encoded encrypted payload containing the new API key credentials. Decrypt using your current secret_key with HKDF-SHA256 + AES-256-GCM.
The Prime activity ID tracking the consensus approval for this rotation. Use with the Activities endpoints to monitor approval status.
Example:
"e8bbed13-fa33-41de-86d5-4335d8f08166"