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
You can create a webhook endpoint via the API or the BIZ MORI Dashboard. To create one via the API, use the Create Webhook endpoint:Response:
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 |
order.aiDetection.completed | AI Detection completed successfully |
order.aiDetection.failed | AI Detection failed |
Webhook payload
All webhook payloads follow this structure:Completed event — common fields
| Field | Type | Description |
|---|---|---|
orderId | string | Order ID |
orderName | string | Order name |
createdAt | string | Order creation time (ISO 8601) |
updatedAt | string | Order last updated time (ISO 8601) |
completedAt | string | Processing completion time (ISO 8601) |
status | string | Always complete |
Failed event — common fields
| Field | Type | Description |
|---|---|---|
orderId | string | Order ID |
orderName | string | Order name |
createdAt | string | Order creation time (ISO 8601) |
updatedAt | string | Order last updated time (ISO 8601) |
failedAt | string | Processing failure time (ISO 8601) |
status | string | Always failed |
errorCode | string | Error code |
errorMessage | string | Error message |
Anti-AI / Watermark Embed — additional fields (completed)
| Field | Type | Description |
|---|---|---|
fileCount | integer | Number of processed files |
downloadUrl | string | Result file download URL (valid for 1 hour) |
Watermark Extract — additional fields (completed)
Thestatus field is always complete. Use statusCode to determine the detection result.
| Field | Type | Description |
|---|---|---|
statusCode | string | detected or undetected |
watermarkFound | boolean | Whether a watermark was detected |
watermarkInfo.text | string | Detected watermark text (only when watermarkFound is true) |
AI Detection — additional fields (completed)
| Field | Type | Description |
|---|---|---|
probability | number | Probability of being AI-generated (0.0–1.0) |
heatmapUrl | string | null | AI detection heatmap image download URL (only when generateHeatmap option was used) |
overlayUrl | string | null | Heatmap overlay on original image download URL (only when generateOverlay option was used) |
Signature verification
Verify webhook authenticity by checking theX-MoriBiz-Signature header. Always verify before processing the event.
Retry policy
BIZ MORI uses a multi-layered retry system to ensure reliable webhook delivery.Initial retry
If your endpoint doesn’t return a2xx status code, BIZ MORI immediately retries:
| Attempt | Delay |
|---|---|
| 1st retry | 1 second |
| 2nd retry | 2 seconds |
| 3rd retry | 4 seconds |
Scheduler-based retry
If all initial retries fail, the event enters a scheduler-based retry queue with increasing intervals:| Attempt | Delay |
|---|---|
| 4th retry | 30 minutes |
| 5th retry | 2 hours |
| 6th retry | 4 hours |
FAILED. You can view failed events using the List Webhook Events endpoint.
Manual resend API
Regardless of the automatic retry process, you can manually resend webhooks at any time using the resend APIs:- Single event resend: Retry a specific failed event using the Retry Webhook Event endpoint.
- Bulk resend: Retry all failed events within a date range (up to 7 days) using the Retry Failed Webhook Events endpoint.
Failure notification email
When initial webhook delivery fails, BIZ MORI sends a failure notification email to the account owner. This email is sent at most once per day to avoid excessive notifications.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 |
| Retry a single event | POST /webhooks//events//retry |
| Retry failed events | POST /webhooks//events/retry-failed |