Webhook
After a file is uploaded or converted, the service can send notifications to a configured webhook URL. This helps your business system receive events and trigger follow-up workflows. Enable it via the CONVERTED_WEBHOOK_URL environment variable.
Trigger Points
- Send one notification after an upload succeeds.
- Send one notification after a conversion succeeds.
- If a cached result is returned (same file hash), it will also send a notification (
fromCache=true).
Request
- Method:
POST - Header:
Content-Type: application/json - Destination:
CONVERTED_WEBHOOK_URL
Payload Example
{
"taskId": "bccbff66-fa2c-4d6d-bc30-a7c34ca0181b",
"type": "uploaded",
"fromCache": false,
"file": {
"filename": "document.docx",
"mime": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
"size": 90239,
"path": "/uploads/2024/10/bccbff66-fa2c-4d6d-bc30-a7c34ca0181b.docx"
}
}Field descriptions:
taskId: conversion task ID, used for downloading the original/converted file later.type: event type. Possible values:uploaded,converted.fromCache: whether the result is returned from cache.file: file metadata.
Security Recommendations
- Use HTTPS webhook URLs.
Work with Download APIs
- After receiving a webhook callback, your business system can use
GET /convert/{taskId}to download the file.