Subscribe
Create a webhook endpoint from your dashboard at hub.madiad.com/dashboard/webhooks: enter the URL that should receive deliveries and pick the events you want. The dashboard generates asecret for that endpoint — store it. You’ll use it to verify every delivery.
Events
Each delivery is a JSON body shaped
{ "id", "type", "created_at", "data": { … } }. For post.completed, data carries profile_id, platform, media_type, success, url, publish_id, and error.
Verify the signature
Every request carries anX-MADIAD-Signature header in the form sha256=<hex>: an HMAC-SHA256 of the raw request body, keyed with your subscription secret. Recompute it and compare before trusting the payload. Each delivery also includes X-MADIAD-Event and X-MADIAD-Delivery headers.
Respond and retries
- Return a
2xxstatus within 5 seconds to acknowledge receipt. Redirects are not followed, so a3xxcounts as a failure. - Any non-
2xxresponse or a timeout fails the attempt. Each attempt makes up to 3 quick tries, 0.5 s and then 1 s apart. - A delivery gets up to 5 attempts. After a failed attempt the next one waits at least 1 minute, then 5 minutes, then 30 minutes, then 2 hours. Retries run in background passes, so the real gap can be longer — at the latest the daily pass at 01:30 UTC picks the delivery up.
- After the 5th failed attempt the delivery is marked dead and is not sent again.
- Make your handler idempotent — a delivery can arrive more than once. Dedupe on the delivery
id(also sent as theX-MADIAD-Deliveryheader).

