Policy fields
Rule fields
Actions
Approver
id and type values come from List approver candidates. Roles include owner, admin (shown as Manager), treasury_officer, compliance_officer, internal_auditor, operator, signer, developer, and viewer.
type is email, slack, or webhook. For slack and webhook, value must be an https:// URL.
Approvals expire after 24 hours by default, reported as expiry_hours in a dry-run.
Saving a rule rejects an unknown action_config key with unknown_action_config_field, and a missing required key with invalid_action_config.
Operators
Not every operator works on every field. Each entry in
condition_fields lists its valid_operators.
Condition values
- Scalar operators take one value in
value. Send numbers as strings, for example"10000", never as floats. - Range operators take
minandmaxas separate fields. Don’t send a bracketed array. - Set operators take a list in
values. greater_thanandless_thanexclude the boundary. Use the_or_equalforms to include it.
Condition fields
The fields a condition can compare are the request attributes the engine evaluates. These are the same as the fields of Dry-run policy evaluation:
Saving a rule with a field not on this list returns
400 invalid_condition_field. Numeric values are stored and returned as numbers.
Evaluation results
Theresult field of a dry-run response:
The API reference also lists
matched_rule and no_match. Branch on allowed first, and on result for the reason.
reason is a readable sentence that names the policy and rule, for example “Blocked by policy Transfer limits / rule Block over $50,000”. Log it, but don’t parse it.
Validation diagnostics
Validate in-flight rule array and Validate stored draft policy return adiagnostics list and an issue_count by severity. valid is true when there are no errors.
Diagnostics come in two tiers. Tier 1 is lexical and syntactic. Tier 2 is about how rules interact, for example a later rule that an earlier rule subsumes, so it can never match:
Limits on editing
Dry-run accepts a policy in any status, including
archived. Every other write applies to drafts only.