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

# Update a feature

`PUT /features/{feature_code}`

## Request

- Base URL: `https://api-m.sandbox.paypal.com`
- URL: `https://api-m.sandbox.paypal.com/features/{feature_code}`
- Auth: OAuth 2
  - Client credentials
  - Token URL: `/api/oauth-proxy` scopes: `read`, `write`
- TypeScript: <https://skmtc.dev/paypal/apis/usage-based-billing-api/docs/features/:feature_code/put.ts> (a function with typed inputs; its response is checked against the schema)

Updates an existing feature's properties including name, description, and privileges. The feature code itself cannot be changed. When updating privileges, the entire privileges array is replaced - to add or remove individual privileges, you must provide the complete desired list. Changes to features automatically propagate to all plans and subscriptions using them, though assigned values remain unchanged.

## Path parameters

- `feature_code` string, required

## Request body

- FeatureUpdateRequest: Request payload for updating an existing feature. All fields are optional - only provided fields will be updated. Note that the feature code cannot be changed.
  - `name` string: Name of the feature
  - `description` string: Description of the feature
  - `privileges` FeaturePrivilegeBase[]: Updated list of privileges for the feature. This replaces the entire privileges array - to add or remove individual privileges, include the complete desired list.
    - `code` string, required: Unique identifier for the privilege within its parent feature. Used as a key when assigning values to this privilege in entitlements. Allows alphanumeric characters, underscores, and hyphens.
    - `name` string: Human-friendly display name for the privilege shown in user interfaces. This helps users understand what aspect of the feature is being configured.
    - `value_type` 'STRING' | 'BOOLEAN' | 'INTEGER' | 'SELECT': Defines the data type that this privilege accepts when being assigned values in entitlements. 'INTEGER' for numeric limits, 'BOOLEAN' for on/off toggles, 'STRING' for text values, 'SELECT' for predefined options.
    - `config` PrivilegeConfig: Additional configuration for privileges that require constraints or options. Currently used for 'select' type privileges to define allowed values.
      - `select_options` string[]: Defines the allowed values when value_type is 'select'. When creating entitlements, only these predefined options can be assigned. Useful for features like SSO providers, regions, or service tiers.

## Response `200`

Feature was successfully updated with the new configuration

- FeatureResponse: Core properties that define a feature - a capability or functionality that can be entitled to customers through plans or subscriptions
  - `code` string, required: Unique identifier for the feature across your entire system. This code is used when creating entitlements and should represent the feature's function (e.g., 'seats', 'api-access', 'API_STORAGE'). Allows alphanumeric characters, underscores, and hyphens.
  - `name` string: Customer-facing name of the feature that clearly describes what functionality or capability it provides. This name appears in billing interfaces and customer portals.
  - `description` string: Detailed explanation of what this feature provides, its limitations, and how it affects the customer's experience.
  - `privileges` FeaturePrivilegeBase[]: Privileges associated with this feature. Can be empty
    - `code` string, required: Unique identifier for the privilege within its parent feature. Used as a key when assigning values to this privilege in entitlements. Allows alphanumeric characters, underscores, and hyphens.
    - `name` string: Human-friendly display name for the privilege shown in user interfaces. This helps users understand what aspect of the feature is being configured.
    - `value_type` 'STRING' | 'BOOLEAN' | 'INTEGER' | 'SELECT': Defines the data type that this privilege accepts when being assigned values in entitlements. 'INTEGER' for numeric limits, 'BOOLEAN' for on/off toggles, 'STRING' for text values, 'SELECT' for predefined options.
    - `config` PrivilegeConfig: Additional configuration for privileges that require constraints or options. Currently used for 'select' type privileges to define allowed values.
      - `select_options` string[]: Defines the allowed values when value_type is 'select'. When creating entitlements, only these predefined options can be assigned. Useful for features like SSO providers, regions, or service tiers.
  - `created_at` string, date-time, required: Date and time in ISO 8601 format.

## Other responses

- `400`: Bad Request - Invalid input data
- `403`: Authorization failed due to insufficient permissions.
- `404`: Resource Not Found.
- `422`: Bad Request - Invalid input data
- `500`: Internal Server Error - An unexpected error occurred

---

[API](https://skmtc.dev/paypal/apis/usage-based-billing-api.md) - [All operations](https://skmtc.dev/paypal/apis/usage-based-billing-api/llms.txt) - [OpenAPI document](https://skmtc.dev/paypal/apis/usage-based-billing-api/revisions/22fb46514ac4?raw)
