Validate a CEL condition
Check whether a CEL expression is syntactically valid without creating a rule.
condition string in the request body. The response returns a valid boolean and a message with details.
Pass an optional program_id to validate references against a specific program: tier keys and asset symbols in the expression are checked against that program’s configuration, and the response includes non-blocking vocabulary warnings. Pass an optional draft actions array to run the same checks on action expressions (template syntax, CEL compilation, references) before creating the rule.
Field references to event.* are never validated because events are schemaless. For example, event.amount > 100 passes even if your events never include an amount field. Use the simulate endpoint to test a rule against realistic data.
Authorizations
API key passed in the X-API-Key header.
Body
Condition to validate
CEL expression to validate
1"event.type == 'purchase' && event.amount > 100"
Optional draft actions. When supplied alongside program_id, the keys these actions write count as known vocabulary, so a condition that reads a key the same rule writes does not warn. Used for accurate live validation before the rule is saved; only the action keys/targets are read (no full validation).
Optional program ID. When supplied, the condition is also checked against the program: tier key references (participant.tiers.) are validated, and counter/tag/attribute key references that no rule in the program writes produce non-blocking warnings. Without it, only tier fields, participant roots, and deprecation advisories are checked.
"550e8400-e29b-41d4-a716-446655440001"
Optional ID of the rule being edited. When validating an edit, pass it so the rule's own persisted actions are excluded from the program vocabulary (the stale copy must not mask a renamed key) — matching the behavior on save. Omit when validating a brand-new rule.
"550e8400-e29b-41d4-a716-446655440002"
Response
Validation result
Human-readable validation result or error detail
"CEL condition is valid"
Additional context about validation scope (present only on success)
"Validation checks syntax only. Field references are not verified against an event schema."
Whether the condition is syntactically valid
true
Non-blocking advisories — e.g. a counter/tag/attribute key referenced in a condition/action expression that no rule in the program writes (likely a typo), or a deprecated CEL alias. Never affects validity.