POST callbacks to your server when order processing completes or fails. Use webhooks instead of polling the Get Order endpoint — your server gets notified the moment a result is ready.
Setting up webhooks
Register a webhook endpoint
Implement your endpoint
Your webhook handler must:
- Accept
POSTrequests with a JSON body - Respond with a
2xxstatus code within 5 seconds - Verify the
X-MoriBiz-Signatureheader before processing
Verify signatures
Every request includes an
X-MoriBiz-Signature header. See Signature Verification below for implementation in your language.Event types
| Event Type | Description |
|---|---|
order.antiAi.completed | Anti-AI processing completed successfully |
order.antiAi.failed | Anti-AI processing failed |
order.watermarkEmbed.completed | Watermark embedding completed successfully |
order.watermarkEmbed.failed | Watermark embedding failed |
order.watermarkExtract.completed | Watermark extraction completed successfully |
order.watermarkExtract.failed | Watermark extraction failed |
Webhook payload
All webhook payloads follow this structure:Completed event data
| Field | Type | Description |
|---|---|---|
orderId | string | Order ID |
orderName | string | Order name |
createdAt | string | Order creation time (ISO 8601) |
completedAt | string | Processing completion time (ISO 8601) |
status | string | complete, detected, or undetected |
fileCount | integer | Number of processed files |
downloadUrl | string | Result file download URL (valid for 1 hour) |
Failed event data
| Field | Type | Description |
|---|---|---|
orderId | string | Order ID |
orderName | string | Order name |
createdAt | string | Order creation time (ISO 8601) |
failedAt | string | Processing failure time (ISO 8601) |
status | string | Always failed |
error.code | string | Error code |
error.message | string | Error message |
Watermark extract completed
For watermark extract orders, the completed event includes additional fields:| Field | Type | Description |
|---|---|---|
status | string | detected or undetected |
watermarkFound | boolean | Whether a watermark was detected |
watermarkInfo.text | string | Detected watermark text (only when watermarkFound is true) |
Signature verification
Verify webhook authenticity by checking theX-MoriBiz-Signature header. Always verify before processing the event.
Retry policy
If your endpoint doesn’t return a2xx status code, BIZ MORI retries the delivery:
| Attempt | Delay |
|---|---|
| 1st retry | 1 second |
| 2nd retry | 2 seconds |
| 3rd retry | 4 seconds |
FAILED. You can view failed events using the List Webhook Events endpoint.
Managing webhooks
| Action | Endpoint |
|---|---|
| List all webhooks | GET /webhooks |
| Create a webhook | POST /webhooks |
| Get webhook details | GET /webhooks/ |
| Update a webhook | PUT /webhooks/ |
| Delete a webhook | DELETE /webhooks/ |
| View delivery events | GET /webhooks//events |