Two ways to subscribe
- Per task. Pass
webhookUrlwhen you create a task. That URL gets the task’stask.completedortask.failed. These deliveries are signed with your organization’s task webhook secret, in the dashboard under Webhooks. - Endpoints. Add an endpoint in the dashboard, under Webhooks. It gets the event types you pick for it, for every task of the organization. Each endpoint has its own secret, shown when you add it or rotate it.
https. Else the API refuses it with 400 and the code webhook_url_invalid.
Events
Each delivery is aPOST with a JSON body:
Answer fast
Answer with a2xx status within 10 seconds. Do slow work after you answer, for example in a queue.
Any other answer, or no answer, is a failure. The delivery is sent again after 5 seconds, 5 minutes, 30 minutes, then 2, 5, 10 and 10 hours. An endpoint that fails for all of those 27 hours is turned off, and the organization’s owners and admins get an email.
Drop duplicates
A retry can deliver the same event twice. Thewebhook-id header is the same on every retry of one event. Save the ids you processed, and skip an id you already have.