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)Body
application/json
Response
201
⌘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)
