Rotate API key
Developer Platform, Sandbox & Key Management
/api-keys/rotate
Rotate API key
createRotateIssues a new primary API key and immediately suspends the current credential. Partner data remains attached to the same stable partner identity. The new key is returned once in newApiKey; store it securely before closing the response. There is no overlap window.
Parameters
This endpoint has no path or query parameters.
Headers
AuthorizationstringRequiredBearer sk_sandbox_<your_key> for sandbox requests.
Idempotency-KeystringheaderRequiredUnique string that makes write calls safe to retry on network failure. Required for money movement, trading, KYC, subscriptions, and webhook creation. Deduplicated for 24 hours -- duplicate keys return the cached response. HTTP 409 if a concurrent request with the same key is still in progress.
Example: dep_user42_1743152580
Request body
confirmtrueRequiredExplicit acknowledgement that the current key will stop working immediately.
Response fields
messagestringnewApiKeystringNew primary API key. Store immediately — shown once.
oldApiKeystringMasked form of the credential that was suspended.
notestringResponse codes
200Key rotated.