2xx response for 24 hours is deleted automatically, and Flabs stops sending events to it. You are emailed before and when this happens.
Unlike a webhook you delete yourself, an auto-deleted webhook can be restored.
How it works
- When a delivery to your endpoint fails, Flabs notes the time of that first failure.
- Deliveries and retries continue as usual.
- Any single
2xxresponse clears the record. The webhook is healthy again, and the 24 hours start over from the next failure. - If your endpoint is still failing after 12 hours, the lab admin gets a warning email. It is sent once, on the first failed delivery after 12 hours, or at 23 hours if no delivery was attempted in between.
- If your endpoint has returned no
2xxfor 24 hours, the next failed delivery deletes the webhook and the lab admin gets a deletion email.
200–299, does not answer within 10 seconds, or cannot be reached.
Each webhook is checked on its own. If you have several webhooks, even on the
same URL, only the one that kept failing is deleted. The others keep
receiving their events.
Emails
Both emails go to the lab admin’s email address, fromhello@flabs.in. They show the endpoint, its events, when it started failing, the number of failed delivery attempts and the last error.
Each webhook gets its own emails. If several of your webhooks use the same URL, each email names the corporate or doctor/hospital the webhook is for, and says how many webhooks share that URL.
Getting events again
- Fix your endpoint so it returns a
2xxstatus within 10 seconds. - List your auto-deleted webhooks with Get Auto-deleted Webhooks:
GET /client/events/getDeactivatedEvents?labID=<labID> - Bring the webhook back with Restore Webhook, using the
_idfrom step 2:PATCH /client/events/reactivateEvent/<_id>?labID=<labID>It starts receiving new events straight away. You can also register a new webhook instead.
Avoiding auto-deletion
- Return a
2xxstatus as soon as you have received the event, then process it in the background. - Keep the URL stable. If it changes, register the new URL and delete the old webhook.
- Delete test webhooks once you no longer need them.