Skip to main content
If your endpoint stops accepting deliveries, Flabs does not keep calling it forever. A webhook that returns no 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

  1. When a delivery to your endpoint fails, Flabs notes the time of that first failure.
  2. Deliveries and retries continue as usual.
  3. Any single 2xx response clears the record. The webhook is healthy again, and the 24 hours start over from the next failure.
  4. 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.
  5. If your endpoint has returned no 2xx for 24 hours, the next failed delivery deletes the webhook and the lab admin gets a deletion email.
A delivery counts as failed when your endpoint returns a status outside 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, from hello@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

  1. Fix your endpoint so it returns a 2xx status within 10 seconds.
  2. List your auto-deleted webhooks with Get Auto-deleted Webhooks: GET /client/events/getDeactivatedEvents?labID=<labID>
  3. Bring the webhook back with Restore Webhook, using the _id from step 2: PATCH /client/events/reactivateEvent/<_id>?labID=<labID> It starts receiving new events straight away. You can also register a new webhook instead.
Events created while the webhook was deleted are not sent. If you need them, contact Flabs support.

Avoiding auto-deletion

  • Return a 2xx status 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.