# Updates a Feature Flag

Updates a Feature Flag in the Project

Endpoint: PUT /cf/admin/features/{identifier}
Version: 1.0
Security: x-api-key

## Path parameters:

  - `identifier` (string, required)
    Unique identifier for the object in the API.

## Query parameters:

  - `accountIdentifier` (string, required)
    Account Identifier

  - `orgIdentifier` (string, required)
    Organization Identifier

  - `projectIdentifier` (string, required)
    The Project identifier

## Request fields (application/json):

  - `defaultOffVariation` (string)

  - `defaultOnVariation` (string)

  - `description` (string)

  - `environments` (array)

  - `environments.defaultOffVariation` (string)
    The default variation to serve when the flag is disabled in this environment
    Example: "red"

  - `environments.defaultOnVariation` (string)
    The default variation to serve when the flag is enabled in this environment
    Example: "blue"

  - `environments.identifier` (string, required)
    The name of the environment
    Example: "env1"

  - `environments.rules` (array)

  - `environments.rules.targets` (array)
    The target rules that should be set for this variation
    Example: ["target1","target2"]

  - `environments.rules.variation` (string, required)
    The name of the variation these rules apply to
    Example: true

  - `environments.state` (string)
    The state of the flag in this environment i.e. "on" or "off"
    Example: "on"

  - `gitDetails` (object)
    The commit message to use as part of a gitsync operation

  - `gitDetails.commitMsg` (string, required)
    A description of the change or action
    Example: "Turning on flag test-flag for production"

  - `name` (string)

  - `permanent` (boolean)

  - `tags` (array)

  - `tags.identifier` (string, required)
    The identifier of the tag
    Example: "feature-flag-tag-1"

  - `tags.name` (string, required)
    The name of the tag
    Example: "feature-flag-tag-1"

  - `variations` (array)

  - `variations.description` (string)
    A description of the variation

  - `variations.identifier` (string, required)
    The unique identifier for the variation
    Example: "off-variation"

  - `variations.name` (string)
    The user friendly name of the variation
    Example: "Off VAriation"

  - `variations.value` (string, required)
    The variation value to serve such as true or false for a boolean flag
    Example: "true"

## Response 200 fields (application/json):

  - `details` (object)
    Additional metadata about the request

  - `details.governanceMetadata` (object)
    Summary of governance checks including any warnings

  - `details.pipelineMetadata` (object)
    Info about the pipeline whether a pipeline was triggered

  - `details.pipelineMetadata.pipelineExecutionId` (string)
    The ID of the pipeline execution

  - `details.pipelineMetadata.pipelineTriggered` (boolean)
    Whether a pipeline was triggered

## Response 400 fields (application/json):

  - `code` (string, required)
    The http error code
    Example: 404

  - `details` (object)
    Additional details about the error

  - `message` (string, required)
    The reason the request failed
    Example: "Error retrieving projects, organization 'default_org' does not exist"


