---
title: "Merge PDFs"
method: POST
path: "/v1/pdf-tools/merge"
tags: ["PDF Tools"]
---

# Merge PDFs

`POST /v1/pdf-tools/merge`

Concatenate 2 or more PDFs into a single PDF, in the order provided. Each input PDF is supplied as either an HTTPS URL or a base64 string.

**Credits:** 1 credit per call.

## Request body

- MergePdfRequest
  - `export_type` 'url' | 'binary'
  - `expiration` integer — URL expiration in seconds. Min 60, max 604800. Only applies to `url` export type.
  - `filename` string, nullable — Custom filename (without `.pdf`). Defaults to a generic name.
  - `pdfs` PdfInput[], required — Ordered list of PDFs to merge. Each entry has either `pdf_url` or `pdf_base64`. Minimum 2.
    - `pdf_url` string, nullable — Public HTTPS URL to download the PDF from
    - `pdf_base64` string, nullable — PDF file encoded as a base64 string

## Response `200`

Successful Response

- PdfToolsResponse
  - `url` string, required — Signed URL to download the PDF
  - `filename` string, required — Filename of the resulting PDF
  - `credits_remaining` integer, required — Remaining credits after this request
  - `expires_in` integer, required — Seconds until the signed URL expires

## Other responses

- `402` — Insufficient credits
- `422` — Invalid input (bad PDF, out-of-bounds page, etc.)
- `429` — Rate limit exceeded

---

[API](https://skmtc.net/pdftemplateapi/apis/templatefox-api.md) · [All operations](https://skmtc.net/pdftemplateapi/apis/templatefox-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/pdftemplateapi/templatefox-api/revisions/5673fc0d5fad/schema)
