apyhub
FILE CONVERSION · FILE MANIPULATION

Merge Files to PDF API

Hosted on ApyHub

What it does

File Merge to PDF combines multiple files into a single PDF, whether you send local uploads or publicly accessible file URLs. It accepts documents, spreadsheets, presentations, text files, images, HTML, Markdown, and existing PDFs, then returns the merged result as a PDF download or an S3 URL.

Use the files input when you want to upload content directly, or file_urls when the source files already live on the web. The service preserves the order you send, so you can build a report, packet, or appendix in the exact sequence you need. Each request supports up to 10 total files, with 100 MB per file.

File Merge to PDF is a good fit for workflows like generating client-facing reports from mixed source files, combining supporting documents into one archive, or turning image-based submissions into a single PDF for review. If you need the output immediately, use the download endpoints; if you want a stored result, use the endpoints that return a URL.

The response is either the merged PDF binary or an object containing a url field, depending on the endpoint you call.

▣ ENDPOINT 01 / 04
POST
Convert and merge files to PDF (URLs → download)
http://localhost:8080/apyhub/merge-files-to-pdf/url/download
QUICKSTARTGUIDE

Quickstart

Merge a list of public file URLs into a PDF and download the result.

curl -X POST "http://localhost:8080/apyhub/merge-files-to-pdf/url/download" \
  -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 containing the merged 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, 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 format and merges them into a single PDF. The merged PDF is returned as a binary response.

Request Body

ParameterTypeMandatoryDescription
file_urlsString ArrayYesPublicly accessible file URLs to convert and merge, in order. Max 10 URLs, 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. Each item must be a URI.

Response

Returns a binary file response containing the merged PDF output.

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)
http://localhost:8080/apyhub/merge-files-to-pdf/url/url
QUICKSTARTGUIDE

Quickstart

Merge up to 10 public file URLs into a single PDF and get back a download URL.

curl -X POST "http://localhost:8080/apyhub/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 download URL of the merged 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 the provided 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
outputStringNoOutput format or destination selector. The schema defines this as a query string, but does not specify allowed values or a default.

Request Body

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

Response

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

ParameterTypeMandatoryDescription
urlStringNoA URI pointing to the converted and merged 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)
http://localhost:8080/apyhub/merge-files-to-pdf/file/download
QUICKSTARTGUIDE

Quickstart

Upload one or more files to merge them into a PDF and set the output name with a query parameter.

curl -X POST "http://localhost:8080/apyhub/merge-files-to-pdf/file/download?output=merged-report" \
  -H "apy-token: $APY_TOKEN" \
  -F "files=@/path/to/file1.docx" \
  -F "files=@/path/to/file2.pdf"

What you'll get back

Returns a binary file containing the merged PDF output.

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 PDF file. The request body accepts file uploads, and the response is a binary file download.

Query Parameter(s)

AttributeTypeMandatoryDescription
outputStringNoOutput name for the generated file.

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 download. The output schema is a single binary value, so the success response is the generated PDF file content.

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)
http://localhost:8080/apyhub/merge-files-to-pdf/file/url
QUICKSTARTGUIDE

Quickstart

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

curl -X POST "http://localhost:8080/apyhub/merge-files-to-pdf/file/url" \
  -H "apy-token: $APY_TOKEN" \
  -F "files=@/path/to/file1.pdf" \
  -F "files=@/path/to/file2.docx"

What you'll get back

Returns a JSON object with a url string field containing the downloadable PDF location.

{
  "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 single PDF and returns a URL to the generated file. The request accepts file uploads in the body, and the response returns the resulting PDF location as a URL.

Query Parameter(s)

AttributeTypeMandatoryDescription
outputStringNoOutput format or destination indicator, as defined by the query parameter.

Request Body

ParameterTypeMandatoryDescription
filesObject ArrayNoFiles to convert. At least one files entry or file_urls URL required. Max 10 total, 100 MB each. Each item is a binary file.

Response

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

ParameterTypeMandatoryDescription
urlStringNoThe URL of the generated PDF file. Format: URI.

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.