Sign PDF
Add digital signatures to PDF documents.
https://api.morphopdf.com/v1/pdf/signAuthentication
Retrieve your API Key from Dashboard.
Request Body
Provide the PDF file and signature information.
fileFilePDF file uploaded via multipart/form-data.
urlstringOptionalPublic URL pointing to a PDF file. Alternative to file upload.
signatureobjectSignature configuration object (see below).
Signature Object
Configure the signature appearance and placement.
signerNamestringName of the person signing the document.
signatureDatastringBase64-encoded PNG or JPEG image of the signature.
signaturesarrayArray of signature positions. Each position specifies where to place the signature.
Signature Position
Each item in the signatures array specifies a signature placement.
pagenumberPage number (1-indexed) where the signature should be placed.
xnumberX coordinate (in points) from the left edge of the page.
ynumberY coordinate (in points) from the top edge of the page.
widthnumberWidth of the signature image in points.
heightnumberHeight of the signature image in points.
Query Parameters
formatstringOptionalDefault: jsonResponse format. Use 'binary' to receive the signed PDF directly, or 'json' (default) to receive metadata with a download URL.
Coordinate System
Coordinates use a top-left origin with measurements in PDF points (1 point = 1/72 inch). A standard US Letter page is 612 x 792 points, and A4 is 595 x 842 points.
Response
When using format=json (default):
successbooleanIndicates whether the operation completed successfully.
messagestringHuman-readable status message.
fileNamestringName of the signed PDF document.
downloadUrlstringPresigned URL to download the file. Valid for 1 hour.
signaturesAppliednumberNumber of signature placements applied to the document.
signerstringName of the signer.
Binary Response
Add ?format=binary to receive the signed PDF directly with these headers:
Content-Type: application/pdfContent-Disposition: attachment; filename="signed.pdf"
Error Responses
| Status | Code | Description |
|---|---|---|
| 400 | INVALID_INPUT | No file provided or invalid file format |
| 400 | MISSING_REQUIRED_FIELD | Missing signerName, signatureData, or signature positions |
| 400 | PASSWORD_PROTECTED | Cannot sign password-protected PDF. Unlock it first. |
| 401 | AUTHENTICATION_REQUIRED | Missing or invalid API key |
| 413 | FILE_TOO_LARGE | File exceeds maximum size limit |
| 500 | PROCESSING_FAILED | Internal processing error |
/v1/pdf/signcurl -X POST "https://api.morphopdf.com/v1/pdf/sign?format=binary" \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "file=@document.pdf" \
-F 'signature={"signerName":"John Doe","signatureData":"<base64-encoded-image>","signatures":[{"page":1,"x":100,"y":100,"width":200,"height":50}]}' \
--output signed.pdf{
"success": true,
"message": "File processed successfully",
"fileName": "signed.pdf",
"downloadUrl": "https://files.morphopdf.com/sessions/abc123/output/signed.pdf?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Expires=3600&...",
"signaturesApplied": 2,
"signer": "John Doe"
}