apyhub
FILE CONVERSION · FILE MANIPULATION

Merge Files to PDF API

What it does

File to PDF Merge converts and combines multiple files into a single PDF. Send either public file URLs or uploaded files, and get back a merged PDF for direct download or a stored S3 URL depending on the endpoint you use.

Use the URL-based endpoints when your source files are already hosted online. They accept up to 10 file_urls in order, and support common document, spreadsheet, presentation, text, image, HTML, Markdown, and PDF formats. Use the upload-based endpoints when your files are coming from your own request body; you can send one or more files and receive either the PDF as a binary response or a JSON response containing a url.

This is a good fit for report assembly, document bundling, and turning mixed content into a single shareable PDF. Keep source files in the order you want them merged, and use the output format that matches your workflow: immediate download for local processing, or an S3 URL for handing off to another system.

▣ ENDPOINT 01 / 04
POST
Convert and merge files to PDF (URLs → download)
https://api.eu.apyverse.com/apyhub/convert-and-merge-files-to-pdf/url/download

QUICKSTART

GUIDE

Quickstart

Send a list of public file URLs to convert and merge them into a PDF, and set the output format in the query string.

curl -X POST "https://api.eu.apyverse.com/apyhub/convert-and-merge-files-to-pdf/url/download?output=pdf" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "file_urls": [
      "https://assets.apyhub.com/samples/sample.pdf",
      "https://assets.apyhub.com/samples/sample.docx"
    ]
  }'

What you'll get back

Returns a binary file response. The output schema is a single string with format: binary, so the response is the generated PDF content itself.

TRY ITLIVE · 150 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
body*
file_urls*
Publicly accessible file URLs to convert and merge, in order. Max 10, 100 MB each. Supported types: docx, xlsx, pptx, doc, xls, ppt, odt, ods, odp, csv, txt, png, jpg, jpeg, gif, bmp, tiff, html, htm, md, pdf.

About this endpoint

What it does

Converts the files referenced by the provided URLs into PDF and merges them into a single output. The request supplies an ordered list of public file URLs, and the response is the resulting PDF binary.

Request Body

ParameterTypeMandatoryDescription
file_urlsString ArrayYesPublicly accessible file URLs to convert and merge, in order.<br>Max 10 URLs, 100 MB each.<br>Supported types: docx, xlsx, pptx, doc, xls, ppt, odt, ods, odp, csv, txt, png, jpg, jpeg, gif, bmp, tiff, html, htm, md, pdf. <br> Each item must be a URI.

Response

Returns a binary PDF file as the success response body. The output schema is a binary string, so the endpoint responds with the generated merged PDF content rather than a JSON object.

ParameterTypeMandatoryDescription
binaryStringYesThe generated PDF file content returned as a binary payload.

Notes

The request accepts up to 10 file URLs, and each source file can be up to 100 MB. The files are processed in the order supplied in file_urls.

Query parameters

Name
Type
Description
outputOPTIONAL
string

Body

Name
Type
Description
bodyREQUIRED
object
▣ ENDPOINT 02 / 04
POST
Convert and merge files to PDF (URLs → S3 URL)
https://api.eu.apyverse.com/apyhub/convert-and-merge-files-to-pdf/url/url

QUICKSTART

GUIDE

Quickstart

Convert and merge one or more publicly accessible file URLs into a single PDF.

curl -X POST "https://api.eu.apyverse.com/apyhub/convert-and-merge-files-to-pdf/url/url" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "file_urls": [
      "https://assets.apyhub.com/samples/sample.pdf",
      "https://assets.apyhub.com/samples/sample.docx"
    ]
  }'

What you'll get back

Returns a JSON object with a url string field containing the URI of the generated PDF.

{
  "url": "https://s3.amazonaws.com/bucket/converted.pdf"
}
TRY ITLIVE · 150 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
body*
file_urls*
Publicly accessible file URLs to convert and merge, in order. Max 10.

About this endpoint

What it does

Converts the files referenced by publicly accessible URLs into PDF and merges them into a single PDF file. The response returns a JSON object with a url field pointing to the generated PDF file.

Query Parameter(s)

AttributeTypeMandatoryDescription
outputStringNoResponse format/output selector. The schema does not define allowed values or a default.

Request Body

ParameterTypeMandatoryDescription
file_urlsString ArrayYesPublicly accessible file URLs to convert and merge, in order. Maximum 10 URLs; each item must be a URI.

Response

Returns a JSON object with a url string field containing the generated PDF file URL.

