Skip to main content
POST
Protect PDF

Authorizations

X-API-Key
string
header
required

API Key (starts with ak_...)

Body

application/json
fileId
string
required

File ID of the PDF to protect

Example:

"550e8400-e29b-41d4-a716-446655440000"

userPassword
string

User password (required to open the PDF). At least one of userPassword or ownerPassword is required.

Example:

"my-secret"

ownerPassword
string

Owner password (required to change permissions). At least one of userPassword or ownerPassword is required.

Example:

"owner-secret"

webhook
object

Optional webhook configuration

Response

201 - application/json

Protect job created

id
string
required

Job ID

Example:

"550e8400-e29b-41d4-a716-446655440000"

action
string
required

Action that was performed

Example:

"pdf.merge"

status
enum<string>
required

Current job status

Available options:
PENDING,
PROCESSING,
COMPLETED,
FAILED
Example:

"PENDING"

inputFileIds
string[]
required

Input file IDs used for this job

Example:
outputFileId
object | null
required

Output file ID (available when COMPLETED)

Example:

null

error
object | null
required

Error message (available when FAILED)

Example:

null

createdAt
string<date-time>
required

Job creation timestamp

startedAt
object | null
required

Job start timestamp

completedAt
object | null
required

Job completion timestamp

result
object

Structured job result data (e.g. OCR markdown/JSON, generated filename, PDF metadata, form fields). Available when the job produces a direct result instead of an output file.

metadata
object
deprecated

Deprecated — use result instead. Additional metadata, duplicated from result for backward compatibility.