Skip to main content
POST
/
v1
/
policies
/
{id}
/
pdf
/
confirm
Confirm a policy PDF upload completed
curl --request POST \
  --url https://api.trycomp.ai/v1/policies/{id}/pdf/confirm \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "s3Key": "org_abc/policies/pol_xyz/1735000000-acceptable-use-v1.pdf"
}
'
const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({s3Key: 'org_abc/policies/pol_xyz/1735000000-acceptable-use-v1.pdf'})
};

fetch('https://api.trycomp.ai/v1/policies/{id}/pdf/confirm', 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/confirm"

payload = { "s3Key": "org_abc/policies/pol_xyz/1735000000-acceptable-use-v1.pdf" }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)

Authorizations

X-API-Key
string
header
required

API key for authentication

Headers

X-Organization-Id
string

Organization ID (required for session auth, optional for API key auth)

Path Parameters

id
string
required

Policy ID

Example:

"pol_abc123def456"

Body

application/json
s3Key
string
required

The exact s3Key returned by the upload-url endpoint.

Example:

"org_abc/policies/pol_xyz/1735000000-acceptable-use-v1.pdf"

versionId
string

Optional version ID — must match the versionId passed to the upload-url endpoint. Omit if attaching at the policy level.

Example:

"pv_abc123def456"

Response

201 - undefined