Flag types
Vexil supports five flag types — from simple on/off switches to fully typed configuration values.
| Type | Returns | Best for |
|---|---|---|
| Boolean | true / false | Feature on/off, kill switches |
| String | A text value | Variant names, UI copy, config strings |
| Number | A number | Timeouts, thresholds, rate limits |
| JSON | An object or array | Structured config, multiple settings at once |
| Gradual | true for N% of users | Percentage-based rollouts |
The flag type cannot be changed after creation. If you pick the wrong type, archive the flag and create a new one.
Creating a flag
- 1Click "New flag" in the Flags pageThe creation modal opens.
- 2Choose a typeWhen in doubt, start with Boolean.
- 3Enter a flag keyThe key is what your code uses to evaluate the flag — e.g.
dark-modeornew-pricing-page. It must be unique within your org and URL-safe. - 4Set default values per environmentThese are the fallback values the SDK returns if it can't reach the server.
- 5Click "Create flag"Your flag is live, starting disabled in all environments.
Archiving a flag
Once a feature is fully shipped and stable, archive its flag to keep the dashboard clean. Archived flags are hidden by default but remain in the audit log. You can restore them at any time from the archived flags view.