List policies
curl --request GET --url "https://api.trycomp.ai/v1/policies" --header "X-API-Key: $COMP_AI_API_KEY"const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.trycomp.ai/v1/policies', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.trycomp.ai/v1/policies"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"data": [
{
"id": "pol_abc123def456",
"name": "Data Privacy Policy",
"description": "This policy outlines how we handle and protect personal data",
"status": "draft",
"content": [
{
"type": "paragraph",
"attrs": {
"textAlign": null
},
"content": [
{
"type": "text",
"text": "This policy outlines our commitment to protecting personal data."
}
]
}
],
"frequency": "yearly",
"department": "IT",
"isRequiredToSign": true,
"signedBy": [],
"reviewDate": "2024-12-31T00:00:00.000Z",
"isArchived": false,
"createdAt": "2024-01-01T00:00:00.000Z",
"updatedAt": "2024-01-15T00:00:00.000Z",
"lastArchivedAt": null,
"lastPublishedAt": "2024-01-10T00:00:00.000Z",
"organizationId": "org_abc123def456",
"assigneeId": "usr_abc123def456",
"approverId": "usr_xyz789abc123",
"policyTemplateId": null
}
],
"authType": "session",
"authenticatedUser": {
"id": "usr_abc123def456",
"email": "user@company.com"
}
}{
"message": "Unauthorized"
}Policies
List compliance policies | Comp AI API
List compliance policies for an organization, including drafts and published policies used for SOC 2, ISO 27001, HIPAA, and GDPR workflows.
GET
/
v1
/
policies
List policies
curl --request GET --url "https://api.trycomp.ai/v1/policies" --header "X-API-Key: $COMP_AI_API_KEY"const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.trycomp.ai/v1/policies', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.trycomp.ai/v1/policies"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"data": [
{
"id": "pol_abc123def456",
"name": "Data Privacy Policy",
"description": "This policy outlines how we handle and protect personal data",
"status": "draft",
"content": [
{
"type": "paragraph",
"attrs": {
"textAlign": null
},
"content": [
{
"type": "text",
"text": "This policy outlines our commitment to protecting personal data."
}
]
}
],
"frequency": "yearly",
"department": "IT",
"isRequiredToSign": true,
"signedBy": [],
"reviewDate": "2024-12-31T00:00:00.000Z",
"isArchived": false,
"createdAt": "2024-01-01T00:00:00.000Z",
"updatedAt": "2024-01-15T00:00:00.000Z",
"lastArchivedAt": null,
"lastPublishedAt": "2024-01-10T00:00:00.000Z",
"organizationId": "org_abc123def456",
"assigneeId": "usr_abc123def456",
"approverId": "usr_xyz789abc123",
"policyTemplateId": null
}
],
"authType": "session",
"authenticatedUser": {
"id": "usr_abc123def456",
"email": "user@company.com"
}
}{
"message": "Unauthorized"
}Authorizations
API key for authentication
Headers
Organization ID (required for session auth, optional for API key auth)
Response
Policies retrieved successfully
Was this page helpful?

