Feature Flags

Set a flag's value in one environment, and/or flip its kill switch.

Changed on
put/projects/{project_id}/flags/{key}/environments/{environment_id}

Request

  • Base URL
    /api (relative, and the document was published on a file host, not at the API’s origin)
  • Auth
    HTTP bearer

Path parameters

project_idinteger required

Project ID

keystring required

Flag key

environment_idinteger required

Environment ID

Request body

enabledboolean nullable

The kill switch. false makes the flag serve its default regardless of any override — and, once targeting exists, regardless of any rule.

valueunknown

Response

Environment value set

enabledboolean required
environment_idinteger required
rules_validboolean required

false when the stored rules could not be decoded. The flag then serves its default with reason ERROR until they are replaced.

updated_atstring required

Send back as expected_updated_at when replacing the rules.

valueunknown

Example response

{
  "rules": [
    {
      "conditions": [
        {
          "attribute": "plan"
        }
      ]
    }
  ]
}

Changes

    • info

      added the required property rules to the response with the status

    • info

      added the required property rules_valid to the response with the status

    • info

      added the required property updated_at to the response with the status