Flags PMs can flip,
devs can trust.
Group flags into folders. Records inside a folder share the same schema — different values per customer, plan, or region. Read values over HTTP in milliseconds.
| record | max_seats | sso | audit | support |
|---|---|---|---|---|
| plan:starter | 3 | ○ false | ○ false | community |
| plan:growth | 10 | ○ false | ● true | |
| plan:pro | 25 | ● true | ● true | priority |
| plan:enterprise | ∞ | ● true | ● true | dedicated |
A folder is a typed schema. Every flag inside it shares the same fields — boolean, number, enum, string. Approval rules and rollout caps live on the folder.
Records are rows: a plan tier, a customer, a region. Each record sets values for the folder’s flags. Look up by ID; values fall back to defaults if untouched.
Read flag values over a small REST surface. Cache however your stack already caches; the API is the contract — nothing more to install.
# Look up a record's values for one folder
curl https://api.swisstools.dev/api/projects/$PROJECT_ID/flags \
-H "Authorization: Bearer $TOKEN" \
-G --data-urlencode "folder=entitlements" \
--data-urlencode "record=cus_8x9k2L"
# → 200 OK
# { "max_seats": 50, "sso": true, "audit": true,
# "support": "dedicated" }
# Read a single flag value
curl https://api.swisstools.dev/api/projects/$PROJECT_ID/flags/checkout-experiment-b \
-H "Authorization: Bearer $TOKEN" \
-G --data-urlencode "userId=u_123" # → true (25% rollout)Two endpoints cover the common cases: /flags returns every value for a record (your customer's plan, region, tenant); /flags/:key returns a single flag, with percentage rollouts and A/B targeting resolved server-side.