Map controls to a policy
curl --request POST \
--url https://api.trycomp.ai/v1/policies/{id}/controls \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"controlIds": [
"ctl_abc123def456"
]
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({controlIds: ['ctl_abc123def456']})
};
fetch('https://api.trycomp.ai/v1/policies/{id}/controls', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.trycomp.ai/v1/policies/{id}/controls"
payload = { "controlIds": ["ctl_abc123def456"] }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)Policies
Map controls to a policy | Comp AI API
Map controls to a policy in Comp AI. Create, version, publish, export, map, and improve compliance policies with AI-assisted drafting and approval workflows.
POST
/
v1
/
policies
/
{id}
/
controls
Map controls to a policy
curl --request POST \
--url https://api.trycomp.ai/v1/policies/{id}/controls \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"controlIds": [
"ctl_abc123def456"
]
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({controlIds: ['ctl_abc123def456']})
};
fetch('https://api.trycomp.ai/v1/policies/{id}/controls', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.trycomp.ai/v1/policies/{id}/controls"
payload = { "controlIds": ["ctl_abc123def456"] }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)Authorizations
API key for authentication
Headers
Organization ID (required for session auth, optional for API key auth)
Path Parameters
Policy ID
Example:
"pol_abc123def456"
Body
application/json
Controls to map to the policy
Control IDs to connect to this policy. Existing mappings are kept.
Example:
["ctl_abc123def456"]
Response
201 - undefined
Was this page helpful?

