Feature Flags

PATCH /projects/{project_id}/flags/{key}

Changed on

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

Request body

client_visibleboolean nullable
default_valueunknown
descriptionstring nullable

Tri-state: absent leaves it, null clears it, a string sets it.

expected_updated_atstring nullable

The flag's updated_at as last read. When sent, the update is refused with 409 if the flag changed since.

exposure_sample_ratenumber double nullable

Example request

{
  "variants": [
    {
      "key": "test"
    }
  ]
}

Response

Flag updated

archived_atstring nullable
client_visibleboolean required
created_atstring required
default_valueunknown required
descriptionstring nullable
exposure_sample_ratenumber double required

Share of subjects whose browser records exposure events. 0 = off.

idinteger required
keystring required
last_evaluated_atstring nullable

When an app last actually evaluated this flag. None means never seen, which is a real answer rather than missing data.

updated_atstring required

Send back as expected_updated_at to make an update conditional.

value_typestring required

Changes

    • info

      added the new optional request property expected_updated_at

    • info

      added the new optional request property exposure_sample_rate

    • info

      added the new optional request property variants

    6 more changes in this revision