Upload a PDF to a policy version (UI-only)
curl --request POST \
--url https://api.trycomp.ai/v1/policies/{id}/pdf \
--header 'Content-Type: multipart/form-data' \
--header 'X-API-Key: <api-key>' \
--form 'file=<string>'const form = new FormData();
form.append('file', '<string>');
const options = {method: 'POST', headers: {'X-API-Key': '<api-key>'}};
options.body = form;
fetch('https://api.trycomp.ai/v1/policies/{id}/pdf', 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}/pdf"
payload = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n<string>\r\n-----011000010111000001101001--"
headers = {"X-API-Key": "<api-key>"}
response = requests.post(url, data=payload, headers=headers)
print(response.text)Policies
Upload a PDF to a policy version (UI-only) | Comp AI API
Uploads a PDF via multipart file or base64 fileData JSON. Defaults to the latest draft if no versionId; 400 if no draft is available. UI-only — AI.
POST
/
v1
/
policies
/
{id}
/
pdf
Upload a PDF to a policy version (UI-only)
curl --request POST \
--url https://api.trycomp.ai/v1/policies/{id}/pdf \
--header 'Content-Type: multipart/form-data' \
--header 'X-API-Key: <api-key>' \
--form 'file=<string>'const form = new FormData();
form.append('file', '<string>');
const options = {method: 'POST', headers: {'X-API-Key': '<api-key>'}};
options.body = form;
fetch('https://api.trycomp.ai/v1/policies/{id}/pdf', 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}/pdf"
payload = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n<string>\r\n-----011000010111000001101001--"
headers = {"X-API-Key": "<api-key>"}
response = requests.post(url, data=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
multipart/form-dataapplication/json
Response
201
Was this page helpful?

