Merge multiple files into one document with our PDF merging API.

Try It Out

This example will merge the two supplied documents into one PDF. The order of the documents in the final PDF is controlled by the order of the parts array.


Use Your Free Credits

Sign up to get 100 free credits, or log in to automatically add your API key to sample code.

Add a File

Add two PDFs named first_half.pdf and second_half.pdf to your project folder. You can also use our sample files: first_half.pdf and second_half.pdf. The file name is case sensitive. Make sure the file name matches the file name in the sample code.

Run a Command

Copy the curl command and run it in that same folder via the terminal or your editor’s terminal.

View the Results

Open result.pdf in your project folder to view the results.

    curl -X POST \
        -H "Authorization: Bearer your_api_key_here" \
        -o result.pdf \
        -F first_half=@first_half.pdf \
        -F second_half=@second_half.pdf \
        -F instructions='{
            "parts": [
              { "file": "first_half" },
              { "file": "second_half" }

Using Postman? Download our official collection and start using the API with a single click. Read more 

Your API Key