All API endpoints use the base path /api/v1.
When multi-tenancy is enabled (e.g. with the enterprise module or FLAGENT_ADMIN_API_KEY), flag and evaluation endpoints are tenant-scoped. The server determines the tenant from:
X-API-Key— tenant API key (recommended for server-to-server and SDKs). Send in the request header:X-API-Key: <tenant-api-key>.Authorization: Bearer <JWT>— when the JWT contains a tenant claim (e.g. SSO users).
Without a valid tenant context, requests to /api/v1/flags, /api/v1/evaluation, etc. return 401. In OSS mode without tenant enforcement, these headers are optional. See Admin and Tenants and Security: Tenant API Keys.
Interactive API documentation is available via Swagger UI:
- Swagger UI:
http://localhost:18000/docs - OpenAPI specification (YAML):
http://localhost:18000/api/v1/openapi.yaml - OpenAPI specification (JSON):
http://localhost:18000/api/v1/openapi.json
Swagger UI allows you to:
- View all available endpoints
- Test the API directly from the browser
- View data schemas (request/response models)
- See request and response examples
The full OpenAPI 3.0 specification is in docs/api/openapi.yaml.
GET /api/v1/health- service health check
GET /api/v1/flags- list flagsPOST /api/v1/flags- create flagGET /api/v1/flags/{flagID}- get flagPUT /api/v1/flags/{flagID}- update flagDELETE /api/v1/flags/{flagID}- delete flagPUT /api/v1/flags/{flagID}/enabled- enable/disable flagPUT /api/v1/flags/{flagID}/restore- restore deleted flagGET /api/v1/flags/{flagID}/snapshots- flag snapshot historyGET /api/v1/flags/entity_types- entity types
GET /api/v1/flags/{flagID}/segments- list segmentsPOST /api/v1/flags/{flagID}/segments- create segmentPUT /api/v1/flags/{flagID}/segments/{segmentID}- update segmentDELETE /api/v1/flags/{flagID}/segments/{segmentID}- delete segmentPUT /api/v1/flags/{flagID}/segments/reorder- reorder segments
GET /api/v1/flags/{flagID}/segments/{segmentID}/constraints- list constraintsPOST /api/v1/flags/{flagID}/segments/{segmentID}/constraints- create constraintPUT /api/v1/flags/{flagID}/segments/{segmentID}/constraints/{constraintID}- update constraintDELETE /api/v1/flags/{flagID}/segments/{segmentID}/constraints/{constraintID}- delete constraint
Supported operators: EQ, NEQ, LT, LTE, GT, GTE, EREG, NEREG, IN, NOTIN, CONTAINS, NOTCONTAINS
GET /api/v1/flags/{flagID}/segments/{segmentID}/distributions- list distributionsPUT /api/v1/flags/{flagID}/segments/{segmentID}/distributions- update distributions
GET /api/v1/flags/{flagID}/variants- list variantsPOST /api/v1/flags/{flagID}/variants- create variantPUT /api/v1/flags/{flagID}/variants/{variantID}- update variantDELETE /api/v1/flags/{flagID}/variants/{variantID}- delete variant
GET /api/v1/tags- list all tagsGET /api/v1/flags/{flagID}/tags- flag tagsPOST /api/v1/flags/{flagID}/tags- create tag byvalue(or find existing) and attach to flag. Body:{"value": "..."}DELETE /api/v1/flags/{flagID}/tags/{tagID}- remove tag from flag
POST /api/v1/evaluation- evaluate single flagPOST /api/v1/evaluation/batch- batch flag evaluation
GET /api/v1/export/sqlite- export to SQLite fileGET /api/v1/export/eval_cache/json- export eval cache to JSON
- OpenAPI specification:
docs/api/openapi.yaml - Swagger UI: available at
/docswhen the server is running