Link references from a document to other documents
curl --request POST \
--url https://api.trycomp.ai/v1/policies/{id}/references \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"targetIds": [
"pol_kK4lLmMn5oOpPq6rRsSt7uUv"
]
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({targetIds: ['pol_kK4lLmMn5oOpPq6rRsSt7uUv']})
};
fetch('https://api.trycomp.ai/v1/policies/{id}/references', 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}/references"
payload = { "targetIds": ["pol_kK4lLmMn5oOpPq6rRsSt7uUv"] }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)Policies
Link references from a document to other | Comp AI API
Adds references from a policy, standard or procedure to other documents in the same organization, e.g. the policies a standard implements. Idempotent. Read.
POST
/
v1
/
policies
/
{id}
/
references
Link references from a document to other documents
curl --request POST \
--url https://api.trycomp.ai/v1/policies/{id}/references \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"targetIds": [
"pol_kK4lLmMn5oOpPq6rRsSt7uUv"
]
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({targetIds: ['pol_kK4lLmMn5oOpPq6rRsSt7uUv']})
};
fetch('https://api.trycomp.ai/v1/policies/{id}/references', 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}/references"
payload = { "targetIds": ["pol_kK4lLmMn5oOpPq6rRsSt7uUv"] }
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
IDs of documents (policies, standards or procedures) in this organization to reference from this document. Self-references are rejected; duplicate IDs are deduplicated and links that already exist are kept (idempotent).
Example:
["pol_kK4lLmMn5oOpPq6rRsSt7uUv"]
Response
201
Was this page helpful?

