Send a PDF and a text or image stamp; get back the same PDF with that stamp placed at the position, rotation, and opacity you choose.
See the Watermark PDF tool page, or the docs index for authentication, the shared request/webhook contract, and the generic error table.
POST /webhooks/trigger — same endpoint and fields as every tool, with tool="watermark-pdf" set explicitly (it's not the default).
curl -X POST https://api.anyconvert.app/webhooks/trigger \ -H "x-api-key: your_api_key_here" \ -F "file=@report.pdf" \ -F "fileId=document-001" \ -F "referenceId=reference-001" \ -F "tool=watermark-pdf"
An optional options multipart field carrying a JSON object, validated synchronously before a credit is charged — a bad value is rejected with 400, not charged and not queued. Coordinates and positions are as the page is displayed (after rotation), in points from the top-left.
| type | string, required | "text" or "image". |
| text | string, text only | 1 to 200 characters. Checked against the chosen font before drawing — a missing character fails rather than being dropped silently. |
| font, bold, italic | text only | helvetica, times, courier, sans, serif, or mono. |
| size | number, text only | 6 to 400pt. |
| color | string | Hex #RRGGBB. |
| opacity | number | 0.05 to 1. |
| rotation | number | -180 to 180 degrees, counter-clockwise as displayed. |
| position | string | One of 9 anchors (center, corners, edge midpoints), with an optional marginPt (default 36). |
| tile | boolean | Repeat the stamp on a grid instead of placing it once. |
| layer | string | "over" (default) or "under" the page content. |
| pages | string, optional | Default "all"; the page-selection grammar (1-3,7, odd, last, etc.). |
| image (for type: "image") | — | Sent as a second file part named "watermark" (PNG with alpha, or JPEG) rather than inline base64, plus widthPercent (1-100 of the page width, aspect ratio always preserved). |
Billed per page, not per document — 1 credit for every 20 pages, rounded up.
Delivered via the webhook as outcome=failure with a reason below — see the docs index for the full delivery shape.
| invalid_options | A missing glyph, an image over the size limit, a bad position/rotation value, or a page outside the document. |
| invalid_file | The file could not be read, or was not the format this tool expects. |
| render_failed | Something failed during conversion that wasn’t a problem with the input itself. |
| timeout | The job did not finish within its time budget. |
| internal_error | An unexpected error on our side. |