Skip to content

Encrypt a PDF

POST
/v1/pdf/encrypt
curl -H "X-Api-Key: $KEY" -F files=@a.pdf -F userPassword=open \
-F ownerPassword=admin http://localhost:9027/v1/pdf/encrypt -o locked.pdf

Encrypts a PDF with AES-256.

Media typemultipart/form-data
object
files
required

One PDF.

string format: binary
outputFilename
string | null
ownerPassword
required
string
userPassword
string | null

The encrypted PDF

Media typeapplication/pdf

The file, as bytes.

string format: binary

Accepted; the result goes to the webhook

The request is wrong

Media typeapplication/json

The JSON body of every error response.

object
error
required

A stable, machine-readable kind.

string
message
required

What went wrong, for a person.

string

Example

{
"error": "invalid_request",
"message": "unknown step 'teleport'"
}

An engine is unavailable or the request timed out

Media typeapplication/json

The JSON body of every error response.

object
error
required

A stable, machine-readable kind.

string
message
required

What went wrong, for a person.

string

Example

{
"error": "invalid_request",
"message": "unknown step 'teleport'"
}