Document Utilities
PDF Unlock
Unlocks a password-protected PDF and returns an unprotected copy with the original's security facts.#
POST
/lmkit/v1/pdf-unlockDecrypts a password-protected PDF using the provided password and saves an unprotected copy on the server. The original file is not modified. The response also reports the protection the ORIGINAL carried (encryption method, the author's permissions, and whether the owner or the reader password opened it), so a document manager can keep those facts beside the unlocked copy. Returns 422 if the password is incorrect ('password_required'), the encryption is not supported ('unsupported_security') or the file is not a valid PDF ('invalid_format').
Request body
application/json ·
| Property | Type | Description |
|---|---|---|
inputrequired | string | The encrypted PDF document (base64 or file identifier). |
input_format | How the input is provided. Defaults to 'Base64EncodedFile'. | |
passwordrequired | string | The password to unlock the PDF. |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | OK | |
| 400 | Bad Request | |
| 422 | Unprocessable Entity |
curl -X POST "$LMKIT_ONE_URL/lmkit/v1/pdf-unlock" \
-H "Authorization: Bearer $LMKIT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": "string",
"input_format": "Base64EncodedFile",
"password": "string"
}'