/api/admin/api-keys (POST)
POST
/api/admin/api-keys
const url = 'https://your-tenant.consystence.com/api/admin/api-keys';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"role":"example","name":"example","expiresAt":"2026-04-15T12:00:00Z","class":"example","siteCode":"example","onBehalfOf":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://your-tenant.consystence.com/api/admin/api-keys \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "role": "example", "name": "example", "expiresAt": "2026-04-15T12:00:00Z", "class": "example", "siteCode": "example", "onBehalfOf": "example" }'Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
role
string
name
string
expiresAt
string format: date-time
class
string
siteCode
string
onBehalfOf
string
Examplegenerated
{ "role": "example", "name": "example", "expiresAt": "2026-04-15T12:00:00Z", "class": "example", "siteCode": "example", "onBehalfOf": "example"}Responses
Section titled “ Responses ”OK