Skip to content

Upload a PDF to a policy version (UI-only)

POST
/v1/policies/{id}/pdf
curl --request POST \
--url https://api.varman.io/v1/policies/pol_abc123def456/pdf \
--header 'Content-Type: multipart/form-data' \
--header 'X-API-Key: <X-API-Key>' \
--form file=binary \
--form versionId=example

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 clients should use the presigned /pdf/upload-url + /pdf/confirm flow.

id
required
string

Example

pol_abc123def456

Policy ID

X-Organization-Id
string

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

One of:

Multipart file upload (recommended)

object
file
required
string format: binary
versionId

Target version ID. If omitted, uploads to the latest draft version.

string