Overview
Webhooks allow your system to receive real-time notifications when audio extraction jobs complete or fail.Instead of polling the status endpoint repeatedly, you can have the API push updates to your server.
⚡ Recommended for production workloads
Configuring Webhooks
You can provide a webhook URL in theoptions object when creating a job:
Event Types
| Event | Description |
|---|---|
job.completed | Job successfully finished and audio is available for download |
job.failed | Job failed during processing, includes error information |
Webhook Payload
All webhook events use the same JSON structure.Job Completed Example
Job Failed Example
Payload Fields
| Field | Type | Description |
|---|---|---|
event | string | job.completed or job.failed |
jobId | string | Unique job identifier |
status | string | Final job status |
timestamp | string (ISO 8601) | Time event was triggered |
downloadUrl | string | Relative path to download file (for completed jobs) |
outputFile | object | Detailed output file info (completed jobs only) |
error | object | Error details (failed jobs only) |
Output File Object
| Field | Type | Description |
|---|---|---|
filename | string | Output file name |
url | string | Public CDN URL for download |
size | integer | File size in bytes |
duration | number | Duration in seconds |
format | string | Audio format |
bitrate | string | Bitrate (e.g., 192k) |
Error Object
| Field | Type | Description |
|---|---|---|
code | string | Error code for programmatic handling |
message | string | Human-readable message |
details | string | Optional additional info |
Webhook Best Practices
- Validate incoming requests to ensure they originate from Converso Empire (use secret headers or tokens)
- Respond with HTTP 200 OK quickly to avoid retries
- Log events for auditing and debugging
- Use job IDs to correlate with internal systems
- Handle
job.failedgracefully and trigger retries if necessary
Example Webhook Integration (Node.js)
Next Step
Errors Reference
Learn about error codes and troubleshooting for all endpoints.
© Converso Empire. All rights reserved.
