Update obligations for a built-in role
curl --request PATCH \
--url https://api.trycomp.ai/v1/roles/built-in/{name}/obligations \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"obligations": {
"compliance": false
}
}
'const options = {
method: 'PATCH',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({obligations: {compliance: false}})
};
fetch('https://api.trycomp.ai/v1/roles/built-in/{name}/obligations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.trycomp.ai/v1/roles/built-in/{name}/obligations"
payload = { "obligations": { "compliance": False } }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"name": "<string>",
"obligations": {
"compliance": true
}
}Roles
Update obligations for a built-in role | Comp AI API
Override the obligations for a built-in role (e.g., turn off the compliance obligation for owners). Permissions stay sourced from the hardcoded defaults.
PATCH
/
v1
/
roles
/
built-in
/
{name}
/
obligations
Update obligations for a built-in role
curl --request PATCH \
--url https://api.trycomp.ai/v1/roles/built-in/{name}/obligations \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"obligations": {
"compliance": false
}
}
'const options = {
method: 'PATCH',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({obligations: {compliance: false}})
};
fetch('https://api.trycomp.ai/v1/roles/built-in/{name}/obligations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.trycomp.ai/v1/roles/built-in/{name}/obligations"
payload = { "obligations": { "compliance": False } }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"name": "<string>",
"obligations": {
"compliance": true
}
}Authorizations
API key for authentication
Path Parameters
Built-in role name
Example:
"owner"
Body
application/json
Obligations override for the built-in role.
Show child attributes
Show child attributes
Example:
{ "compliance": false }
Was this page helpful?

