Skip to main content
POST
/
documents
/
merge
curl --request POST \ --url https://api.luminpdf.com/v1/documents/merge \ --header 'Content-Type: application/json' \ --header 'X-API-Key: <api-key>' \ --data ' { "document_ids": [ "695dd6880d951f4de70a7c5d", "683566387023be1b8285b64c", "6915b2a24912dd85e2225da4" ], "document_name": "Combined Patient Forms" } '
{
  "document_name": "<string>",
  "signed_url": "<string>",
  "expires_at": 123
}
This endpoint requires the following scope:pdf:files

Authorizations

X-API-Key
string
header
required

Provide your API key in the X-API-Key header, e.g., X-API-Key: YOUR_API_KEY.

Body

application/json
document_ids
string[]

Ordered list of Lumin document IDs to merge. The order of IDs determines the page order in the output PDF. Required when file_urls is not provided. Provide 2–20 document IDs.

To obtain document IDs, upload files to Lumin first using Upload Document.

file_urls
string<uri>[]

Ordered list of publicly accessible file URLs to merge. Only URLs from allowed domains are accepted. Required when document_ids is not provided. Ignored if document_ids is also provided. Provide 2–20 URLs.

document_name
string

Name of the merged output file. Defaults to merged_{first document name}.

Required string length: 1 - 255

Response

Returns a temporary download URL for the merged PDF.

document_name
string
required

Name of the output document.

signed_url
string<uri>
required

Temporary HTTPS URL to download the output file. Expires after 30 minutes.

expires_at
integer<unix-epoch>
required

Unix epoch timestamp (in milliseconds) when signed_url becomes invalid.