Merge PDFs
POST https://api.getdocuforge.dev/v1/pdf/merge
Combine two or more PDF documents into a single file. PDFs are merged in the order provided.
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
pdfs | string[] | Yes | Array of base64-encoded PDF documents (minimum 2) |
output | string | No | "url" (default) or "base64" |
Example
Response (URL mode)
Response (base64 mode)
Errors
| Status | Code | Description |
|---|---|---|
| 400 | VALIDATION_ERROR | Fewer than 2 PDFs provided, or PDF exceeds size limit |
| 401 | UNAUTHORIZED | Invalid or missing API key |
| 429 | RATE_LIMITED | Too many requests |
| 500 | INTERNAL_ERROR | Server error during merge |

