Skip to main content
PUT
/
projects
/
{project_id}
/
workspaces
/
{workspace_id}
/
feature-flags
/
{flag_id}
Update Feature Flag
curl --request PUT \
  --url https://{regionAndDomain}.com/api/app/projects/{project_id}/workspaces/{workspace_id}/feature-flags/{flag_id} \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "key": "<string>",
  "tags": [
    "<string>"
  ],
  "context": "<string>",
  "ruleset": {
    "variants": [
      {
        "key": "<string>",
        "value": true,
        "is_control": true,
        "split": 0.5,
        "description": "<string>",
        "is_sticky": false
      }
    ],
    "rollout": [
      {
        "rollout_percentage": 0.5,
        "variant_splits": {},
        "name": "<string>",
        "cohort_definition": {},
        "runtime_evaluation_definition": {},
        "runtime_evaluation_rule": {},
        "runtime_event_rule": {
          "event_name": "<string>",
          "time_window": "while_flag_enabled",
          "property_filters": {}
        },
        "cohort_hash": "<string>",
        "variant_override": {
          "key": "<string>"
        }
      }
    ],
    "test": {}
  },
  "description": "<string>",
  "experiment_id": "<string>",
  "status": "disabled",
  "data_group_id": "<string>",
  "workspace_id": 123,
  "is_experiment_active": true,
  "hash_salt": "<string>",
  "reset_hash_salt": true
}
'
{
  "status": "<string>",
  "results": {
    "name": "<string>",
    "key": "<string>",
    "tags": [
      "<string>"
    ],
    "context": "<string>",
    "ruleset": {
      "variants": [
        {
          "key": "<string>",
          "value": true,
          "is_control": true,
          "split": 0.5,
          "description": "<string>",
          "is_sticky": false
        }
      ],
      "rollout": [
        {
          "rollout_percentage": 0.5,
          "variant_splits": {},
          "name": "<string>",
          "cohort_definition": {},
          "runtime_evaluation_definition": {},
          "runtime_evaluation_rule": {},
          "runtime_event_rule": {
            "event_name": "<string>",
            "time_window": "while_flag_enabled",
            "property_filters": {}
          },
          "cohort_hash": "<string>",
          "variant_override": {
            "key": "<string>"
          }
        }
      ],
      "test": {}
    },
    "id": "<string>",
    "project_id": 123,
    "content_type": "<string>",
    "created": "2023-11-07T05:31:56Z",
    "creator_id": 123,
    "creator_name": "<string>",
    "creator_email": "<string>",
    "modified": "2023-11-07T05:31:56Z",
    "can_update_basic": false,
    "is_superadmin": false,
    "allow_staff_override": false,
    "can_view": false,
    "can_share": false,
    "can_pin": false,
    "is_shared_with_project": false,
    "description": "<string>",
    "experiment_id": "<string>",
    "status": "disabled",
    "data_group_id": "<string>",
    "workspace_id": 123,
    "is_experiment_active": true,
    "hash_salt": "<string>",
    "reset_hash_salt": true,
    "last_modified_by_id": 123,
    "last_modified_by_name": "<string>",
    "last_modified_by_email": "<string>",
    "is_favorited": true,
    "pinned_date": "<string>",
    "enabled_at": "2023-11-07T05:31:56Z",
    "deleted": "2023-11-07T05:31:56Z",
    "content_environments_id": "<string>",
    "project_name": "<string>"
  }
}

Authorizations

Authorization
string
header
required

Service Account

Path Parameters

project_id
integer
required
workspace_id
integer
required
flag_id
string
required

Body

application/json
name
string
required
Required string length: 1 - 255
key
string
required
Required string length: 1 - 255
tags
string[]
required
context
string
required
Required string length: 1 - 255
serving_method
enum<string>
required
Available options:
client,
server,
remote_or_local,
remote_only
ruleset
ManagementRuleSet · object
required
description
string | null
experiment_id
string<uuid4> | null
status
enum<string>
default:disabled
Available options:
enabled,
disabled,
archived
data_group_id
workspace_id
integer | null
is_experiment_active
boolean | null
hash_salt
string | null
Required string length: 32
reset_hash_salt
boolean | null

Response

Success

status
string
required
Allowed value: "ok"
results
FeatureFlagApiResponse · object
required