Send a file, get the result delivered to the webhook URL on your account. Every AnyConvert tool shares this same endpoint, API key, and integration pattern below; each tool's own options, response shape, and pricing live on its own page.
Every request needs your API key in an x-api-key header.
x-api-key: your_api_key_here
/webhooks/triggerThe request returns as soon as the file is accepted and queued. The result is delivered separately to your webhook, not in this response.
Most tools take exactly one file part. Merge PDF and JPG to PDF take several files per request: send file more than once in the same request, in order; see their own pages for the details.
| file | binary, required | The file to convert. |
| fileId | string, required | An id you choose to identify this file (letters, numbers, _ and -, up to 64 characters). Re-using an id for a new upload supersedes any in-progress job for it. |
| referenceId | string, required | An id you choose for your own tracking, same format as fileId. Echoed back on delivery. |
| tool | string, optional | Which tool to run: dwg-to-pdf is the default when omitted. See the tools list above for every other value. |
| profile | string, optional | PDF Page Splitter only, ignored by every other tool. See its own page for the values. |
| options | string (JSON), optional | Tool-specific settings as a JSON object, up to 256 KB. Validated synchronously before a credit is charged; see each tool's own page for its schema. Ignored by tools that take no options. |
curl -X POST https://api.anyconvert.app/webhooks/trigger \ -H "x-api-key: your_api_key_here" \ -F "file=@document.pdf" \ -F "fileId=file-001" \ -F "referenceId=reference-001"
{
"fileId": "file-001",
"status": "accepted"
}status is "already_accepted" instead if a job for the same fileId is already in progress.
/webhooks/cancelStops a conversion that hasn't produced an outcome yet. Sends no webhook. Takes fileId as JSON and returns { "fileId", "result": "cancelled" | "not_active" }, where not_active covers a job that's already delivering, finished, or unknown.
Set your webhook URL from your dashboard. Note that a file is accepted and a credit charged the moment we queue it, before we know whether the conversion will actually succeed, so both outcomes below are billed the same way. See the Refund Policy for the full explanation.
Both outcomes below arrive the same way: one multipart/form-data POST to your webhook URL, carrying fileId, referenceId, and outcome on every delivery.
POST https://yourapp.com/your-webhook-path x-webhook-secret: <your webhook secret> fileId=file-001 referenceId=reference-001 outcome=success file=<the converted file, binary>
POST https://yourapp.com/your-webhook-path x-webhook-secret: <your webhook secret> fileId=file-001 referenceId=reference-001 outcome=failure reason=invalid_file message=The file could not be read detail=...
reason is one of invalid_file, dwg_conversion_failed, render_failed, empty_modelspace, invalid_options, encrypted_file, no_extractable_text, timeout, or internal_error. Which ones a given tool can actually hit is listed on that tool's own page. detail is only present on some failures, and a success delivery can carry a warnings field (JSON array) for a non-fatal note.
The x-webhook-secret header carries the webhook secret shown on your dashboard. Compare it to the value you stored before trusting a payload. Respond 200 quickly, and do any slow work after acknowledging receipt.
Retry policy: delivery is attempted immediately, then retried twice more (after 30 seconds, then 2 minutes) if your endpoint doesn't answer with a 2xx. After 3 failed attempts, delivery stops.
A malformed or unreadable file is still accepted (202) and charged, then fails asynchronously via the webhook above with reason invalid_file; the API does not inspect the file before queuing it, so there is no separate synchronous validation error for that case.
| 400 | No file included in the request |
| 401 | Invalid or missing API key, or no credits remaining |
| 413 | File exceeds the upload size limit |
Not yet available: a job-status lookup endpoint and a public changelog. If you need either of these for your integration, email support@anyconvert.app.