Evaluate feature flags

Gate features with remotely evaluated flags and variants.

Feature flags let you turn features on or off, and pick variants, without shipping a new build. Voidhash evaluates every flag for the current person, so the same flag can resolve differently for different customers. Use flags for staged rollouts, experiments, and remote configuration.

Evaluate flags

Pass the keys you need. Pass an empty list instead to evaluate every flag in the project:

val flags = voidhash.getFeatureFlags(listOf("new_onboarding", "pricing_test"))

val newOnboarding = flags.firstOrNull { it.key == "new_onboarding" }?.enabled == true
val pricing = flags.firstOrNull { it.key == "pricing_test" }

Each result carries the flag's key and its enabled state. A variant may also carry a payload. Payloads are untyped JSON, so validate a payload before you use it.

Identity behavior

Flag results are scoped to the current person. The SDK clears them after identify() or a reset, so one customer never sees another customer's assignment.

Choose a safe default to use while flags are loading or unavailable. Do not use a feature flag to gate paid access. Use entitlement grants for that instead.