flags
DELETE
https://lucidace.com /v1/projects/{project_id}/flag-templates/{id} Scope flag:writeParameters
project_idstringpathrequiredidstringpathrequiredCode samples
cURL
curl -X DELETE "https://lucidace.com/v1/projects/{project_id}/flag-templates/{id}"TypeScript
Python
Go
PHP
Ruby
Java
Responses
204
403
404
GET
https://lucidace.com /v1/projects/{project_id}/flags Scope flag:readParameters
project_idstringpathrequiredlimitintegerqueryqstringquerycursorstringqueryCode samples
cURL
curl -X GET "https://lucidace.com/v1/projects/{project_id}/flags"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200
Example
{
"data": [
{
"created_at": "2024-01-01T00:00:00Z",
"created_by": "string",
"description": "string",
"enabled": true,
"environment_state": {},
"expires_at": "2024-01-01T00:00:00Z",
"filters": {},
"holdout_id": "string",
"id": "string",
"key": "string",
"kind": "string",
"lifecycle": "string",
"name": "string",
"namespace_id": "string",
"owner_user_id": "string",
"payloads": {},
"protected_envs": [
"string"
],
"stickiness": "string",
"tags": [
"string"
],
"updated_at": "2024-01-01T00:00:00Z",
"variants": {},
"version": 0
}
],
"next_cursor": "string"
}Schema
dataobject[]requiredShow child parameters
created_atstringrequiredcreated_bystringdescriptionstringrequiredenabledbooleanrequiredenvironment_stateobjectrequiredexpires_atstringfiltersobjectrequiredholdout_idstringidstringrequiredkeystringrequiredkindstringrequiredlifecyclestringrequireddraft | active | launched | deprecated (advisory; stale detection surfaces the last two).namestringrequirednamespace_idstringowner_user_idstringpayloadsobjectrequiredprotected_envsstring[]requiredstickinessstringrequiredtagsstring[]requiredupdated_atstringrequiredvariantsobjectrequiredversionintegerrequirednext_cursorstring404
POST
https://lucidace.com /v1/projects/{project_id}/flags Scope flag:writeParameters
project_idstringpathrequiredRequest body
application/json
A create / replace request for a flag.
descriptionstringenabledbooleanencrypt_payloadbooleanRemote config: seal the payload at rest (LC-FLG-26); only secret keys see the plaintext.
filtersobjectContents of the
feature_flags.filters column (and of a per-environment override).Show child parameters
app_contextsstring[]Serve only to SDKs declaring one of these app contexts (max 50; empty = everywhere).
compatstringForeign evaluation dialect of an imported flag (
posthog): the gateway buckets and matches it the way that vendor did, so migrated users keep their variants. Empty = Lucida's own.conditionsCondition[]Show child parameters
aggregationAggregationfiltersFilter[]payload_patchobjectRFC 7386 JSON merge patch applied to the served payload when this condition decides (P-L10).
rollout_pctnumberrequiredsegmentstringKey of a reusable flag segment (LC-FLG-15): the condition matches units in any of the segment's rules AND this condition's own
filters. The gateway expands it before serving.variant_overridestringcontinuitybooleanExperience continuity (LC-FLG-34): an identified person keeps the bucket of the anonymous id they had before identify.
designobjectExperiment design the gateway assigns by (LC-EXT-22), multivariate flags only:
{kind: "switchback", start, slice_seconds, run_len, geo_key?, control?, treated?} serves the arm of the current time block (per region when geo_key is set), {kind: "geo", geo_key, regions: {region: variant}} serves each region its variant. Units outside the design fall through to the next condition. Checked by [validate_design].early_exitbooleanStop at the first condition whose filters match (a rollout miss there is final).
evaluation_runtimestringclient | server, or empty for both: public keys never see server-only flags and secret keys never see client-only ones.holdoutobjectHoldout
{id, salt, percentage}: units hashing under percentage never see the flag.kill_switchbooleannamespaceobjectLayer range
{id, salt, start, end, total}: only units hashing into [start, end) of total buckets are eligible (evaluator support: see the lane report).prerequisitesPrerequisite[]Show child parameters
flagstringrequiredvalueobjectrequiredsaltstringstickybooleanSticky bucketing (LC-EXT-29): units keep their stored assignment when allocation changes. Only on-values are stored (boolean
true, the served variant); a unit that was out of the rollout is not pinned and is re-hashed, so raising a rollout only adds units.keystringrequiredkindstringboolean | multivariate | remote_config | migration | ai_config; only multivariate, migration and ai_config take variants.namestringpayloadsobject{default: ..} for remote config, or {variant key: payload}.stickinessstringBucketing unit:
distinct_id | person_id | device_id | group:<type> | context:<user|device|org>. Not the same as filters.sticky, which pins stored assignments.tagsstring[]variantsVariant[]Show child parameters
keystringrequiredpayloadobjectrollout_pctnumberrequired{
"description": "string",
"enabled": true,
"encrypt_payload": true,
"filters": {
"app_contexts": [
"string"
],
"compat": "string",
"conditions": [
{
"aggregation": {
"context_kind": "string",
"group_type": "string",
"kind": "string"
},
"filters": [
{
"context_kind": "string",
"group_type": "string",
"key": "string",
"op": "string",
"properties": [
null
],
"scope": "string",
"type": "string",
"value": {}
}
],
"payload_patch": {},
"rollout_pct": 0,
"segment": "string",
"variant_override": "string"
}
],
"continuity": true,
"design": {},
"early_exit": true,
"evaluation_runtime": "string",
"holdout": {},
"kill_switch": true,
"namespace": {},
"prerequisites": [
{
"flag": "string",
"value": {}
}
],
"salt": "string",
"sticky": true
},
"key": "string",
"kind": "string",
"name": "string",
"payloads": {},
"stickiness": "string",
"tags": [
"string"
],
"variants": [
{
"key": "string",
"payload": {},
"rollout_pct": 0
}
]
}Code samples
cURL
curl -X POST "https://lucidace.com/v1/projects/{project_id}/flags" \
-H "Content-Type: application/json" \
-d '{"description":"string","enabled":true,"encrypt_payload":true,"filters":{"app_contexts":["string"],"compat":"string","conditions":[{"aggregation":{"context_kind":"string","group_type":"string","kind":"string"},"filters":[{"context_kind":"string","group_type":"string","key":"string","op":"string","properties":[null],"scope":"string","type":"string","value":{}}],"payload_patch":{},"rollout_pct":0,"segment":"string","variant_override":"string"}],"continuity":true,"design":{},"early_exit":true,"evaluation_runtime":"string","holdout":{},"kill_switch":true,"namespace":{},"prerequisites":[{"flag":"string","value":{}}],"salt":"string","sticky":true},"key":"string","kind":"string","name":"string","payloads":{},"stickiness":"string","tags":["string"],"variants":[{"key":"string","payload":{},"rollout_pct":0}]}'TypeScript
Python
Go
PHP
Ruby
Java
Responses
201
Example
{
"created_at": "2024-01-01T00:00:00Z",
"created_by": "string",
"description": "string",
"enabled": true,
"environment_state": {},
"expires_at": "2024-01-01T00:00:00Z",
"filters": {},
"holdout_id": "string",
"id": "string",
"key": "string",
"kind": "string",
"lifecycle": "string",
"name": "string",
"namespace_id": "string",
"owner_user_id": "string",
"payloads": {},
"protected_envs": [
"string"
],
"stickiness": "string",
"tags": [
"string"
],
"updated_at": "2024-01-01T00:00:00Z",
"variants": {},
"version": 0
}Schema
created_atstringrequiredcreated_bystringdescriptionstringrequiredenabledbooleanrequiredenvironment_stateobjectrequiredexpires_atstringfiltersobjectrequiredholdout_idstringidstringrequiredkeystringrequiredkindstringrequiredlifecyclestringrequireddraft | active | launched | deprecated (advisory; stale detection surfaces the last two).namestringrequirednamespace_idstringowner_user_idstringpayloadsobjectrequiredprotected_envsstring[]requiredstickinessstringrequiredtagsstring[]requiredupdated_atstringrequiredvariantsobjectrequiredversionintegerrequired400
403
404
GET
https://lucidace.com /v1/projects/{project_id}/flags-deleted Scope flag:readParameters
project_idstringpathrequiredlimitintegerquerycursorstringqueryCode samples
cURL
curl -X GET "https://lucidace.com/v1/projects/{project_id}/flags-deleted"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200
Example
{
"data": [
{
"deleted_at": "2024-01-01T00:00:00Z",
"id": "string",
"key": "string",
"name": "string"
}
],
"next_cursor": "string"
}Schema
dataobject[]requiredShow child parameters
deleted_atstringrequiredidstringrequiredkeystringrequirednamestringrequirednext_cursorstring404
POST
https://lucidace.com /v1/projects/{project_id}/flags/bulk Scope flag:writeApply one action to many flags. Each flag commits on its own, through the same validation, approval gate and policy as a single edit; failures are reported per flag.
Parameters
project_idstringpathrequiredforcebooleanqueryEdit serving state although a running experiment owns the flag; otherwise that flag's result is an error
Request body
application/json
actionstringrequiredadd_tags | remove_tags | enable | disable | delete | copy_environmentenvironmentstringenable / disable: the environment (absent = base state).
fromstringcopy_environment: source and target environments.
idsstring[]required1 to 100 flag ids.
tagsstring[]tostring{
"action": "string",
"environment": "string",
"from": "string",
"ids": [
"string"
],
"tags": [
"string"
],
"to": "string"
}Code samples
cURL
curl -X POST "https://lucidace.com/v1/projects/{project_id}/flags/bulk" \
-H "Content-Type: application/json" \
-d '{"action":"string","environment":"string","from":"string","ids":["string"],"tags":["string"],"to":"string"}'TypeScript
Python
Go
PHP
Ruby
Java
Responses
200
Example
[
{
"error": "string",
"id": "string",
"ok": true
}
]Schema
errorstringidstringrequiredokbooleanrequired400
403
404
GET
https://lucidace.com /v1/projects/{project_id}/flags/code-refs Scope flag:readParameters
project_idstringpathrequiredflag_keystringquerylimitintegerquerycursorstringqueryCode samples
cURL
curl -X GET "https://lucidace.com/v1/projects/{project_id}/flags/code-refs"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200
Example
{
"data": [
{
"flag_key": "string",
"refs": [
{
"file": "string",
"kind": "string",
"line": 0
}
],
"repo": "string",
"scanned_at": "2024-01-01T00:00:00Z"
}
],
"next_cursor": "string"
}Schema
dataobject[]requiredShow child parameters
flag_keystringrequiredrefsCodeRefView[]required[{file, line, kind}]Show child parameters
filestringrequiredkindstringrequiredcall | string | ... as classified by the scanner.lineintegerrequiredrepostringrequiredscanned_atstringrequirednext_cursorstring404
Updated