# Updates a Feature Flag

This operation is used to modify a Feature Flag.  The request body can include one or more instructions that can modify
flag attributes such as the state (off|on), the variations that are returned and serving rules.
For example if you want to turn a flag off you can use this opeartion and send the setFeatureFlagState

{
  "kind": "setFeatureFlagState",
  "parameters": {
    "state": "off"
  }
}

Endpoint: PATCH /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

  - `environmentIdentifier` (string)
    Environment

## Request fields (application/json):

  - `comment` (string)
    A comment explaining the reason for this patch operation
    Example: "This is a comment string"

  - `executionTime` (integer)
    Time of execution in unix epoch milliseconds when the scheduled changes will be applied

  - `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"

  - `instructions` (array, required)
    A list of Patch Instructions

  - `instructions.kind` (string, required)
    The name of the modification you would like to perform on a resource.
    Example: "enableFeatureFlag"

  - `instructions.parameters` (object, required)
    Example: {"ruleId":"TestRule","variationID":"TestVariation"}

## 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"


