curl --request GET \
--url https://api.trycomp.ai/v1/policies/{id} \
--header 'X-API-Key: <api-key>'const options = {method: 'GET', 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.get(url, headers=headers)
print(response.text){
"id": "pol_abc123def456",
"name": "Data Privacy Policy",
"status": "draft",
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "..."
}
]
}
],
"isRequiredToSign": true,
"signedBy": [],
"createdAt": "2024-01-01T00:00:00.000Z",
"updatedAt": "2024-01-15T00:00:00.000Z",
"organizationId": "org_abc123def456"
}{
"message": "Unauthorized"
}{
"message": "Policy with ID pol_abc123def456 not found"
}Get compliance policy | Comp AI API
Retrieve a single compliance policy by its ID, including current content, draft content, review status, framework links, and audit metadata. Use this.
curl --request GET \
--url https://api.trycomp.ai/v1/policies/{id} \
--header 'X-API-Key: <api-key>'const options = {method: 'GET', 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.get(url, headers=headers)
print(response.text){
"id": "pol_abc123def456",
"name": "Data Privacy Policy",
"status": "draft",
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "..."
}
]
}
],
"isRequiredToSign": true,
"signedBy": [],
"createdAt": "2024-01-01T00:00:00.000Z",
"updatedAt": "2024-01-15T00:00:00.000Z",
"organizationId": "org_abc123def456"
}{
"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
"pol_abc123def456"
Response
Policy retrieved successfully
The policy ID
"pol_abc123def456"
Name of the policy
"Data Privacy Policy"
Description of the policy
"This policy outlines how we handle and protect personal data"
Status of the policy
draft, published, needs_review "draft"
Content of the policy as TipTap JSON (array of nodes)
[ { "type": "heading", "attrs": { "level": 2, "textAlign": null }, "content": [{ "type": "text", "text": "Purpose" }] }, { "type": "paragraph", "attrs": { "textAlign": null }, "content": [ { "type": "text", "text": "Verify workforce integrity and grant the right access at start, revoke at end." } ] } ]
Review frequency of the policy
monthly, quarterly, yearly "yearly"
Department this policy applies to. May be one of the built-in values (none, admin, gov, hr, it, itsm, qms) or a custom department name.
"it"
Whether this policy requires a signature
true
List of user IDs who have signed this policy
["usr_123", "usr_456"]
Review date for the policy
"2024-12-31T00:00:00.000Z"
Whether this policy is archived
false
When the policy was archived by framework sync
"2024-02-01T00:00:00.000Z"
When the policy was created
"2024-01-01T00:00:00.000Z"
When the policy was last updated
"2024-01-15T00:00:00.000Z"
When the policy was last archived
"2024-02-01T00:00:00.000Z"
When the policy was last published
"2024-01-10T00:00:00.000Z"
Organization ID this policy belongs to
"org_abc123def456"
Member ID of the organization member this policy is assigned to — the id of the expanded assignee
"mem_abc123def456"
Member ID of the organization member who approved this policy
"mem_xyz789abc123"
ID of the policy template this policy is based on
"plt_template123"
Was this page helpful?

