Register Webhook
Subscribe to webhook events to receive real-time notifications when bills, reports, leads, or bookings change.
Catch-all accounts (default): do not send a party — one webhook receives every event for the lab.
Party-scoped accounts: you MUST attach a party (corporateUser or organization); the webhook then receives only that party’s events. A party may have only one active webhook per event (a duplicate returns 409). Sending a party on a catch-all account (or omitting it on a party-scoped account) returns 400.
Overview
Register your application to receive webhook notifications for specific events in the Flabs system. This endpoint allows you to subscribe to real-time notifications when bills or reports are created, completed, or deleted.Authentication
This endpoint requires a valid Bearer token obtained from the authentication API.Request Parameters
All parameters are sent in the request body as JSON:| Parameter | Type | Required | Description |
|---|---|---|---|
labID | string | Yes | Flabs lab (branch) identifier. Fetch via GET /client/labs |
events | array | Yes | List of event types to subscribe to |
endpoint | string | Yes | Your webhook endpoint URL (must use HTTPS) |
protocol | string | Yes | Protocol for webhook delivery (only “https” is supported) |
corporateUser | string | Cond. | Party-scoped accounts only — bind the webhook to this corporate |
organization | string | Cond. | Party-scoped accounts only — bind the webhook to this doctor/hospital |
corporateUser or organization (not both); the webhook then receives only that party’s events. See integration modes.Supported Events
bill.created- New bill createdbill.completed- Entire bill completed (all reports finished)bill.deleted- Bill deleted from systemreport.completed- Individual report completedlead.created- New CRM lead createdbooking.created- New CRM booking created (or a lead converted to a booking)
Authorizations
JWT token obtained from the authentication endpoint
Body
Flabs lab (branch) identifier. Fetch the list of labs via GET /client/labs.
List of events to subscribe to
bill.created, bill.deleted, bill.completed, report.completed, lead.created, booking.created Your webhook endpoint URL that will receive the event notifications (must accept POST requests)
Protocol for webhook delivery (only HTTPS is supported)
https Party-scoped accounts only. Deliver only this corporate's events to the webhook. Pass either corporateUser or organization, not both.
Party-scoped accounts only. Deliver only this doctor/hospital's events to the webhook. Pass either corporateUser or organization, not both.