Skip to main content
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
events
enum<string>[]
required

List of events to subscribe to

endpoint
string<uri>
required

Your webhook endpoint URL that will receive the event notifications (must accept POST requests)

protocol
enum<string>
required

Protocol for webhook delivery (only HTTPS is supported)

Available options:
https

Response

Successful webhook

success
boolean
Example:

true

message
string
Example:

"Events subscribed successfully"

I