Delete compliance policy
curl --request DELETE \
--url https://api.trycomp.ai/v1/policies/{id} \
--header 'X-API-Key: <api-key>'const options = {method: 'DELETE', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.trycomp.ai/v1/policies/{id}', 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}"
headers = {"X-API-Key": "<api-key>"}
response = requests.delete(url, headers=headers)
print(response.text){
"success": true,
"deletedPolicy": {
"id": "pol_abc123def456",
"name": "Data Privacy Policy"
},
"authType": "api-key"
}{
"message": "Unauthorized"
}{
"message": "Policy with ID pol_abc123def456 not found"
}Policies
Delete compliance policy | Comp AI API
Delete a compliance policy that is no longer part of the organization evidence library or control program.
DELETE
/
v1
/
policies
/
{id}
Delete compliance policy
curl --request DELETE \
--url https://api.trycomp.ai/v1/policies/{id} \
--header 'X-API-Key: <api-key>'const options = {method: 'DELETE', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.trycomp.ai/v1/policies/{id}', 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}"
headers = {"X-API-Key": "<api-key>"}
response = requests.delete(url, headers=headers)
print(response.text){
"success": true,
"deletedPolicy": {
"id": "pol_abc123def456",
"name": "Data Privacy Policy"
},
"authType": "api-key"
}{
"message": "Unauthorized"
}{
"message": "Policy with ID pol_abc123def456 not found"
}Authorizations
API key for authentication
Headers
Organization ID (required for session auth, optional for API key auth)
Path Parameters
Policy ID
Example:
"pol_abc123def456"
Was this page helpful?

