Returns the environment-specific config, rules, and experiment summary.
Request
X-Tenant-ID: tenant-uuid Authorization: Bearer <admin-jwt>
Response
{
"config": {
"id": 77,
"flagId": 12,
"environmentId": 1,
"enabled": true,
"defaultValue": true,
"rules": [],
"experiment": null
}
}
Creates or updates the environment-specific flag config.
Request
X-Tenant-ID: tenant-uuid
Authorization: Bearer <admin-jwt>
{ "enabled": true, "defaultValue": true, "rolloutPercentage": 25, "experimentEnabled": false }
Response
{
"config": {
"id": 77,
"enabled": true,
"defaultValue": true,
"rolloutPercentage": 25,
"experimentEnabled": false
}
}
Rules are evaluated by priority and can target groups, attributes, or percentages.
Lists all rules for a flag config ordered by priority.
Request
X-Tenant-ID: tenant-uuid Authorization: Bearer <admin-jwt>
Response
{
"rules": [
{
"id": 5,
"ruleType": "group",
"groupId": 2,
"resultValue": true
}
]
}
Adds a group, attribute, or percentage rule to the config.
Request
X-Tenant-ID: tenant-uuid
Authorization: Bearer <admin-jwt>
{
"name": "Premium users",
"priority": 10,
"ruleType": "attribute",
"attributeKey": "plan",
"operator": "eq",
"comparisonValue": "premium",
"resultValue": true
}
Response
{
"rule": {
"id": 5,
"name": "Premium users",
"ruleType": "attribute",
"resultValue": true
}
}
Updates rule matching fields, priority, enabled state, or result value.
Request
X-Tenant-ID: tenant-uuid
Authorization: Bearer <admin-jwt>
{ "enabled": false }
Response
{
"rule": {
"id": 5,
"enabled": false
}
}
Removes a targeting rule.
Request
X-Tenant-ID: tenant-uuid Authorization: Bearer <admin-jwt>
Response
204 No Content
Returns the experiment, variants, and attached conversion events.
Request
X-Tenant-ID: tenant-uuid Authorization: Bearer <admin-jwt>
Response
{
"experiment": {
"id": 4,
"name": "Checkout test",
"status": "draft",
"variants": []
}
}
Creates a draft experiment for a flag config.
Request
X-Tenant-ID: tenant-uuid
Authorization: Bearer <admin-jwt>
{ "name": "Checkout test" }
Response
{
"experiment": {
"id": 4,
"name": "Checkout test",
"status": "draft"
}
}
Starts a draft experiment after at least two variants exist.
Request
X-Tenant-ID: tenant-uuid Authorization: Bearer <admin-jwt>
Response
{
"experiment": {
"id": 4,
"status": "running"
}
}
Stops a running experiment.
Request
X-Tenant-ID: tenant-uuid Authorization: Bearer <admin-jwt>
Response
{
"experiment": {
"id": 4,
"status": "stopped"
}
}
Returns exposure and conversion results for the experiment.
Request
X-Tenant-ID: tenant-uuid Authorization: Bearer <admin-jwt>
Response
{
"experimentId": 4,
"status": "running",
"startedAt": "2026-09-01T10:00:00.000Z",
"stoppedAt": null,
"events": [
{
"eventId": 7,
"eventKey": "checkout-completed",
"variants": [
{
"variantId": 11,
"variantKey": "control",
"variantName": "Control",
"uniqueExposures": 120,
"conversions": 8,
"conversionRate": 0.06666666666666667
}
]
}
]
}
Lists variants for the experiment.
Request
X-Tenant-ID: tenant-uuid Authorization: Bearer <admin-jwt>
Response
{
"variants": [
{
"id": 11,
"key": "control",
"allocationPercentage": 50,
"isControl": true
}
]
}
Adds a variant to a draft experiment.
Request
X-Tenant-ID: tenant-uuid
Authorization: Bearer <admin-jwt>
{ "key": "treatment", "name": "Treatment", "value": true, "allocationPercentage": 50 }
Response
{
"variant": {
"id": 12,
"key": "treatment",
"value": true,
"allocationPercentage": 50
}
}
Updates variant metadata. Allocation and value cannot change while the experiment is running.
Request
X-Tenant-ID: tenant-uuid
Authorization: Bearer <admin-jwt>
{ "name": "Updated treatment" }
Response
{
"variant": {
"id": 12,
"name": "Updated treatment"
}
}
Deletes a variant from a draft experiment.
Request
X-Tenant-ID: tenant-uuid Authorization: Bearer <admin-jwt>
Response
204 No Content
Attaches a conversion event to the experiment.
Request
X-Tenant-ID: tenant-uuid
Authorization: Bearer <admin-jwt>
{ "eventId": 7 }
Response
{
"experiment": {
"id": 4,
"conversionEvents": [
{
"id": 7,
"key": "checkout-completed"
}
]
}
}
Removes a conversion event from the experiment.
Request
X-Tenant-ID: tenant-uuid Authorization: Bearer <admin-jwt>
Response
204 No Content