---
title: "Update subscription entitlements"
method: PATCH
path: "/subscriptions/{external_id}/entitlements"
tags: ["entitlements"]
---

# Update subscription entitlements

`PATCH /subscriptions/{external_id}/entitlements`

This accepts a list of entitlements to update. If the feature isn't part of the subscription yet, it's added with all the privileges from the payload. If the feature is already part of the subscription (via plan or via override), the privilege and values are updated or added. All privileges must be valid for the feature. All features  and privileges not part of the payload are left untouched. To remove privileges or features, use the DELETE endpoints.

## Query parameters

- `subscription_status` 'pending' | 'active' | 'terminated' | 'canceled'

## Request body

- EntitlementUpdateInput
  - `entitlements` object, required — Feature entitlements with their privilege values. Each key is a feature code, and the value is an object containing privilege codes with their associated values.

## Response `200`

Subscription entitlements updated

- SubscriptionEntitlements
  - `entitlements` SubscriptionEntitlementObject[], 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` SubscriptionEntitlementPrivilegeObject[], required — Privileges associated with this feature. Each privilege shows the plan value and any subscription override.
      - `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`.
      - `value` union, required — Applicable value this this subscription (override_value if set, plan_value otherwise). Type depends on the privilege's value_type.
        - integer — Value for integer type privileges
        - boolean — Value for boolean type privileges
        - string — Value for string or select type privileges
      - `plan_value` union, required — Value assigned to this privilege in the plan. Type depends on the privilege's value_type.
        - integer — Value for integer type privileges
        - boolean — Value for boolean type privileges
        - string — Value for string or select type privileges
      - `override_value` union, required — Value assigned to this subscription specifically. Type depends on the privilege's value_type. Null if no override is set.
        - integer — Value for integer type privileges
        - boolean — Value for boolean type privileges
        - string — Value for string or select type privileges
    - `overrides` object, required

## Other responses

- `400` — Bad Request error
- `401` — Unauthorized error
- `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)
