DOC
/docs
Flag endpoints
All endpoints on this page require an application membership: viewer role or higher to read, moderator role or higher to write.
GET
/admin/applications/:applicationId/flags
List flags
Lists active flags by default. Use includeArchived=true to include archived flags.
Request
X-Tenant-ID: tenant-uuid Authorization: Bearer <admin-jwt>
Response
{
"flags": [
{
"id": 12,
"key": "checkout-redesign",
"name": "Checkout redesign",
"isArchived": false
}
]
}
POST
/admin/applications/:applicationId/flags
Create flag
Creates an application-scoped flag. The key must be unique within the application.
Request
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
}
}
GET
/admin/applications/:applicationId/flags/:flagId
Get flag
Returns a single flag by id.
Request
X-Tenant-ID: tenant-uuid Authorization: Bearer <admin-jwt>
Response
{
"flag": {
"id": 12,
"key": "checkout-redesign",
"name": "Checkout redesign",
"isArchived": false
}
}
PATCH
/admin/applications/:applicationId/flags/:flagId
Update flag
Updates the flag name or description.
Request
X-Tenant-ID: tenant-uuid
Authorization: Bearer <admin-jwt>
{ "name": "New checkout" }
Response
{
"flag": {
"id": 12,
"key": "checkout-redesign",
"name": "New checkout",
"isArchived": false
}
}
DELETE
/admin/applications/:applicationId/flags/:flagId
Archive flag
Archives a flag. Archived flags are excluded from runtime evaluation.
Request
X-Tenant-ID: tenant-uuid Authorization: Bearer <admin-jwt>
Response
204 No Content
POST
/admin/applications/:applicationId/flags/:flagId/copy
Copy config between environments
Copies a flag config and its rules from one environment to another.
Request
X-Tenant-ID: tenant-uuid
Authorization: Bearer <admin-jwt>
{
"fromEnvironmentId": 1,
"toEnvironmentId": 2
}
Response
{
"config": {
"id": 88,
"flagId": 12,
"environmentId": 2,
"enabled": true,
"defaultValue": true,
"rules": []
}
}