---
title: "Update a feature"
method: PUT
path: "/features/{code}"
tags: ["features"]
---

# Update a feature

`PUT /features/{code}`

This endpoint updates an existing feature representing an entitlement component of your application.

## Request body

- FeatureUpdateInput
  - `feature` FeatureBaseInput, required
    - `name` string, nullable — Name of the feature.
    - `description` string, nullable — Internal description of the feature.
    - `privileges` object[] — Privileges associated with this feature. Can be empty.
      - `code` string, required — Unique code for the privilege.
      - `name` string, nullable — Display name for the privilege.
      - `value_type` 'integer' | 'boolean' | 'string' | 'select' — Data type of the privilege value. Default: string
      - `config` object
        - `select_options` string[] — Array of string, required only when value_type is `select`.

## Response `200`

Feature updated

- Feature
  - `feature` FeatureObject, required
    - `code` string, required — Unique code used to identify the feature. Max 255 characters.
    - `name` string, nullable, required — Name of the feature. Max 255 characters.
    - `description` string, nullable, required — Description of the feature. Max 600 characters.
    - `privileges` FeaturePrivilegeObject[], required — Privileges associated with this feature. Can be empty.
      - `code` string, required — Unique code for the privilege.
      - `name` string, nullable, required — Display name for the privilege.
      - `value_type` 'integer' | 'boolean' | 'string' | 'select', required — Data type of the privilege value. Default: string
      - `config` object, required
        - `select_options` string[] — Array of string, required only when value_type is `select`.
    - `created_at` string, date-time, required — Creation date of the feature.

## Other responses

- `400` — Bad Request error
- `401` — Unauthorized error
- `403` — Forbidden
- `404` — Not Found error
- `422` — Unprocessable entity error

---

[API](https://skmtc.dev/getlago/apis/lago-api-documentation.md) · [All operations](https://skmtc.dev/getlago/apis/lago-api-documentation/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/getlago/lago-api-documentation/revisions/6e969ef3bb45/schema)
