Add Watermarks

Create watermark tasks

Add a watermark to a PDF file, to an image (PNG, JPG...) or to a video (MP4, MOV...).

The watermark can be either a simple text or an image file. If using an image file as watermark, make sure it has transparent background.

Arguments
input string or array, optional

The ID of the input task of the file to which the watermark should be added to, normally the import task. Multiple task IDs can be provided as an array.

If no input tasks are given, the task will create a transparent PNG with the watermark text or image.

input_format string, optional The current format of the file, e.g. pdf. If not set, the extension of the input file is used as input format.
... optional Conversion and engine specific options. Depends on input_format.
Select the output format above to show additional conversion options.
{{ option.name }} optional, {{ option.type }} Defaults to {{ option.default }}. Possible values: , .
filename string, optional Choose a filename (including extension) for the output file.
engine string, optional Use a specific engine for the conversion.

engine_version string, optional Use a specific engine version for the conversion.
timeout integer, optional Timeout in seconds after the task will be cancelled. By default, tasks time out after 5 hours.

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/watermark

Example Request

$ curl -X POST "https://api.cloudconvert.com/v2/watermark" \
       -H "Authorization: Bearer API_KEY" \
       -H "Content-type: application/json" \
       -d '{
  "input": "73df1e16-fd8b-47a1-a156-f197babde91a",
  "input_format": "pdf",
  "layer": "above",
  "text": "Top Secret",
  "font_size": 40,
  "font_color": "#ff0018",
  "font_name": "Helvetica Bold",
  "position_vertical": "center",
  "position_horizontal": "center",
  "margin_vertical": 25,
  "margin_horizontal": 25,
  "opacity": 50,
  "rotation": -45
}'

Example Response

{
  "data": {
    "id": "c85f3ca9-164c-4e89-8ae2-c08192a7cb08",
    "operation": "watermark",
    "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": "qpdf",
    "payload": {
      "input": "73df1e16-fd8b-47a1-a156-f197babde91a",
      "input_format": "pdf",
      "layer": "above",
      "text": "Top Secret",
      "font_size": 40,
      "font_color": "#ff0018",
      "font_name": "Helvetica Bold",
      "position_vertical": "center",
      "position_horizontal": "center",
      "margin_vertical": 25,
      "margin_horizontal": 25,
      "opacity": 50,
      "rotation": -45
    },
    "result": null
  }
}