Get policy versions
curl --request GET \
--url https://api.trycomp.ai/v1/policies/{id}/versions \
--header 'X-API-Key: <api-key>'const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.trycomp.ai/v1/policies/{id}/versions', 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}/versions"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"versions": [
{}
],
"currentVersionId": "<string>",
"pendingVersionId": "<string>"
}{
"message": "Unauthorized"
}{
"message": "Resource not found"
}Policies
Get policy versions | Comp AI API
Get policy versions in Comp AI. Create, version, publish, export, map, and improve compliance policies with AI-assisted drafting and approval workflows.
GET
/
v1
/
policies
/
{id}
/
versions
Get policy versions
curl --request GET \
--url https://api.trycomp.ai/v1/policies/{id}/versions \
--header 'X-API-Key: <api-key>'const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.trycomp.ai/v1/policies/{id}/versions', 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}/versions"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"versions": [
{}
],
"currentVersionId": "<string>",
"pendingVersionId": "<string>"
}{
"message": "Unauthorized"
}{
"message": "Resource 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?

