Document Utilities
PDF Unlock
Unlocks a password-protected PDF and returns an unprotected copy.#
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. Returns 422 if the password is incorrect ('password_required') 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"
}'