Skip to main content
This tool requires publicly accessible PDF URLs. If your files are stored locally or in memory, you can upload them to our temporary bucket first using the Get Signed Upload URL endpoint.
POST https://api.pdfnoodle.com/v1/tools/merge-pdfs

Request

curl --location 'https://api.pdfnoodle.com/v1/tools/merge-pdfs' \
--header 'Authorization: Bearer pdfnoodle_api_123456789' \
--header 'Content-Type: application/json' \
--data '{
    "urls": [
        "https://example.com/document-1.pdf",
        "https://example.com/document-2.pdf",
        "https://example.com/document-3.pdf"
    ],
    "finalFilename": "merged-report.pdf",
    "expiration": 3600
}'

Response

{
  "status": "SUCCESS",
  "url": "https://s3.amazonaws.com/...",
  "fileName": "merged-report.pdf",
  "urlValidUntil": "2025-01-01T02:00:00.000Z"
}
The response contains a url pointing to the merged PDF file on temporary storage. This URL will expire after the time specified in expiration (default: 1 hour).
PDFs are merged in the exact order they appear in the urls array. Make sure to order them correctly.

Parameters

urls
string[]
required
An array of URLs pointing to the PDF files you want to merge. A minimum of 2 URLs is required. Each URL must be a valid, publicly accessible URL.
finalFilename
string
The desired filename for the merged PDF. Must end with .pdf. If not provided, a random filename will be generated.
expiration
number
default:"3600"
Number of seconds that the generated signed URL will take to expire. Must be between 60 (1 minute) and 604800 (7 days). Default: 3600 (1 hour).