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
- In the project, create a flag. Choose type
BOOLEANfor a simple on/off gate. The key is the string you will pass tohasFeature, for examplenew_checkout. - Open the flag in the development environment. The configuration is a draft:
enabled, optional value,killSwitch, and fallback. - Publish the draft. Publishing writes a snapshot and bumps
configurationVersion. You can preview the publish and roll back to an earlier snapshot. - 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 ?