Targeting rules are available on Pro, Business, and Enterprise plans. See Tier limits.
Authentication
Rule endpoints live under the tenant flags API and use the same authentication as Get Flags:
The dashboard UI manages rules through equivalent session-authenticated endpoints; the routes below are the API surface for server-side automation.
List rules
Create a rule
Response — the created
FlagRuleResponse (same shape as list).
Update a rule
priority can also be set directly here, though reorder is the safer way to change ordering.
Delete a rule
204 No Content
Reorder rules
ruleIds must contain exactly the IDs of all rules for the flag — array index becomes the new priority. Returns the updated rule list sorted by priority. Priorities are updated atomically in a transaction.
Conditions
Each condition is:Targeting attributes
Attributes match against device context headers sent by the SDK on flag requests:
If the device does not provide a value for a condition’s attribute, that condition fails (and the rule does not match).
Operators
Rollout percentage
WhenrolloutPercentage is below 100, matching devices are admitted deterministically: a stable hash of deviceId + flagKey buckets each device into 0–99, and buckets below the percentage pass. The same device always lands in the same bucket for a given flag, so raising the percentage only ever adds devices.
Tier limits
Creating a rule beyond your tier’s limit returns
403 Forbidden.
Errors
See also
- Get Flags
- Stream Flags (SSE) — rule changes trigger a stream push
- Flag Overrides — force a value for a single device