PATCH
/
console
/
v1
/
gates
/
{id}
/
rules
/
{ruleID}
curl --request PATCH \
  --url https://statsigapi.net/console/v1/gates/{id}/rules/{ruleID} \
  --header 'Content-Type: application/json' \
  --header 'STATSIG-API-KEY: <api-key>' \
  --data '{
  "name": "All Conditions",
  "id": "38ttpCpzrQFTMKcqFKk02l:10.00:1",
  "baseID": "38ttpCpzrQFTMKcqFKk02l",
  "passPercentage": 10,
  "conditions": [
    {
      "type": "user_id",
      "targetValue": [
        "35sClJFs8l0y5uRQhDwUDo"
      ],
      "operator": "any"
    }
  ],
  "environments": [
    "staging"
  ]
}'
{
  "message": "Gate updated successfully.",
  "data": {
    "id": "a_gate",
    "isEnabled": true,
    "description": "helpful summary of what this gate does",
    "status": "In Progress",
    "lastModifierName": "CONSOLE API",
    "lastModifierID": "1vaasdfLlkaujjajiuOSBP2",
    "rules": [
      {
        "name": "All Conditions",
        "id": "38ttpCpzrQFTMKcqFKk02l:10.00:1",
        "baseID": "38ttpCpzrQFTMKcqFKk02l",
        "passPercentage": 10,
        "conditions": [
          {
            "type": "user_id",
            "targetValue": [
              "35sClJFs8l0y5uRQhDwUDo"
            ],
            "operator": "any"
          }
        ],
        "environments": [
          "staging"
        ]
      }
    ],
    "tags": [
      "* Core"
    ]
  }
}

Authorizations

STATSIG-API-KEY
string
header
required

Headers

x-respect-review-settings
string

Optional header to respect review settings for mutation endpoints.

Path Parameters

id
string
required

Gate ID

ruleID
string
required

Rule ID

Body

application/json

Response

200 - application/json

Update gate response

The response is of type object.