Confirm a policy PDF upload completed
POST
/v1/policies/{id}/pdf/confirm
const url = 'https://api.varman.io/v1/policies/pol_abc123def456/pdf/confirm';const options = { method: 'POST', headers: {'X-API-Key': '<X-API-Key>', 'Content-Type': 'application/json'}, body: '{"s3Key":"org_abc/policies/pol_xyz/1735000000-acceptable-use-v1.pdf","versionId":"pv_abc123def456"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.varman.io/v1/policies/pol_abc123def456/pdf/confirm \ --header 'Content-Type: application/json' \ --header 'X-API-Key: <X-API-Key>' \ --data '{ "s3Key": "org_abc/policies/pol_xyz/1735000000-acceptable-use-v1.pdf", "versionId": "pv_abc123def456" }'Links an uploaded PDF to a compliance policy after the file has been PUT to a presigned S3 URL. Call this after request-policy-pdf-upload-url returned an s3Key and you successfully uploaded the file bytes to that URL. The endpoint verifies the file exists in S3 before linking it to the policy or version.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string
Example
pol_abc123def456Policy ID
Header Parameters
Section titled “Header Parameters”X-Organization-Id
string
Organization ID (required for session auth, optional for API key auth)
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
s3Key
required
The exact s3Key returned by the upload-url endpoint.
string
Example
org_abc/policies/pol_xyz/1735000000-acceptable-use-v1.pdfversionId
Optional version ID — must match the versionId passed to the upload-url endpoint. Omit if attaching at the policy level.
string
Example
pv_abc123def456