Global flags are the simplest way to ship a feature behind a toggle. Each flag belongs to a project, has a human-readable name and a machine-readable key, and carries two runtime values: whether the flag is enabled and what percentage of checks should return active. You check them from your application via a REST endpoint or in the dashboard to verify state at a glance.Documentation Index
Fetch the complete documentation index at: https://docs.swisstools.dev/llms.txt
Use this file to discover all available pages before exploring further.
Flag fields
| Field | Description |
|---|---|
| Name | Human-readable label shown in the dashboard (e.g. New Dashboard). |
| Key | Machine-readable identifier used in API calls (e.g. new-dashboard). Must be unique within the project. |
| Enabled | Whether the flag is on (true) or off (false). When disabled, the flag is inactive regardless of percentage. |
| Percentage | A number from 0 to 100 representing what fraction of traffic should be considered active when the flag is enabled. Defaults to 100. |
Keys should be lowercase and kebab-case:
dark-mode, new-checkout, beta-export. Keys are unique per project — the API enforces this constraint.Creating a flag
Open Feature Flags
Navigate to your project and select Feature Flags from the sidebar. Make sure the Flags tab is active.
Fill in name and key
Enter a Name (e.g.
New Dashboard) and a Key (e.g. new-dashboard). The key is what your code references at runtime.Set enabled status and rollout percentage
Toggle Enabled on or off. Set the Percentage to control what fraction of traffic is exposed —
100 means all traffic, 0 means none.Checking a flag via API
You can check a global flag from your application with either an API key or a dashboard session. The endpoint resolves the flag for an environment and returns itsenabled state, configured rollout percentage, source, and the resolved environment.
enabled already reflects the rollout roll Swisstools performs for this call, so you can branch on it directly. source is "cache" when served from the 60-second Redis cache or "global" when freshly computed. Pass ?env= (an environment key or name) to target a specific environment; otherwise the project’s default is used.
Editing and deleting flags
Find the flag in the table on the Flags tab. Each row has two action icons:- Pencil icon — opens the edit dialog. You can update the name, enabled state, and percentage. The key is not editable after creation.
- Trash icon — opens a confirmation dialog. Deleting a flag is permanent and removes it from all API responses immediately.