Accounts
Rotate an account API key with an optional bounded grace period.
Rotate an account API key with an optional bounded grace period. The request is scoped to the authenticated instance and enforces account administration policy.
POST
/
api
/
v1
/
accounts
/
{userId}
/
keys
/
{key}
/
rotate
Rotate an account API key with an optional bounded grace period.
curl --request POST \
--url https://api.revoengine.com/api/v1/accounts/{userId}/keys/{key}/rotate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"version": 1
}'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({version: 1})
};
fetch('https://api.revoengine.com/api/v1/accounts/{userId}/keys/{key}/rotate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.revoengine.com/api/v1/accounts/{userId}/keys/{key}/rotate"
payload = { "version": 1 }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)Authorizations
Bearer JWT token or API Key (sk-*).
Body
application/json
Current API key version.
Required range:
x >= 0Old-key overlap in milliseconds. Zero revokes the old key immediately. Existing expiration is never extended.
Required range:
0 <= x <= 31536000000New-key ISO expiration, at least four hours ahead. Omission inherits the current expiration; null creates a key without expiration.
Authenticator confirmation for personal accounts.
Required string length:
6Response
201
Last modified on October 5, 2026
⌘I
Rotate an account API key with an optional bounded grace period.
curl --request POST \
--url https://api.revoengine.com/api/v1/accounts/{userId}/keys/{key}/rotate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"version": 1
}'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({version: 1})
};
fetch('https://api.revoengine.com/api/v1/accounts/{userId}/keys/{key}/rotate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.revoengine.com/api/v1/accounts/{userId}/keys/{key}/rotate"
payload = { "version": 1 }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)
