Send a PDF and a new page order; get back a PDF rebuilt in that order, with pages omitted, duplicated, or rotated as you specify, all in one call.
See the Organize 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="organize-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=organize-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.
| order | number[], required | The original page numbers in the new output order, e.g. [3, 1, 2, 2]. Pages omitted from the list are removed; a page listed more than once is duplicated as an independent copy. At least one page must remain. |
| rotate | object, optional | Maps an output position (1-based, as a string key) to a relative rotation angle, e.g. { "2": 90 } rotates the second output page by 90°. |
Billed per document — $1 (1 credit) per request, regardless of how the pages are rearranged.
Delivered via the webhook as outcome=failure with a reason below — see the docs index for the full delivery shape.
| invalid_options | order is missing or empty, references a page outside the document, or rotate references an out-of-range output position. |
| 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. |