---
title: "Update a Feature"
method: PATCH
path: "/features/{feature_id}"
tags: ["Features"]
---

# Update a Feature

`PATCH /features/{feature_id}`

Update a feature by ID.

## Path parameters

- `feature_id` integer, required

## Request body

- FeatureUpdate
  - `archived` boolean — Whether the Feature has been archived
  - `description` string — A short description of this Feature
  - `environments` object — The configuration for this Feature's Rollout within each Environment, keyed by Environment key.
  - `key` string — Unique string identifier for this Feature within the Project
  - `name` string — Name of the Feature
  - `variables` FeatureVariableUpdate[] — Variables define the dynamic configuration of a feature, and each variable can take on a different value on a per-variation basis within a feature test.
    - `archived` boolean — Whether or not this Feature Variable is archived
    - `default_value` string — The stringified default value for this Feature Variable. The default value is the value Optimizely SDKs will return when this Feature Variable is accessed by getFeatureVariableValue unless the Feature Variable's value is a part of a feature test variation.
    - `description` string — A short description of this Feature Variable
    - `id` integer — The ID of this Feature Variable
    - `key` string — Unique string identifier for this Feature Variable within the Feature
    - `type` 'boolean' | 'string' | 'double' | 'integer' | 'json' — The datatype for this Feature Variable

## Response `200`

Successfully updated the Feature

- Feature
  - `archived` boolean — Whether the Feature has been archived
  - `created` string, date-time — Time when the Feature was created
  - `description` string — A short description of this Feature
  - `environments` object — The configuration for this Feature's Rollout within each Environment, keyed by Environment key
  - `id` integer — The ID of this Feature
  - `key` string, required — Unique string identifier for this Feature within the Project
  - `last_modified` string, date-time — Date last modified
  - `name` string — Name of the Feature
  - `project_id` integer, required — The ID of the Project this Feature belongs to
  - `variables` FeatureVariable[] — Variables define the dynamic configuration of a feature, and each variable can take on a different value on a per-variation basis within a feature test.
    - `archived` boolean — Whether or not this Feature Variable is archived
    - `default_value` string, required — The stringified default value for this Feature Variable. The default value is the value Optimizely SDKs will return when this Feature Variable is accessed by getFeatureVariableValue unless the Feature Variable's value is a part of a feature test variation.
    - `id` integer — The ID of this Feature Variable
    - `key` string, required — Unique string identifier for this Feature Variable within the Feature
    - `type` 'boolean' | 'string' | 'double' | 'integer' | 'json', required — The datatype for this Feature Variable

## Other responses

- `400` — Invalid request body content
- `401` — Invalid credentials
- `403` — You do not have permission to update specified Feature
- `404` — Feature not found
- `default` — Unexpected error

---

[API](https://skmtc.dev/optimizely/apis/optimizely-api.md) · [All operations](https://skmtc.dev/optimizely/apis/optimizely-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/optimizely/optimizely-api/revisions/5151fe6a2297/schema)
