---
title: "Merge PDFs and best-effort compress the final file"
method: POST
path: "/api/v1/merge-compress"
tags: ["Portal-Ready Workflows"]
---

# Merge PDFs and best-effort compress the final file

`POST /api/v1/merge-compress`

## Request

- Base URL: `https://exactpdf.com`
- URL: `https://exactpdf.com/api/v1/merge-compress`
- Auth: HTTP bearer

Merge 2-20 PDFs in order, repack the final PDF, and return measured output headers. Optional target_bytes tells the API to report whether the best-effort output is at or below a portal/upload limit. Launch cost: 1 credit on successful output. This is not a guaranteed exact-size compressor.

## Response `200`

PDF output with ExactPDF workflow measurement headers.

## Other responses

- `400`: Structured ExactPDF API error.
- `401`: Structured ExactPDF API error.
- `402`: Structured ExactPDF API error.
- `413`: Structured ExactPDF API error.

---

[API](https://skmtc.dev/exactpdf/apis/exactpdf-api.md) · [All operations](https://skmtc.dev/exactpdf/apis/exactpdf-api/llms.txt) · [OpenAPI document](https://skmtc.dev/exactpdf/apis/exactpdf-api/revisions/98874db17413?raw)
