DOC
/docs
Recommended process
- Create an application with
POST /admin/applications; you become its owner. - Create a development environment with
POST /admin/applications/:applicationId/environments. - Add hostnames with
POST /admin/applications/:applicationId/environments/:environmentId/hostsso runtime calls resolve the right environment. - Create groups or conversion events when the flag needs targeted rules or experiment metrics.
- Create the flag with
POST /admin/applications/:applicationId/flags. - Create or replace environment config with
PUT /admin/applications/:applicationId/environments/:environmentId/flags/:flagId. - Add group, attribute, or percentage rules when the default value is not enough.
- Optionally create an experiment, add variants, attach conversion events, then start it.
- Create a runtime API key with
POST /admin/applications/:applicationId/api-keysand store the plaintext value; it is only shown once. - Call
POST /flags/:flagKey/evaluatewithX-API-Keyfrom the application and use the returned value. - Call
POST /events/:eventKeywithX-API-Keyafter a tracked conversion.
DOC
/docs
Minimal flag setup
POST
/admin/applications/:applicationId/flags
Create the flag record
Creates the application-scoped flag identity. The key is what runtime applications use for evaluation.
Request
POST /admin/applications/3/flags
X-Tenant-ID: tenant-uuid
Authorization: Bearer <admin-jwt>
{
"key": "checkout-redesign",
"name": "Checkout redesign",
"description": "Controls the new checkout flow"
}
Response
{
"flag": {
"id": 12,
"key": "checkout-redesign",
"name": "Checkout redesign",
"description": "Controls the new checkout flow",
"isArchived": false,
"createdAt": "2026-09-01T10:00:00.000Z"
}
}
PUT
/admin/applications/:applicationId/environments/:environmentId/flags/:flagId
Configure the flag for an environment
Sets the enabled state, default value, optional rollout percentage, and experiment toggle for one environment.
Request
PUT /admin/applications/3/environments/1/flags/12
X-Tenant-ID: tenant-uuid
Authorization: Bearer <admin-jwt>
{
"enabled": true,
"defaultValue": true,
"rolloutPercentage": 25,
"experimentEnabled": false
}
Response
{
"config": {
"id": 77,
"flagId": 12,
"environmentId": 1,
"enabled": true,
"defaultValue": true,
"rolloutPercentage": 25,
"experimentEnabled": false,
"rules": [],
"experiment": null
}
}
DOC
/docs
Use from an application
POST
/flags/:flagKey/evaluate
Evaluate the flag
Runtime applications call this endpoint before deciding which behavior or UI to show.
Request
POST /flags/checkout-redesign/evaluate
X-API-Key: <application-api-key>
X-Hostname: app.example.com
X-Visitor-ID: vis_4f8a1b2c
{
"groups": ["beta-testers"],
"attributes": {
"plan": "premium",
"country": "ZA"
}
}
Response
{
"key": "checkout-redesign",
"enabled": true,
"value": true,
"variant": "treatment"
}
- When no environment or config matches, the endpoint returns
enabled: false. - Authenticated requests may include a bearer token for stable user-based experiment assignment.