> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.getunleash.io/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.getunleash.io/_mcp/server.

# Edit a change

PUT https://app.unleash-instance.example.com/api/admin/projects/{projectId}/change-requests/{changeRequestId}/changes/{changeId}
Content-Type: application/json

**Enterprise feature**

This endpoint will edit one change from a change request if it matches the provided id. The edit removes previous change and inserts a new one. You

should not rely on the changeId for subsequent edits and always check the most recent changeId.

Reference: https://docs.getunleash.io/api/edit-change

## Authentication

- `Authorization` header (required) — API key needed to access this API
- `Authorization` header (bearer token, required) — API key needed to access this API, in Bearer token format

## Request

### Path parameters

- `projectId` (string, required)
- `changeRequestId` (string, required)
- `changeId` (string, required)

### Body (application/json)

- `object or object or object or object or object or object or object or object or object or object or object or object or object or object or object or object or object or object or object or object or object or object`
  - object
    - `action` (enum, required) — The name of this action.
      - Allowed values: `updateSegment`
    - `payload` (object, required) — Data used to create or update a segment
      - `name` (string, required) — The name of the segment
      - `constraints` (list of object, required) — The list of constraints that make up this segment
        - `contextName` (string, required) — The name of the context field that this constraint should apply to.
        - `operator` (enum, required) — The operator to use when evaluating this constraint. For more information about the various operators, refer to [the strategy constraint operator documentation](https://docs.getunleash.io/concepts/activation-strategies#constraint-operators).
          - Allowed values: `NOT_IN`, `IN`, `STR_ENDS_WITH`, `STR_STARTS_WITH`, `STR_CONTAINS`, `NUM_EQ`, `NUM_GT`, `NUM_GTE`, `NUM_LT`, `NUM_LTE`, `DATE_AFTER`, `DATE_BEFORE`, `SEMVER_EQ`, `SEMVER_GT`, `SEMVER_LT`, `SEMVER_GTE`, `SEMVER_LTE`, `REGEX`
        - `caseInsensitive` (boolean, optional, default: false) — Whether the operator should be case sensitive or not. Defaults to `false` (being case sensitive).
        - `inverted` (boolean, optional, default: false) — Whether the result should be negated or not. If `true`, will turn a `true` result into a `false` result and vice versa.
        - `values` (list of string, optional) — The context values that should be used for constraint evaluation. Use this property instead of `value` for properties that accept multiple values.
        - `value` (string, optional) — The context value that should be used for constraint evaluation. Use this property instead of `values` for properties that only accept single values.
      - `description` (string, optional, nullable) — A description of what the segment is for
      - `project` (string, optional, nullable) — The project the segment belongs to if any.
  - object
    - `action` (enum, required) — The name of this action.
      - Allowed values: `deleteSegment`
    - `payload` (object, required) — Required data to delete a segment.
      - `id` (integer, required) — The ID of the segment to delete.
  - object
    - `feature` (string, required) — The name of the feature that this change applies to.
    - `action` (enum, required) — The name of this action.
      - Allowed values: `updateEnabled`
    - `payload` (object, required)
      - `enabled` (boolean, required) — The new state of the feature.
      - `shouldActivateDisabledStrategies` (boolean, optional) — Only relevant when ALL the strategies are disabled. If `true`, all the disabled strategies will be enabled. If `false`, the default strategy will be added
  - object
    - `feature` (string, required) — The name of the feature that this change applies to.
    - `action` (enum, required) — The name of this action.
      - Allowed values: `addStrategy`
    - `payload` (object, required) — Create a strategy configuration in a feature
      - `name` (string, required) — The name of the strategy type
      - `title` (string, optional, nullable) — A descriptive title for the strategy
      - `disabled` (boolean, optional, nullable) — A toggle to disable the strategy. defaults to false. Disabled strategies are not evaluated or returned to the SDKs
      - `sortOrder` (double, optional) — The order of the strategy in the list
      - `constraints` (list of object, optional) — A list of the constraints attached to the strategy. See https://docs.getunleash.io/concepts/activation-strategies#constraints
        - `contextName` (string, required) — The name of the context field that this constraint should apply to.
        - `operator` (enum, required) — The operator to use when evaluating this constraint. For more information about the various operators, refer to [the strategy constraint operator documentation](https://docs.getunleash.io/concepts/activation-strategies#constraint-operators).
          - Allowed values: `NOT_IN`, `IN`, `STR_ENDS_WITH`, `STR_STARTS_WITH`, `STR_CONTAINS`, `NUM_EQ`, `NUM_GT`, `NUM_GTE`, `NUM_LT`, `NUM_LTE`, `DATE_AFTER`, `DATE_BEFORE`, `SEMVER_EQ`, `SEMVER_GT`, `SEMVER_LT`, `SEMVER_GTE`, `SEMVER_LTE`, `REGEX`
        - `caseInsensitive` (boolean, optional, default: false) — Whether the operator should be case sensitive or not. Defaults to `false` (being case sensitive).
        - `inverted` (boolean, optional, default: false) — Whether the result should be negated or not. If `true`, will turn a `true` result into a `false` result and vice versa.
        - `values` (list of string, optional) — The context values that should be used for constraint evaluation. Use this property instead of `value` for properties that accept multiple values.
        - `value` (string, optional) — The context value that should be used for constraint evaluation. Use this property instead of `values` for properties that only accept single values.
      - `variants` (list of object, optional) — Strategy level variants
        - `name` (string, required) — The variant name. Must be unique for this feature flag
        - `weight` (integer, required) — The weight is the likelihood of any one user getting this variant. It is an integer between 0 and 1000. See the section on [variant weights](https://docs.getunleash.io/concepts/feature-flag-variants#variant-weight) for more information
        - `weightType` (enum, required) — Set to `fix` if this variant must have exactly the weight allocated to it. If the type is `variable`, the weight will adjust so that the total weight of all variants adds up to 1000. Refer to the [variant weight documentation](https://docs.getunleash.io/concepts/feature-flag-variants#variant-weight).
          - Allowed values: `variable`, `fix`
        - `stickiness` (string, required) — The [stickiness](https://docs.getunleash.io/concepts/feature-flag-variants#variant-stickiness) to use for distribution of this variant. Stickiness is how Unleash guarantees that the same user gets the same variant every time
        - `payload` (object, optional) — Extra data configured for this variant
          - `type` (enum, required) — The type of the value. Commonly used types are string, number, json and csv.
            - Allowed values: `json`, `csv`, `string`, `number`
          - `value` (string, required) — The actual value of payload
      - `parameters` (map from string to string, optional) — An object containing the parameters for the strategy
      - `segments` (list of double, optional) — Ids of segments to use for this strategy
  - object
    - `feature` (string, required) — The name of the feature that this change applies to.
    - `action` (enum, required) — The name of this action.
      - Allowed values: `updateMilestoneStrategy`
    - `payload` (object, required) — Update a milestone strategy configuration for a feature flag
      - `sortOrder` (double, optional) — The order of the strategy in the list in feature environment configuration
      - `constraints` (list of object, optional) — A list of the constraints attached to the strategy. See https://docs.getunleash.io/concepts/activation-strategies#constraints
        - `contextName` (string, required) — The name of the context field that this constraint should apply to.
        - `operator` (enum, required) — The operator to use when evaluating this constraint. For more information about the various operators, refer to [the strategy constraint operator documentation](https://docs.getunleash.io/concepts/activation-strategies#constraint-operators).
          - Allowed values: `NOT_IN`, `IN`, `STR_ENDS_WITH`, `STR_STARTS_WITH`, `STR_CONTAINS`, `NUM_EQ`, `NUM_GT`, `NUM_GTE`, `NUM_LT`, `NUM_LTE`, `DATE_AFTER`, `DATE_BEFORE`, `SEMVER_EQ`, `SEMVER_GT`, `SEMVER_LT`, `SEMVER_GTE`, `SEMVER_LTE`, `REGEX`
        - `caseInsensitive` (boolean, optional, default: false) — Whether the operator should be case sensitive or not. Defaults to `false` (being case sensitive).
        - `inverted` (boolean, optional, default: false) — Whether the result should be negated or not. If `true`, will turn a `true` result into a `false` result and vice versa.
        - `values` (list of string, optional) — The context values that should be used for constraint evaluation. Use this property instead of `value` for properties that accept multiple values.
        - `value` (string, optional) — The context value that should be used for constraint evaluation. Use this property instead of `values` for properties that only accept single values.
      - `title` (string, optional, nullable) — A descriptive title for the strategy
      - `disabled` (boolean, optional, nullable) — A toggle to disable the strategy. defaults to true. Disabled strategies are not evaluated or returned to the SDKs
      - `variants` (list of object, optional) — Strategy level variants
        - `name` (string, required) — The variant name. Must be unique for this feature flag
        - `weight` (integer, required) — The weight is the likelihood of any one user getting this variant. It is an integer between 0 and 1000. See the section on [variant weights](https://docs.getunleash.io/concepts/feature-flag-variants#variant-weight) for more information
        - `weightType` (enum, required) — Set to `fix` if this variant must have exactly the weight allocated to it. If the type is `variable`, the weight will adjust so that the total weight of all variants adds up to 1000. Refer to the [variant weight documentation](https://docs.getunleash.io/concepts/feature-flag-variants#variant-weight).
          - Allowed values: `variable`, `fix`
        - `stickiness` (string, required) — The [stickiness](https://docs.getunleash.io/concepts/feature-flag-variants#variant-stickiness) to use for distribution of this variant. Stickiness is how Unleash guarantees that the same user gets the same variant every time
        - `payload` (object, optional) — Extra data configured for this variant
          - `type` (enum, required) — The type of the value. Commonly used types are string, number, json and csv.
            - Allowed values: `json`, `csv`, `string`, `number`
          - `value` (string, required) — The actual value of payload
      - `segments` (list of double, optional) — A list of segment ids attached to the strategy
      - `parameters` (map from string to string, optional) — A list of parameters for a strategy
  - object
    - `feature` (string, required) — The name of the feature that this change applies to.
    - `action` (enum, required) — The name of this action.
      - Allowed values: `updateStrategy`
    - `payload` (object, required) — Update a strategy configuration in a feature
      - `sortOrder` (double, optional) — The order of the strategy in the list in feature environment configuration
      - `constraints` (list of object, optional) — A list of the constraints attached to the strategy. See https://docs.getunleash.io/concepts/activation-strategies#constraints
        - `contextName` (string, required) — The name of the context field that this constraint should apply to.
        - `operator` (enum, required) — The operator to use when evaluating this constraint. For more information about the various operators, refer to [the strategy constraint operator documentation](https://docs.getunleash.io/concepts/activation-strategies#constraint-operators).
          - Allowed values: `NOT_IN`, `IN`, `STR_ENDS_WITH`, `STR_STARTS_WITH`, `STR_CONTAINS`, `NUM_EQ`, `NUM_GT`, `NUM_GTE`, `NUM_LT`, `NUM_LTE`, `DATE_AFTER`, `DATE_BEFORE`, `SEMVER_EQ`, `SEMVER_GT`, `SEMVER_LT`, `SEMVER_GTE`, `SEMVER_LTE`, `REGEX`
        - `caseInsensitive` (boolean, optional, default: false) — Whether the operator should be case sensitive or not. Defaults to `false` (being case sensitive).
        - `inverted` (boolean, optional, default: false) — Whether the result should be negated or not. If `true`, will turn a `true` result into a `false` result and vice versa.
        - `values` (list of string, optional) — The context values that should be used for constraint evaluation. Use this property instead of `value` for properties that accept multiple values.
        - `value` (string, optional) — The context value that should be used for constraint evaluation. Use this property instead of `values` for properties that only accept single values.
      - `title` (string, optional, nullable) — A descriptive title for the strategy
      - `disabled` (boolean, optional, nullable) — A toggle to disable the strategy. defaults to true. Disabled strategies are not evaluated or returned to the SDKs
      - `variants` (list of object, optional) — Strategy level variants
        - `name` (string, required) — The variant name. Must be unique for this feature flag
        - `weight` (integer, required) — The weight is the likelihood of any one user getting this variant. It is an integer between 0 and 1000. See the section on [variant weights](https://docs.getunleash.io/concepts/feature-flag-variants#variant-weight) for more information
        - `weightType` (enum, required) — Set to `fix` if this variant must have exactly the weight allocated to it. If the type is `variable`, the weight will adjust so that the total weight of all variants adds up to 1000. Refer to the [variant weight documentation](https://docs.getunleash.io/concepts/feature-flag-variants#variant-weight).
          - Allowed values: `variable`, `fix`
        - `stickiness` (string, required) — The [stickiness](https://docs.getunleash.io/concepts/feature-flag-variants#variant-stickiness) to use for distribution of this variant. Stickiness is how Unleash guarantees that the same user gets the same variant every time
        - `payload` (object, optional) — Extra data configured for this variant
          - `type` (enum, required) — The type of the value. Commonly used types are string, number, json and csv.
            - Allowed values: `json`, `csv`, `string`, `number`
          - `value` (string, required) — The actual value of payload
      - `segments` (list of double, optional) — A list of segment ids attached to the strategy
      - `parameters` (map from string to string, optional) — A list of parameters for a strategy
      - `name` (string, optional, deprecated) — The name of the strategy type. This property is deprecated and the ability to change a strategy's type will be removed in a future release.
  - object
    - `feature` (string, required) — The name of the feature that this change applies to.
    - `action` (enum, required) — The name of this action.
      - Allowed values: `deleteStrategy`
    - `payload` (object, required)
      - `id` (string, required) — The ID of the strategy to update.
  - object
    - `feature` (string, required) — The name of the feature that this change applies to.
    - `action` (enum, required) — The name of this action.
      - Allowed values: `archiveFeature`
  - object
    - `feature` (string, required) — The name of the feature that this change applies to.
    - `action` (enum, required) — The name of this action.
      - Allowed values: `patchVariant`
    - `payload` (object, required)
      - `variants` (list of object, required)
        - `name` (string, required) — The variants name. Is unique for this feature flag
        - `weight` (double, required) — The weight is the likelihood of any one user getting this variant. It is a number between 0 and 1000. See the section on [variant weights](https://docs.getunleash.io/concepts/feature-flag-variants#variant-weight) for more information
        - `weightType` (enum, optional) — Set to fix if this variant must have exactly the weight allocated to it. If the type is variable, the weight will adjust so that the total weight of all variants adds up to 1000
          - Allowed values: `variable`, `fix`
        - `stickiness` (string, optional) — [Stickiness](https://docs.getunleash.io/concepts/feature-flag-variants#variant-stickiness) is how Unleash guarantees that the same user gets the same variant every time
        - `payload` (object, optional) — Extra data configured for this variant
          - `type` (enum, required) — The type of the value. Commonly used types are string, number, json and csv.
            - Allowed values: `json`, `csv`, `string`, `number`
          - `value` (string, required) — The actual value of payload
        - `overrides` (list of object, optional) — Overrides assigning specific variants to specific users. The weighting system automatically assigns users to specific groups for you, but any overrides in this list will take precedence.
          - `contextName` (string, required) — The name of the context field used to determine overrides
          - `values` (list of string, required) — Which values that should be overriden
  - object
    - `feature` (string, required) — The name of the feature that this change applies to.
    - `action` (enum, required) — The name of this action.
      - Allowed values: `reorderStrategy`
    - `payload` (list of object, required) — An array of strategies with their new sort order
      - `id` (string, required) — The ID of the strategy
      - `sortOrder` (double, required) — The new sort order of the strategy
  - object
    - `feature` (string, required) — The name of the feature that this change applies to.
    - `action` (enum, required) — The name of this action.
      - Allowed values: `addDependency`
    - `payload` (object, required) — Feature dependency on a parent feature in write model
      - `feature` (string, required) — The name of the feature we depend on.
      - `enabled` (boolean, optional) — Whether the parent feature should be enabled. When `false` variants are ignored. `true` by default.
      - `variants` (list of string, optional) — The list of variants the parent feature should resolve to. Leave empty when you only want to check the `enabled` status.
  - object
    - `feature` (string, required) — The name of the feature that this change applies to.
    - `action` (enum, required) — The name of this action.
      - Allowed values: `deleteDependency`
  - object
    - `feature` (string, required) — The name of the feature that this change applies to.
    - `action` (enum, required) — The name of this action.
      - Allowed values: `addReleasePlan`
    - `payload` (object, required) — Schema for creating a release plan for a feature flag environment by copying and applying the configuration from a release plan template.
      - `templateId` (string, required) — The release plan template's ID. Release template IDs are ulids.
  - object
    - `feature` (string, required) — The name of the feature that this change applies to.
    - `action` (enum, required) — The name of this action.
      - Allowed values: `startMilestone`
    - `payload` (object, required) — The ID of the release plan and which of its milestones to start.
      - `milestoneId` (string, required) — The ID of the milestone to start. This ID is an ulid
      - `planId` (string, required) — The ID of the release plan. This ID is an ulid
  - object
    - `feature` (string, required) — The name of the feature that this change applies to.
    - `action` (enum, required) — The name of this action.
      - Allowed values: `deleteReleasePlan`
    - `payload` (object, required) — The Id of the release plan to remove.
      - `planId` (string, required) — The Id of the release plan. This id is an ulid
  - object
    - `feature` (string, required) — The name of the feature that this change applies to.
    - `action` (enum, required) — The name of this action.
      - Allowed values: `changeMilestoneProgression`
    - `payload` (object, required)
      - `sourceMilestone` (string, required) — The ID of the source milestone
      - `targetMilestone` (string, required) — The ID of the target milestone
      - `transitionCondition` (object, required) — The condition configuration for the transition
        - `intervalMinutes` (integer, required) — The interval in minutes before transitioning
  - object
    - `feature` (string, required) — The name of the feature that this change applies to.
    - `action` (enum, required) — The name of this action.
      - Allowed values: `deleteMilestoneProgression`
    - `payload` (object, required)
      - `sourceMilestone` (string, required) — The ID of the source milestone with progression to delete.
  - object
    - `feature` (string, required) — The name of the feature that this change applies to.
    - `action` (enum, required) — The name of this action.
      - Allowed values: `resumeMilestoneProgression`
    - `payload` (object, required)
      - `planId` (string, required) — The release plan's unique identifier (ULID format)
  - object
    - `feature` (string, required) — The name of the feature that this change applies to.
    - `action` (enum, required) — The name of this action.
      - Allowed values: `changeReleasePlanSafeguard`
    - `payload` (object, required)
      - `planId` (string, required) — The ID of the release plan. This ID is an ulid
      - `safeguard` (object, required) — Request body to create a safeguard with metric-based alert condition.
        - `impactMetric` (object, required) — Metric configuration that should be evaluated for the safeguard.
          - `metricName` (string, required) — The Prometheus metric series to query. It includes both unleash prefix and metric type and display name
          - `timeRange` (enum, required) — The time range for the metric data.
            - Allowed values: `hour`, `day`, `week`, `month`
          - `aggregationMode` (enum, required) — The aggregation mode for the metric data.
            - Allowed values: `rps`, `count`, `avg`, `sum`, `p95`, `p99`, `p50`
          - `labelSelectors` (map from string to list of string, required) — The selected labels and their values for filtering the metric data.
          - `source` (enum, optional) — The Prometheus data source for this metric. Internal is the Unleash-managed Prometheus, external is a customer-provided Prometheus instance. Defaults to internal if not specified.
            - Allowed values: `internal`, `external`
        - `triggerCondition` (object, required) — The condition that triggers the safeguard.
          - `operator` (enum, required) — The comparison operator for the threshold check.
            - Allowed values: `>`, `<`
          - `threshold` (double, required) — The threshold value to compare against.
  - object
    - `feature` (string, required) — The name of the feature that this change applies to.
    - `action` (enum, required) — The name of this action.
      - Allowed values: `deleteReleasePlanSafeguard`
    - `payload` (object, required)
      - `planId` (string, required) — The ID of the release plan. This ID is an ulid
      - `safeguardId` (string, required) — The ID of the safeguard to delete.
  - object
    - `feature` (string, required) — The name of the feature that this change applies to.
    - `action` (enum, required) — The name of this action.
      - Allowed values: `changeFeatureEnvSafeguard`
    - `payload` (object, required)
      - `safeguard` (object, required) — Request body to create a safeguard with metric-based alert condition.
        - `impactMetric` (object, required) — Metric configuration that should be evaluated for the safeguard.
          - `metricName` (string, required) — The Prometheus metric series to query. It includes both unleash prefix and metric type and display name
          - `timeRange` (enum, required) — The time range for the metric data.
            - Allowed values: `hour`, `day`, `week`, `month`
          - `aggregationMode` (enum, required) — The aggregation mode for the metric data.
            - Allowed values: `rps`, `count`, `avg`, `sum`, `p95`, `p99`, `p50`
          - `labelSelectors` (map from string to list of string, required) — The selected labels and their values for filtering the metric data.
          - `source` (enum, optional) — The Prometheus data source for this metric. Internal is the Unleash-managed Prometheus, external is a customer-provided Prometheus instance. Defaults to internal if not specified.
            - Allowed values: `internal`, `external`
        - `triggerCondition` (object, required) — The condition that triggers the safeguard.
          - `operator` (enum, required) — The comparison operator for the threshold check.
            - Allowed values: `>`, `<`
          - `threshold` (double, required) — The threshold value to compare against.
  - object
    - `feature` (string, required) — The name of the feature that this change applies to.
    - `action` (enum, required) — The name of this action.
      - Allowed values: `deleteFeatureEnvSafeguard`
    - `payload` (object, required)
      - `safeguardId` (string, required) — The ID of the safeguard to delete.

## Response

### 200

changeRequestSchema

- `object or object`
  - object
    - `id` (double, required) — This change requests's ID.
    - `environment` (string, required) — The environment in which the changes should be applied.
    - `minApprovals` (double, required) — The minimum number of approvals required before this change request can be applied.
    - `project` (string, required) — The project this change request belongs to.
    - `features` (list of object, required) — The list of features and their changes that relate to this change request.
      - `name` (string, required) — The name of the feature
      - `changes` (list of object, required) — List of changes inside change request. This list may be empty when listing all change requests for a project.
        - `id` (double, required) — The ID of this change.
        - `action` (string, required) — The kind of action that the change contains information about.
        - `conflict` (string, optional) — A description of the conflict caused by this change. Only present if there are any conflicts.
        - `payload` (string or boolean or map from string to any or double or list of object, optional) — The data required to perform this action.
        - `createdBy` (object, optional) — The user who created this change.
          - `username` (string, optional, nullable) — The user's username.
          - `imageUrl` (string, optional, nullable) — The URL where the user's image can be found.
        - `createdAt` (string, optional) — When this change was suggested
        - `scheduleConflicts` (object, optional) — Information about scheduled change requests that would casue conflicts with this change if applied.
          - `changeRequests` (list of object, required) — The list of scheduled change requests that would cause conflict with this change.
            - `id` (double, required) — The ID of the change request.
            - `title` (string, optional) — The title of the change request, if any. Only present if there is a title.
      - `conflict` (string, optional) — A string describing the conflicts related to this change. Only present if there are any conflicts on the feature level.
      - `defaultChange` (object, optional) — A description of a default change that will be applied with the change request to prevent invalid states. Default changes are changes that are applied in addition to explicit user-specified changes when a change request is applied. Any default changes are applied in the background and are not a real part of the change request.
        - `action` (string, required) — The kind of action this is.
        - `payload` (object, required) — The necessary data to perform this change.
    - `segments` (list of object, required) — The list of segments and their changes that relate to this change request.
      - `id` (double, required) — The ID of this change.
      - `action` (string, required) — The kind of action that the change contains information about.
      - `payload` (string or boolean or map from string to any or double or list of object, required) — The data required to perform this action.
      - `name` (string, required) — The current name of the segment
      - `conflict` (string, optional) — A description of the conflict caused by this change. Only present if there are any conflicts.
      - `createdBy` (object, optional) — The user who created this change.
        - `username` (string, optional, nullable) — The user's username.
        - `imageUrl` (string, optional, nullable) — The URL where the user's image can be found.
      - `createdAt` (string, optional) — When this change was suggested
      - `scheduleConflicts` (object, optional) — Information about scheduled change requests that would casue conflicts with this change if applied.
        - `changeRequests` (list of object, required) — The list of scheduled change requests that would cause conflict with this change.
          - `id` (double, required) — The ID of the change request.
          - `title` (string, optional) — The title of the change request, if any. Only present if there is a title.
    - `createdBy` (object, required) — The user who created this change request.
      - `username` (string, optional, nullable)
      - `imageUrl` (string, optional, nullable) — The URL of the user's profile image.
    - `createdAt` (string, required) — When this change request was created.
    - `stateTimestamps` (map from string to string, required) — A mapping of each state this change request has entered to the most recent time when it entered that state. If a change request has entered the same state multiple times, only the most recent timestamp will be included.
    - `state` (enum, required) — The current state of the change request.
      - Allowed values: `Draft`, `In review`, `Approved`, `Applied`, `Cancelled`, `Rejected`
    - `title` (string, optional) — A title describing the change request's content.
    - `approvals` (list of object, optional) — A list of approvals that this change request has received.
      - `createdBy` (object, required) — Information about the user who gave this approval.
        - `id` (double, optional) — The ID of the user who gave this approval.
        - `username` (string, optional) — The approving user's username.
        - `imageUrl` (string, optional) — The URL where the user's image can be found.
      - `createdAt` (string, required) — When the approval was given.
    - `rejections` (list of object, optional) — A list of rejections that this change request has received.
      - `createdBy` (object, required) — Information about the user who gave this approval.
        - `id` (double, optional) — The ID of the user who gave this approval.
        - `username` (string, optional) — The approving user's username.
        - `imageUrl` (string, optional) — The URL where the user's image can be found.
      - `createdAt` (string, required) — When the approval was given.
    - `comments` (list of object, optional) — All comments that have been made on this change request.
      - `text` (string, required) — The content of the comment.
      - `createdBy` (object, required) — Information about the user who posted the comment
        - `username` (string, optional, nullable) — The user's username.
        - `imageUrl` (string, optional, nullable) — The URL where the user's image can be found.
      - `createdAt` (string, required) — When the comment was made.
      - `id` (double, optional) — The comment's ID. Unique per change request.
  - object
    - `id` (double, required) — This change requests's ID.
    - `environment` (string, required) — The environment in which the changes should be applied.
    - `minApprovals` (double, required) — The minimum number of approvals required before this change request can be applied.
    - `project` (string, required) — The project this change request belongs to.
    - `features` (list of object, required) — The list of features and their changes that relate to this change request.
      - `name` (string, required) — The name of the feature
      - `changes` (list of object, required) — List of changes inside change request. This list may be empty when listing all change requests for a project.
        - `id` (double, required) — The ID of this change.
        - `action` (string, required) — The kind of action that the change contains information about.
        - `conflict` (string, optional) — A description of the conflict caused by this change. Only present if there are any conflicts.
        - `payload` (string or boolean or map from string to any or double or list of object, optional) — The data required to perform this action.
        - `createdBy` (object, optional) — The user who created this change.
          - `username` (string, optional, nullable) — The user's username.
          - `imageUrl` (string, optional, nullable) — The URL where the user's image can be found.
        - `createdAt` (string, optional) — When this change was suggested
        - `scheduleConflicts` (object, optional) — Information about scheduled change requests that would casue conflicts with this change if applied.
          - `changeRequests` (list of object, required) — The list of scheduled change requests that would cause conflict with this change.
            - `id` (double, required) — The ID of the change request.
            - `title` (string, optional) — The title of the change request, if any. Only present if there is a title.
      - `conflict` (string, optional) — A string describing the conflicts related to this change. Only present if there are any conflicts on the feature level.
      - `defaultChange` (object, optional) — A description of a default change that will be applied with the change request to prevent invalid states. Default changes are changes that are applied in addition to explicit user-specified changes when a change request is applied. Any default changes are applied in the background and are not a real part of the change request.
        - `action` (string, required) — The kind of action this is.
        - `payload` (object, required) — The necessary data to perform this change.
    - `segments` (list of object, required) — The list of segments and their changes that relate to this change request.
      - `id` (double, required) — The ID of this change.
      - `action` (string, required) — The kind of action that the change contains information about.
      - `payload` (string or boolean or map from string to any or double or list of object, required) — The data required to perform this action.
      - `name` (string, required) — The current name of the segment
      - `conflict` (string, optional) — A description of the conflict caused by this change. Only present if there are any conflicts.
      - `createdBy` (object, optional) — The user who created this change.
        - `username` (string, optional, nullable) — The user's username.
        - `imageUrl` (string, optional, nullable) — The URL where the user's image can be found.
      - `createdAt` (string, optional) — When this change was suggested
      - `scheduleConflicts` (object, optional) — Information about scheduled change requests that would casue conflicts with this change if applied.
        - `changeRequests` (list of object, required) — The list of scheduled change requests that would cause conflict with this change.
          - `id` (double, required) — The ID of the change request.
          - `title` (string, optional) — The title of the change request, if any. Only present if there is a title.
    - `createdBy` (object, required) — The user who created this change request.
      - `username` (string, optional, nullable)
      - `imageUrl` (string, optional, nullable) — The URL of the user's profile image.
    - `createdAt` (string, required) — When this change request was created.
    - `stateTimestamps` (map from string to string, required) — A mapping of each state this change request has entered to the most recent time when it entered that state. If a change request has entered the same state multiple times, only the most recent timestamp will be included.
    - `state` (enum, required) — The current state of the change request.
      - Allowed values: `Scheduled`
    - `schedule` (object or object or object, required) — A schedule for a change request's application. The schedule can either be pending, failed, or suspended. The schedule will always contain the state of the schedule and the last scheduled time, but other data varies between the different states.
      - object
        - `scheduledAt` (string, required) — When this change request will be applied.
        - `status` (enum, required) — The status of the schedule.
          - Allowed values: `pending`
      - object
        - `scheduledAt` (string, required) — When Unleash last attempted to apply this change request.
        - `status` (enum, required) — The status of the schedule.
          - Allowed values: `failed`
        - `reason` (string, required) — The reason the scheduled failed to apply.
        - `failureReason` (string, optional, nullable, deprecated) — The reason the scheduled failed to apply. Deprecated in favor of the `reason` property.
      - object
        - `scheduledAt` (string, required) — When Unleash would have attempted to apply this change request if the schedule was not suspended.
        - `status` (enum, required) — The status of the schedule.
          - Allowed values: `suspended`
        - `reason` (string, required) — Why the schedule was suspended.
    - `title` (string, optional) — A title describing the change request's content.
    - `approvals` (list of object, optional) — A list of approvals that this change request has received.
      - `createdBy` (object, required) — Information about the user who gave this approval.
        - `id` (double, optional) — The ID of the user who gave this approval.
        - `username` (string, optional) — The approving user's username.
        - `imageUrl` (string, optional) — The URL where the user's image can be found.
      - `createdAt` (string, required) — When the approval was given.
    - `rejections` (list of object, optional) — A list of rejections that this change request has received.
      - `createdBy` (object, required) — Information about the user who gave this approval.
        - `id` (double, optional) — The ID of the user who gave this approval.
        - `username` (string, optional) — The approving user's username.
        - `imageUrl` (string, optional) — The URL where the user's image can be found.
      - `createdAt` (string, required) — When the approval was given.
    - `comments` (list of object, optional) — All comments that have been made on this change request.
      - `text` (string, required) — The content of the comment.
      - `createdBy` (object, required) — Information about the user who posted the comment
        - `username` (string, optional, nullable) — The user's username.
        - `imageUrl` (string, optional, nullable) — The URL where the user's image can be found.
      - `createdAt` (string, required) — When the comment was made.
      - `id` (double, optional) — The comment's ID. Unique per change request.

## Examples

**Request**

```json
{
  "action": "updateSegment",
  "payload": {
    "constraints": [
      {
        "contextName": "appName",
        "operator": "IN"
      }
    ],
    "name": "beta-users"
  }
}
```

**Response**

```json
{
  "approvals": [
    {
      "createdAt": "2022-12-12T12:13:24.218Z",
      "createdBy": {
        "id": 33,
        "imageUrl": "string",
        "username": "unleash-user"
      }
    }
  ],
  "comments": [
    {
      "createdAt": "2022-12-12T12:13:24.218Z",
      "createdBy": {
        "imageUrl": "string",
        "username": "unleash-user"
      },
      "id": 33,
      "text": "This is a comment"
    }
  ],
  "createdAt": "2023-07-31T13:33:02Z",
  "createdBy": {
    "imageUrl": "string",
    "username": "Hunter"
  },
  "environment": "development",
  "features": [
    {
      "changes": [
        {
          "action": "updateStrategy",
          "conflict": "Strategy has been deleted",
          "createdAt": "2023-07-31T13:22:03+02:00",
          "createdBy": {
            "imageUrl": "string",
            "username": "string"
          },
          "id": 33,
          "payload": {},
          "scheduleConflicts": {
            "changeRequests": [
              {
                "id": 1.1,
                "title": "string"
              }
            ]
          }
        }
      ],
      "conflict": "Feature has been archived",
      "defaultChange": {
        "action": "addStrategy",
        "payload": {
          "constraints": [
            {
              "caseInsensitive": false,
              "contextName": "userId",
              "inverted": false,
              "operator": "STR_CONTAINS",
              "values": [
                "ux"
              ]
            }
          ],
          "disabled": false,
          "name": "flexibleRollout",
          "parameters": {
            "groupId": "my-feature",
            "rollout": "100",
            "stickiness": "default"
          },
          "segments": [],
          "title": ""
        }
      },
      "name": "my-feature"
    }
  ],
  "id": 3,
  "minApprovals": 2,
  "project": "unleash-project",
  "rejections": [
    {
      "createdAt": "2022-12-12T12:13:24.218Z",
      "createdBy": {
        "id": 33,
        "imageUrl": "string",
        "username": "unleash-user"
      }
    }
  ],
  "segments": [
    {
      "action": "updateStrategy",
      "conflict": "Strategy has been deleted",
      "createdAt": "2023-07-31T13:22:03+02:00",
      "createdBy": {
        "imageUrl": "string",
        "username": "string"
      },
      "id": 33,
      "name": "beta-users",
      "payload": {},
      "scheduleConflicts": {
        "changeRequests": [
          {
            "id": 1.1,
            "title": "string"
          }
        ]
      }
    }
  ],
  "state": "Draft",
  "stateTimestamps": {
    "Approved": "2023-08-02T09:01:00Z",
    "Draft": "2023-07-31T13:33:02Z",
    "In review": "2023-08-01T10:15:30Z"
  },
  "title": "Increasing gradual rollout"
}
```

**SDK Code**

```python
import requests

url = "https://app.unleash-instance.example.com/api/admin/projects/projectId/change-requests/changeRequestId/changes/changeId"

payload = {
    "action": "updateSegment",
    "payload": {
        "constraints": [
            {
                "contextName": "appName",
                "operator": "IN"
            }
        ],
        "name": "beta-users"
    }
}
headers = {
    "Authorization": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.put(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://app.unleash-instance.example.com/api/admin/projects/projectId/change-requests/changeRequestId/changes/changeId';
const options = {
  method: 'PUT',
  headers: {Authorization: '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"action":"updateSegment","payload":{"constraints":[{"contextName":"appName","operator":"IN"}],"name":"beta-users"}}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://app.unleash-instance.example.com/api/admin/projects/projectId/change-requests/changeRequestId/changes/changeId"

	payload := strings.NewReader("{\n  \"action\": \"updateSegment\",\n  \"payload\": {\n    \"constraints\": [\n      {\n        \"contextName\": \"appName\",\n        \"operator\": \"IN\"\n      }\n    ],\n    \"name\": \"beta-users\"\n  }\n}")

	req, _ := http.NewRequest("PUT", url, payload)

	req.Header.Add("Authorization", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://app.unleash-instance.example.com/api/admin/projects/projectId/change-requests/changeRequestId/changes/changeId")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)
request["Authorization"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"action\": \"updateSegment\",\n  \"payload\": {\n    \"constraints\": [\n      {\n        \"contextName\": \"appName\",\n        \"operator\": \"IN\"\n      }\n    ],\n    \"name\": \"beta-users\"\n  }\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.put("https://app.unleash-instance.example.com/api/admin/projects/projectId/change-requests/changeRequestId/changes/changeId")
  .header("Authorization", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"action\": \"updateSegment\",\n  \"payload\": {\n    \"constraints\": [\n      {\n        \"contextName\": \"appName\",\n        \"operator\": \"IN\"\n      }\n    ],\n    \"name\": \"beta-users\"\n  }\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PUT', 'https://app.unleash-instance.example.com/api/admin/projects/projectId/change-requests/changeRequestId/changes/changeId', [
  'body' => '{
  "action": "updateSegment",
  "payload": {
    "constraints": [
      {
        "contextName": "appName",
        "operator": "IN"
      }
    ],
    "name": "beta-users"
  }
}',
  'headers' => [
    'Authorization' => '<apiKey>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://app.unleash-instance.example.com/api/admin/projects/projectId/change-requests/changeRequestId/changes/changeId");
var request = new RestRequest(Method.PUT);
request.AddHeader("Authorization", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"action\": \"updateSegment\",\n  \"payload\": {\n    \"constraints\": [\n      {\n        \"contextName\": \"appName\",\n        \"operator\": \"IN\"\n      }\n    ],\n    \"name\": \"beta-users\"\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "action": "updateSegment",
  "payload": [
    "constraints": [
      [
        "contextName": "appName",
        "operator": "IN"
      ]
    ],
    "name": "beta-users"
  ]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://app.unleash-instance.example.com/api/admin/projects/projectId/change-requests/changeRequestId/changes/changeId")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```