Conditions and Events are available in API version
2026-06-01. Send the whitecircle-version: 2026-06-01 header on every request.How Conditions Work
For every Event with content, White Circle:- Finds the active Conditions attached to the Event’s Environment
- Evaluates each Condition against the Event’s
metadata - Selects the Policies and Metrics attached to matching Conditions
- Applies each Policy or Metric’s Event selector, such as
message.contentortool.output - Evaluates Policies synchronously and queues Metrics asynchronously
Results for active Policies appear synchronously in the Event response’s
Policies map. Metrics run asynchronously and appear in dashboard analytics after processing.{} when a Condition should match every Event in its attached Environments. Conditions are evaluated independently for each Event, including Events in the same batch. Reference-only Events do not evaluate Conditions because they do not run a new check.
Example
Create a Condition that enables selected Policies for EU users:Condition Expressions
A Condition is a group of leaf conditions. Every leaf must match for the Condition to select its Policies and Metrics.Leaf
user.region to read nested Event metadata.
Group
and. This Condition selects its Policies only for EU users aged 18 or over.
Conditions you create through the API in this shape stay editable in the White Circle dashboard.
Revisions and Attachments
Every create or update operation produces an immutable Condition revision. The current revision defines the Condition’s expression, state, attached Environments, and attached Policies and Metrics. Attach Policies withpolicy_ids and Metrics with metric_ids.
Omitting policy_ids, metric_ids, or environment_ids during an update preserves their current values; providing an empty array clears that attachment type.
Create Condition
Create a Condition and attach Environments, Policies, and Metrics.
Update Condition
Create a new revision with selected fields changed.
Check an Event
Send metadata that Conditions evaluate per Event.
Event Selectors
Configure which Event types and fields each Policy evaluates.