ParameterTypeMandatoryDescription
urlStringNoURI of the generated PDF file.

Query parameters

Name
Type
Description
outputOPTIONAL
string

Body

Name
Type
Description
bodyREQUIRED
object
▣ ENDPOINT 03 / 04
POST
Convert and merge files to PDF (file upload → download)
https://api.eu.apyverse.com/apyhub/convert-and-merge-files-to-pdf/file/download

QUICKSTART

GUIDE

Quickstart

Upload one or more files to merge them into a single PDF. This example sends one file and names the output merged-report.

curl -X POST "https://api.eu.apyverse.com/apyhub/convert-and-merge-files-to-pdf/file/download?output=merged-report" \
  -H "apy-token: $APY_TOKEN" \
  -F "files=@/path/to/file1.pdf"

What you'll get back

Returns a single binary file (string with format: binary) — the merged PDF content is returned directly in the response body.

TRY ITLIVE · 150 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
Max 100MB total per request (all files combined). Larger? Use this API's URL-based endpoint instead, if it has one.
body*
files
One or more files to convert and merge. At least one `files` entry or `file_urls` URL is required. Max 10 total across both fields, 100 MB each. Supported types: docx, xlsx, pptx, doc, xls, ppt, odt, ods, odp, csv, txt, png, jpg, jpeg, gif, bmp, tiff, html, htm, md, pdf.

About this endpoint

What it does

Converts one or more uploaded files to PDF and merges them into a single downloadable file. The request sends files in the body, and the response is a binary file download.

Query Parameter(s)

AttributeTypeMandatoryDescription
outputStringNoOutput filename or name hint for the generated PDF download.

Request Body

ParameterTypeMandatoryDescription
filesString ArrayNoOne or more files to convert and merge. At least one files entry or file_urls URL is required. Max 10 total across both fields, 100 MB each. Supported types: docx, xlsx, pptx, doc, xls, ppt, odt, ods, odp, csv, txt, png, jpg, jpeg, gif, bmp, tiff, html, htm, md, pdf.

Response

Returns a binary file as the successful response body. The output schema is a single binary payload, so the endpoint responds with the merged PDF file content rather than a JSON object.

Query parameters

Name
Type
Description
outputOPTIONAL
string

Body

Name
Type
Description
bodyREQUIRED
object

Max 100MB total per request (all files combined). Larger? Use this API's URL-based endpoint instead, if it has one.

▣ ENDPOINT 04 / 04
POST
Convert and merge files to PDF (file upload → S3 URL)
https://api.eu.apyverse.com/apyhub/convert-and-merge-files-to-pdf/file/url

QUICKSTART

GUIDE

Quickstart

Upload one or more files to convert them into a PDF.

curl -X POST "https://api.eu.apyverse.com/apyhub/convert-and-merge-files-to-pdf/file/url" \
  -H "apy-token: $APY_TOKEN" \
  -F "files=@/path/to/file.pdf"

What you'll get back

Returns a JSON object with a url string field containing a downloadable link to the converted PDF.

{
  "url": "https://s3.amazonaws.com/bucket/converted.pdf"
}
TRY ITLIVE · 150 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
Max 100MB total per request (all files combined). Larger? Use this API's URL-based endpoint instead, if it has one.
body*
files
Files to convert. At least one `files` entry or `file_urls` URL required. Max 10 total, 100 MB each.

About this endpoint

What it does

Converts uploaded files into a PDF and returns the resulting PDF as an S3 URL. The request sends file data in the body, and the response contains the output file URL.

Query Parameter(s)

AttributeTypeMandatoryDescription
outputStringNoOutput format option supplied as a query parameter.

Request Body

ParameterTypeMandatoryDescription
filesString ArrayNoFiles to convert. At least one files entry or file_urls URL required. Max 10 total, 100 MB each.

Response

Returns a JSON object with a url string field containing the S3 URI of the converted PDF.

ParameterTypeMandatoryDescription
urlStringNoA URI for the converted PDF output.

Query parameters

Name
Type
Description
outputOPTIONAL
string

Body

Name
Type
Description
bodyREQUIRED
object

Max 100MB total per request (all files combined). Larger? Use this API's URL-based endpoint instead, if it has one.

▣ COMMON ERRORS

Errors any endpoint can return

400bad_request

Required parameter missing or malformed body.

401unauthorized

API key missing, revoked, or not authorized for this service.

429rate_limited

Your plan's per-second rate exceeded. Retry with exponential backoff.

503upstream_busy

Backend temporarily unavailable. Try again in a few seconds.