A webhook enables Flagright to push real-time notifications to your app. Flagright uses HTTPS to send these notifications to your app as a JSON payload. You can then use these notifications to execute actions in your backend systems.

Webhooks are particularly useful when:

  • A transaction is investigated and approved by your compliance team.
  • A user’s state has changed.
  • A new case is created.
  • A rule action has been updated.

Steps to Receive Webhooks

You can start receiving event notifications in your app by following these steps:

  1. Identify the events you want to monitor and the event payloads to parse.
  2. Create a webhook endpoint as an HTTP endpoint (URL) on your server.
  3. Handle requests from Flagright by parsing each event object and returning 2xx response status codes.
  4. Deploy your webhook endpoint so that it is publicly accessible via an HTTPS URL.
  5. Register your publicly accessible HTTPS URL in the Flagright console and store the secret signing key (for verifying the payload) in a secure place.

Types of Events

Full list of webhook events

Event Payloads

idUnique identifier for the event
typeEvent type (e.g., USER_STATE_UPDATED).
dataObject containing data associated with the event.
createdTimestampTime at which the event was created. Measured in ms since the Unix epoch.

Sample Event Payload

2 "id": "2fa554d3-1ffa-4361-9af6-5479c2d4847f",
4 "createdTimestamp": 1661522222301,
5 "triggeredBy": "MANUAL",
6 "data": {
7 "userId": "U-1",
8 "state": "BLOCKED",
9 "reason": "updated manually"
10 }