Accounts
Create an API key.
ROLES: USER_WRITE,USER_ADMIN USER: true SERVICE ACCOUNT: true
POST
/
api
/
v1
/
accounts
/
{userId}
/
keys
Create an API key.
curl --request POST \
--url https://api.revoengine.com/api/v1/accounts/{userId}/keys \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"restricted": true
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', restricted: true})
};
fetch('https://api.revoengine.com/api/v1/accounts/{userId}/keys', 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"
payload = {
"name": "<string>",
"restricted": True
}
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-*).
Path Parameters
Body
application/json
You need to provide name of the user.
You can provide if key should be whitelisted.
Optional resource metadata. Top-level keys starting with "__" are reserved for backend use.
Use an empty array or null when restricted is false; provide at least one complete entry when restricted is true.
Show child attributes
Show child attributes
Optional API key expiration timestamp. When provided, it must be at least four hours in the future.
Response
OK.
Last modified on September 5, 2026
⌘I
Create an API key.
curl --request POST \
--url https://api.revoengine.com/api/v1/accounts/{userId}/keys \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"restricted": true
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', restricted: true})
};
fetch('https://api.revoengine.com/api/v1/accounts/{userId}/keys', 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"
payload = {
"name": "<string>",
"restricted": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)
