This is the API v2 documentation. API v2 is currently in preview state and not recommended for production use! Read more about API v2 in our blog post.

Merge Files

Create merge PDF tasks

Create a task to merge at least two files to one PDF. If input files are not PDFs yet, they are automatically converted to PDF.

Arguments
input string or array, required The ID of the input tasks to merge. Multiple task IDs can be provided as an array.
output_format string, required The target format to convert to.
engine string, optional Use a specific engine for the conversion.
engine_version string, optional Use a specific engine version for the conversion.
filename string, optional Choose a filename (including extension) for the output file.
... optional Conversion and engine specific options. Depends on output_format.
Select the output format above to show additional conversion options.
{{ option.name }} optional, {{ option.type }} Defaults to {{ option.default }}. Possible values: , .

Returns

The created task. You can find details about the task model response in the documentation about the show tasks endpoint.

Endpoint

POST https://api.cloudconvert.com/v2/merge

Example Request

$ curl -X POST "https://api.cloudconvert.com/v2/merge" \
       -H "Authorization: Bearer API_KEY" \
       -H "Content-type: application/json" \
       -d '{
  "input": [
    "73df1e16-fd8b-47a1-a156-f197babde91a",
    "b9f3aeb1-376e-49ce-ab5f-fcfd9e3d7446"
  ],
  "output_format": "pdf"
}'

Example Response

{
  "data": {
    "id": "c85f3ca9-164c-4e89-8ae2-c08192a7cb08",
    "operation": "merge",
    "status": "processing",
    "message": null,
    "created_at": "2018-09-19T14:42:58+00:00",
    "started_at": "2018-09-19T14:42:58+00:00",
    "ended_at": null,
    "depends_on_tasks": {},
    "engine": "chrome",
    "engine_version": "75",
    "payload": {
      "input": [
        "73df1e16-fd8b-47a1-a156-f197babde91a",
        "b9f3aeb1-376e-49ce-ab5f-fcfd9e3d7446"
      ],
      "output_format": "pdf"
    },
    "result": null
  }
}