ohmywrap
Get an API key

§ Protection

Encrypt PDF API

Encrypts an unprotected document with AES-256. Here the `password` field is the password to set, and it becomes both the user and the owner password. It is never written to a log, an error message, or a trace.

Endpoint
POST /pdf/encrypt
Inputs
Exactly 1 unprotected PDF
Returns
application/pdf, protected
Limits
20 MB per file, 3,000 pages. AES-256.
Price
$0.001

§ 01 The request

One POST, and the file comes back.

POST /pdf/encrypt
curl -sS --fail-with-body \
  -o locked.pdf \
  -H "Authorization: Bearer $OHMYWRAP_KEY" \
  -F "file=@payslip.pdf" \
  -F "password=$DOC_PASSWORD" \
  https://api.ohmywrap.com/pdf/encrypt

Options

None. Send the file and nothing else. An options object is still accepted, but any key inside it is 422 invalid_options.

Worth knowing

An already-protected document is 422 already_encrypted. Decrypt it first, or use /pdf/change-password, which does both in one request.

Your first /pdf/encrypt call takes one line of curl.

Ten thousand calls cost ten dollars, the pack never expires, and nothing you send is kept.

10,000 calls for $10. No subscription, no expiry.