The webhook payload will be sent as a
POST
request to the URL you specify. The webhooks require your server to respond with a 200 status code within 5 seconds, otherwise they will be retried. Webhooks are tried at most 5 times.
Webhook payload
The unique id of the event.
The type of the webhook. Can be
QUEUE_ITEM_NEW
, QUEUE_ITEM_ACTION
or
QUEUE_ITEM_COMPLETED
.The timestamp of when the webhook was sent.
The content item that triggered the webhook.
The queue that the content item is in.
The action that was taken on the content item if the type is
QUEUE_ITEM_ACTION
.Webhook payload example
Webhook signing
You can verify that the webhook is coming from us by comparing the signature of the payload with the signature provided in themodapi-signature
header. The signature is a
HMAC SHA256
hash of the payload using your webhook secret as the key. Find you webhook secret under integrations in your dashboard.
Preventing replay attacks
To prevent replay attacks, you can use the timestamp in the payload of the webhook to ensure that the webhook is not older than 5 minutes.Troubleshooting
Check events log
If webhooks aren’t working as expected, first check the events log in your dashboard to see detailed information about webhook delivery attempts and any failures.Allow Moderation API
You may find that some hosting providers and security services block webhook traffic. For example Cloudflare’s Bot Fight mode will present a challenge instead of allowing the webhook.Common blocking scenarios
- Bot Fight Mode / Super Bot Fight Mode is enabled
- WAF Managed Rules active
- Custom security rules
Choose your solution based on your plan
✅ Use Security Rules (Recommended)
- Go to your Cloudflare dashboard
- Select your domain
- Navigate to Security → Security rules
- Create a custom rule:
- Name: “Moderation API Webhooks”
- Field: User Agent
- Operator: starts with
- Value:
ModAPI/
- Action: Skip
All Super Bot Fight Mode Rules
and other rules that might interfere.
- Make sure to place this rule before other rules
- Deploy the rule
Still having issues?
Troubleshooting steps:- Check your hosting provider’s security logs for blocked
ModAPI/
requests - Verify your webhook endpoint returns a 200 status code within 5 seconds
- Test with a simple endpoint to isolate the issue
- Ensure firewall rules don’t conflict with allow rules