Send a PDF and a list of edit operations (text, shapes, highlights, notes) applied in order; get back the edited PDF.
See the Edit 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="edit-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=@invoice.pdf" \ -F "fileId=document-001" \ -F "referenceId=reference-001" \ -F "tool=edit-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 are in displayed points, top-left origin; every rectangle must lie inside the displayed page.
| ops | array, required | 1 to 1000 operations, applied in order (later operations draw on top). See the operation types below. |
| flatten | boolean, optional | Default false. true bakes annotations into the page content so they can't be removed or edited afterward. |
| fontFallback | string, optional | "auto" (default) or "fail" when a requested character has no matching glyph. |
| ops[].type: "text" | object | x, y, width, height, text (max 20,000 chars), font, size (4-500), color, bold, italic, align, opacity, overflow (fail or shrink), minSize. |
| ops[].type: "rect" / "ellipse" | object | x, y, width, height, stroke, strokeWidth, fill, opacity, dash. |
| ops[].type: "line" | object | x1, y1, x2, y2, stroke, strokeWidth, opacity, dash. |
| ops[].type: "highlight" / "underline" / "strikeout" / "squiggly" | object | Real PDF annotations: rects (1-200), color, opacity. |
| ops[].type: "freetext" | object | x, y, width, height, text, size, color, fill, border. |
| ops[].type: "note" | object | Sticky-note annotation: x, y, text (max 2,000), author (max 100). |
Billed per page, not per document: 1 credit for every 20 pages, rounded up (a 45-page PDF costs 3 credits).
Delivered via the webhook as outcome=failure with a reason below; see the docs index for the full delivery shape.
| invalid_options | A bad option/value, a rectangle out of range, text that doesn't fit with overflow: "fail", or missing glyphs with fontFallback: "fail". |
| encrypted_file | The PDF is password protected. |
| 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. |