v1

latestOpenAPI 3.1.0AGPLv32026-07-26168262527.5 KB
entitlements

Partial update of an entitlement

This accepts a list of entitlements to update. If the feature isn't part of the plan yet, it's added with all the privileges from the payload. If the feature is already part of the plan, 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.

patch/plans/{code}/entitlements

Request body

entitlementsobject 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 request

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

Response

Entitlement updated

Example response

{
  "entitlements": [
    {
      "code": "seats",
      "name": "Number of seats",
      "description": "Number of users of the account",
      "privileges": [
        {
          "code": "max",
          "name": "Maximum",
          "value_type": "integer",
          "config": {},
          "value": 10
        },
        {
          "code": "max_admins",
          "name": "Max Admins",
          "value_type": "integer",
          "config": {},
          "value": 5
        },
        {
          "code": "root",
          "name": "Allow root user",
          "value_type": "boolean",
          "config": {},
          "value": true
        },
        {
          "code": "provider",
          "name": "SSO Provider",
          "value_type": "select",
          "value": "google",
          "config": {
            "select_options": [
              "google",
              "okta"
            ]
          }
        }
      ]
    }
  ]
}