POST
/
client
/
events
/
subscribe
Register webhook
curl --request POST \
  --url https://v2.flabs.in/client/events/subscribe \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "events": [
    "bill.completed"
  ],
  "endpoint": "https://your-domain.com/webhooks/flabs",
  "protocol": "https",
  "authToken": "your-webhook-auth-token"
}'
{
  "success": true,
  "message": "Events subscribed successfully"
}

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:
ParameterTypeRequiredDescription
eventsarrayYesList of event types to subscribe to
endpointstringYesYour webhook endpoint URL (must use HTTPS)
protocolstringYesProtocol for webhook delivery (only “https” is supported)
authTokenstringNoOptional authentication token to include in webhook requests

Supported Events

  • bill.created - New bill created
  • bill.completed - Entire bill completed (all reports finished)
  • bill.deleted - Bill deleted from system
  • report.completed - Individual report completed

Authorizations

Authorization
string
header
required

JWT token obtained from the authentication endpoint

Body

application/json

Response

200
application/json

Successful webhook

The response is of type object.