Skip to main content
PATCH
/
subscriptions
/
{external_id}
/
entitlements
Update subscription entitlements
curl --request PATCH \
  --url https://api.getlago.com/api/v1/subscriptions/{external_id}/entitlements \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "entitlements": {
    "seats": {
      "max": 20,
      "max_admins": 10,
      "root": false
    },
    "sso": {
      "provider": "okta"
    }
  }
}
'
{
  "entitlements": [
    {
      "code": "seats",
      "name": "Number of seats",
      "description": "Number of users of the account",
      "privileges": [
        {
          "code": "max",
          "name": "Maximum",
          "value_type": "integer",
          "config": {},
          "value": 15,
          "plan_value": 10,
          "override_value": 15
        },
        {
          "code": "max_admins",
          "name": "Max Admins",
          "value_type": "integer",
          "config": {},
          "value": 5,
          "plan_value": 5,
          "override_value": null
        },
        {
          "code": "root",
          "name": "Allow root user",
          "value_type": "boolean",
          "config": {},
          "value": true,
          "plan_value": true,
          "override_value": null
        },
        {
          "code": "provider",
          "name": "SSO Provider",
          "value_type": "select",
          "value": "okta",
          "plan_value": "google",
          "override_value": "okta",
          "config": {
            "select_options": [
              "google",
              "okta"
            ]
          }
        }
      ],
      "overrides": {
        "max": 15,
        "provider": "okta"
      }
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

external_id
string
required

External ID of the existing subscription

Example:

"5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"

Query Parameters

subscription_status
enum<string>
default:active

Filter by subscription status. When provided, the subscription is looked up with this status instead of the default active status. Possible values are pending, active, terminated, or canceled.

Available options:
pending,
active,
terminated,
canceled
Example:

"active"

Body

application/json

Subscription entitlements payload

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.

Example:
{
"seats": {
"max": 20,
"max_admins": 10,
"root": false
},
"sso": { "provider": "okta" }
}

Response

Subscription entitlements updated

entitlements
object[]
required