Skip to main content
WEBHOOK
White Circle can send HTTP POST requests to your server when specific events occur. This allows you to build custom integrations and automate workflows based on session reviews and strike-action updates.

Available Events

Setting Up Webhooks

1

Open Workspace Settings

2

Add Webhook Endpoint

Click on the Webhooks integration and add your webhook URL.
3

Configure Events

Select which event types you want to receive notifications for.
4

Save

Click Save to activate the webhook.
You’ll see the signing secret when creating a webhook. You’ll need it later to verify the authenticity of incoming events.

Receiving events

Your webhook URL will receive a request for each event type you select. One request = one event.
The session.violated event includes all flagged Policies for the session.

Error handling

Please return an HTTP 200 OK for each event you successfully receive on your Webhook URL.

Failure conditions

We consider any of these scenarios a single failure condition:
  • We are unable to negotiate or validate your server’s SSL certificate.
  • We wait longer than 3 seconds to receive a valid response from your server.
  • We receive any other response than an HTTP 200-series response.

Retries

We’ll retry a failed request up to 3 times in a gradually increasing timetable:
  1. The first retry will be sent nearly immediately.
  2. The second retry will be attempted after 2 seconds.
  3. The third and final retry will be sent after 4 seconds.
You can check the number of total requests and retries per last 24 hours on the platform.

Verifying requests from White Circle

With the help of signed secrets, you can verify whether requests from White Circle are authentic.

Understanding signed secrets

You can verify requests from White Circle by verifying signatures using your signing secret. On each HTTP request that White Circle sends, White Circle adds an X-Whitecircle-Signature HTTP header (or x-whitecircle-signature — header names are meant to be case-insensitive, so the letter case should not be assumed). The signature is created by hashing the request body with the SHA-256 function, and combining it with an HMAC signing secret. The resulting signature is unique to each request and doesn’t contain any secret information, keeping your app secure. Request signing follows this pattern:
  • Your app receives a request from White Circle.
  • Your app computes a signature based on the request.
  • You make sure the signature you’ve computed matches the signature on the request.
Let’s go over the recipe for this signature.

Validating a request

Use the raw request body, without headers, before it has been deserialized from JSON or other forms. For example, in Python’s Flask, use request.get_data() before accessing any other methods on the request in order to get the raw request payload, without performing JSON deserialization.
The signature depends on the timestamp to protect against replay attacks. While you’re extracting the timestamp, check to make sure that the request occurred recently. In this example, we verify that the timestamp does not differ from local time by more than five minutes.
That’s it! You may now proceed with processing the update.

Request schema

Headers

X-Whitecircle-Request-Timestamp
string
required

Unix timestamp (seconds) when the request was signed to protect against replay attacks.

X-Whitecircle-Signature
string
required

Signature for the request body computed as HMAC-SHA256 over 'v0:{timestamp}:{raw_body}', prefixed with 'v0='.

Body

application/json
event_type
enum<string>
required

Type of the event

Available options:
session.violated,
review_manual.in_progress,
review_manual.completed,
review_auto.completed
violation
boolean
required

Whether any Policy violations were detected in the session

internal_id
string
required

Unique internal identifier for the session

violations
object
required

Map of policy IDs to their changed verdicts (only changed policies included)

external_id
string | null

Optional external identifier provided by client

Response

Successfully received