curl --request POST \
--url http://localhost:3333/v1/roles \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"name": "Compliance Lead",
"permissions": {
"control": [
"read",
"update"
],
"policy": [
"read",
"update"
],
"risk": [
"read"
]
}
}
'{
"id": "rol_abc123",
"name": "compliance-lead",
"permissions": {},
"isBuiltIn": false,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}Create a new custom role with specified permissions. Only admins and owners can create roles.
curl --request POST \
--url http://localhost:3333/v1/roles \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"name": "Compliance Lead",
"permissions": {
"control": [
"read",
"update"
],
"policy": [
"read",
"update"
],
"risk": [
"read"
]
}
}
'{
"id": "rol_abc123",
"name": "compliance-lead",
"permissions": {},
"isBuiltIn": false,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}API key for authentication
Was this page helpful?