Skip to main content
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

X-API-Key
string
header
required

API key for authentication

Path Parameters

name
string
required

Built-in role name

Example:

"owner"

Body

application/json
obligations
object
required

Obligations override for the built-in role.

Example:
{ "compliance": false }

Response

Obligations updated

name
string
obligations
object