v56

latestOpenAPI 3.0.0raw.githubusercontent.com2026-08-014121451.1 MB
Policies

Request a presigned URL to upload a policy PDF

Generates a presigned S3 URL for uploading a policy PDF directly to storage. Use this when attaching a PDF to a compliance policy — the file bytes are uploaded straight to S3 without passing through the API. Requires the policy ID; if you only know the policy name, look it up first via the list-compliance-policies tool. After uploading the file to the returned URL, finalize the attachment by calling confirm-policy-pdf-uploaded with the same s3Key.

post/v1/policies/{id}/pdf/upload-url

Path parameters

idstring required
Example:pol_abc123def456

Policy ID

Headers

X-Organization-Idstring

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

Request body

versionIdstring

Optional version ID to attach the PDF to. Omit to attach the PDF at the policy level (legacy path).

fileNamestring required

Filename of the PDF (e.g., "policy-v1.pdf"). Non-alphanumeric characters will be replaced with underscores when storing in S3.

fileTypestring required

MIME type of the file. Must be "application/pdf" — the presigned URL enforces this at upload time.

Example request

{
  "versionId": "pv_abc123def456",
  "fileName": "acceptable-use-v1.pdf",
  "fileType": "application/pdf"
}

Response

uploadUrlstring required

Presigned S3 URL. PUT the raw file bytes to this URL with header Content-Type: application/pdf. No auth headers required — the signature is in the URL.

s3Keystring required

The S3 key the file will land at. Pass this back to the confirm endpoint after a successful upload.

expiresInnumber required

Seconds until the presigned URL expires.

Example response

{
  "uploadUrl": "https://bucket.s3.us-east-1.amazonaws.com/org_xxx/policies/pol_xxx/...?X-Amz-Signature=...",
  "s3Key": "org_abc/policies/pol_xyz/1735000000-acceptable-use-v1.pdf",
  "expiresIn": 900
}