FlagFix
Getting started

Create your first feature flag

A boolean flag, a draft, and a publish.

Cette page n’a pas encore de traduction française. Le texte anglais fait foi.

Last updated on

  1. In the project, create a flag. Choose type BOOLEAN for a simple on/off gate. The key is the string you will pass to hasFeature, for example new_checkout.
  2. Open the flag in the development environment. The configuration is a draft: enabled, optional value, killSwitch, and fallback.
  3. Publish the draft. Publishing writes a snapshot and bumps configurationVersion. You can preview the publish and roll back to an earlier snapshot.
  4. Evaluate it with a server key:
curl -s -X POST "$API/api/v1/runtime/evaluate" \
  -H "content-type: application/json" \
  -H "X-FlagFix-Sdk-Key: $SERVER_KEY" \
  -d '{"key":"new_checkout","targetingKey":"user_123","context":{"plan":"pro"}}'

BOOLEAN flags do not store a JSON value. Use STRING, NUMBER, or CONFIG when the flag must carry a payload. CONFIG is the type that allows a schema.

Cette page vous a-t-elle été utile ?