Skip to main content
PUT
/
v1
/
projects
/
{projectId}
/
environments
/
{envId}
/
flags
/
{flagKey}
# Simple enable
curl -X PUT https://nest.feather.mupeni.dev/v1/projects/proj_01hx.../environments/env_01hx.../flags/new-checkout \
  -H "Authorization: Bearer <server_key>" \
  -H "Content-Type: application/json" \
  -d '{
    "version": 1,
    "enabled": true,
    "defaultValue": false,
    "rules": []
  }'
{
  "id": "fv_02hx...",
  "flagId": "flag_01hx...",
  "environmentId": "env_01hx...",
  "version": 2,
  "config": {
    "version": 2,
    "enabled": true,
    "defaultValue": false,
    "rules": []
  },
  "createdAt": "2024-04-02T08:00:00.000Z"
}
This endpoint appends a new version — it never mutates existing rows. The new version becomes the active config immediately and the edge cache is updated. If the environment is protected, this endpoint returns 403. Use Create Proposal instead.

Path parameters

projectId
string
required
envId
string
required
flagKey
string
required
The flag’s key.

Body

version
number
required
Must equal the current latest version plus one. If the flag has no existing version in this environment, send 1. If the value does not match, the server returns 409 VERSION_CONFLICT — fetch the latest version and retry.
enabled
boolean
required
Master toggle. false short-circuits all rules and returns defaultValue.
defaultValue
boolean | string | number
required
Returned when no rule matches. Must match the flag’s type.
rules
Rule[]
required
Ordered list of targeting rules. See Flag Config for the full rule schema. Pass an empty array for a simple on/off flag.
variants
Variant[]
Named value definitions for string or number flags.
Using regex or geo_country operators, or setting rolloutPercentage on a rule, requires a Pro or Enterprise plan.
# Simple enable
curl -X PUT https://nest.feather.mupeni.dev/v1/projects/proj_01hx.../environments/env_01hx.../flags/new-checkout \
  -H "Authorization: Bearer <server_key>" \
  -H "Content-Type: application/json" \
  -d '{
    "version": 1,
    "enabled": true,
    "defaultValue": false,
    "rules": []
  }'
{
  "id": "fv_02hx...",
  "flagId": "flag_01hx...",
  "environmentId": "env_01hx...",
  "version": 2,
  "config": {
    "version": 2,
    "enabled": true,
    "defaultValue": false,
    "rules": []
  },
  "createdAt": "2024-04-02T08:00:00.000Z"
}