Logo
POST /api/pdf/file/merge

Merge PDF API

Send a list of PDF URLs and get one PDF back — in the order you choose, with only the pages you need from each file. Built for invoices, report packs and contract bundles.

  • Free plan
  • No credit card

Request

curl -X POST https://apdf.io/api/pdf/file/merge \
  -H "Authorization: Bearer TOKEN" \
  -d files[0][file]="FILE_1_URL" \
  -d files[0][pages]="1,5-z" \
  -d files[1][file]="FILE_2_URL"

Pick the pages.
Set the order.

Every file in the request carries its own page selection. The merged PDF follows your list exactly.

contract.pdf 1-3
1 2 3 4 5
terms.pdf 2,6-z
1 2 3 4 5 6 7 8
annex.pdf r1
1 2 3 4
POST /api/pdf/file/merge
merged.pdf
1 2 3 4 5 6 7 8
The pages parameter
1,6,4
Pages 1, 6 and 4, in exactly that order
3-7
Pages 3 through 7
2,6-z
Page 2, then page 6 to the end
r3-r1
The last three pages, counted from the back
(left out)
The whole file

One file instead of five.

Wherever your product sends several PDFs to one person, a merge turns them into a single document they actually open.

Invoice plus terms

Append your terms and conditions to every invoice your app generates, so the customer gets one attachment instead of two.

Monthly report packs

Collect the reports each team produces into one pack for the board, and keep only the summary pages of the long ones.

Contracts with annexes

Assemble the main contract with just the annex pages that apply to this customer, in the order your legal team expects.

Application dossiers

Turn a CV, a cover letter and a handful of certificates uploaded by an applicant into one file a reviewer can read top to bottom.

Merge from anywhere.

The same merge, wherever your files already live. One account and one monthly allowance behind every route.

Your code

One authenticated POST from any language. Copy-paste samples in cURL, Node.js, Python and more.

POST /api/pdf/file/merge
Open the endpoint docs
Zapier

Pick the action in any Zap and map files from earlier steps. No code and no servers to run.

Merge PDFs
Use it in Zapier
n8n

Add the Apdf node to any workflow, on n8n Cloud or self-hosted, and chain it with your automation.

Merge PDF files
Use it in n8n
AI agents

Let Claude, ChatGPT, Gemini or your own agent run it through the MCP server, on any paid plan.

merge-pdf-files
See what agents can do

1,000 merges
a month. Free.

Start on the free plan and move up only when your volume does — up to 1,000,000 operations a month on Business.

  • One call is one operation, however many pages.
  • Only calls that do the work are counted.
  • Hard limits, so no surprise overage charges.
Plan PDF operations / month
Hobby Free
$0 / month
1,000
Pro
$39–$99 / month
20,000 – 60,000
Business
$149–$899 / month
100,000 – 1,000,000

Merging PDFs, answered

As URLs: Apdf downloads each file, up to 100 MB per file. In Zapier and n8n you can map the files from earlier steps instead.
No. One call is one operation, no matter how many files or pages it merges.
No. Pages are copied over as they are rather than re-rendered, so text stays selectable and images keep their quality.
Send async=1 and you get a job ID back right away. Check it on the job status endpoint, or pass a webhook_url and the result is posted to you when it is ready.
The response contains a download URL that stays valid for 60 minutes. Store the file on your side if you need it longer.
After the API call

Your code made the PDF.
Then it went dark.

Opened, read, signed or ignored — you never see any of it. Send the PDFs you generate as personal links, and every open, page read, comment and signature comes back to your software as a webhook. Need it signed? Same link. Same account, same API key, one more call.

Your PDF, after sending Live
document:loaded CFO
page:read p4 · 38s
signature:signed 11:48

API · Webhook · MCP

Your first merge
is one API call away.