Entitlements Overview

The Entitlements Engine is powered by the isEntitledTo query and is designed to manage and control user access within your application. It enables you to grant users specific roles, permissions, feature access, and more, providing a flexible framework for access management.

Below is an overview of API endpoints relevant to managing features, plans, feature flags, and API access control within your application. All endpoints are classified as Management Endpoints, requiring environment-level authorization and offering comprehensive control over entitlement resources.

Languages
Servers
EU Region
https://api.frontegg.com/entitlements/
US Region
https://api.us.frontegg.com/entitlements/
CA Region
https://api.ca.frontegg.com/entitlements/
AU Region
https://api.au.frontegg.com/entitlements/
Frontegg sub-domain for use with user tokens
https://{domain}.frontegg.com/entitlements/

Features

Operations

Plans

Operations

Update Plan

Request

Update an existing plan

Path
idstringrequired
Bodyapplication/jsonrequired
namestring

String that represents the plan name

Example: "Test Plan"
defaultTreatmentstring

Enum that represents the default treatment

Enum"true""false"
Example: "true"
rulesArray of objects(RuleDto)

Array of rules that represents the set of conditions targeting the plan

descriptionstring

Feature plan description

Example: "This is a test plan"
metadatastring

JSON String

Example: "{ \"some-key\": \"some-value\" }"
defaultTimeLimitationnumber

Number that represents the default time limitation in days for auto-assigned plans

Example: "30"
assignOnSignupboolean

Boolean indicating whether a plan is assigned automatically upon signup

Example: "true"
featureKeysArray of strings

Array of feature-keys to be applied on the plan

Example: "[\"my-cool-feature\"]"
curl -i -X PATCH \
  'https://api.frontegg.com/entitlements/resources/plans/v1/{id}' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "Test Plan",
    "defaultTreatment": "true",
    "rules": [
      {
        "description": "This is the first rule",
        "conditionLogic": "and",
        "conditions": [
          {
            "attribute": "myCustomAttribute",
            "attributeType": "custom",
            "negate": false,
            "op": "in_list",
            "value": {
              "list": [
                "valueA",
                "valueB"
              ]
            }
          }
        ],
        "treatment": "true"
      }
    ],
    "description": "This is a test plan",
    "metadata": "{ \"some-key\": \"some-value\" }",
    "defaultTimeLimitation": "30",
    "assignOnSignup": "true",
    "featureKeys": "[\"my-cool-feature\"]"
  }'

Responses

Bodyapplication/json
idstringrequired

UUID string that represents the plan ID

Example: "e6a5012c-cbeb-4c1e-ab80-e5f43efd44e3"
vendorIdstringrequired

UUID string that represents the vendor ID

Example: "e6a5012c-cbeb-4c1e-ab80-e5f43efd44e3"
namestringrequired

String that represents the plan name

Example: "Test Plan"
defaultTreatmentstring

Enum that represents the default treatment

Enum"true""false"
Example: "true"
rulesArray of objects(RuleDto)

Array of rules that represents the set of conditions targeting the plan

descriptionstring

Feature plan description

Example: "This is a test plan"
metadataobject

JSON String

Example: "{ \"some-key\": \"some-value\" }"
defaultTimeLimitationnumber

Number that represents the default time limitation in days for auto-assigned plans

Example: "30"
assignOnSignupbooleanrequired

Boolean indicating whether a plan is assigned automatically upon signup

Example: "true"
createdAtstringrequired

Date when plan was created

Example: "2022-01-01T00:00:00"
updatedAtstring

Date when plan was last updated

Example: "2022-01-01T00:00:00"
featuresobject

List of features linked to a plan

entitlementsobject

List of features linked to a plan

Response
application/json
{ "id": "e6a5012c-cbeb-4c1e-ab80-e5f43efd44e3", "vendorId": "e6a5012c-cbeb-4c1e-ab80-e5f43efd44e3", "name": "Test Plan", "defaultTreatment": "true", "rules": [ {} ], "description": "This is a test plan", "metadata": "{ \"some-key\": \"some-value\" }", "defaultTimeLimitation": "30", "assignOnSignup": "true", "createdAt": "2022-01-01T00:00:00", "updatedAt": "2022-01-01T00:00:00", "features": { "id": "e6a5012c-cbeb-4c1e-ab80-e5f43efd44e3", "name": "Test Feature", "key": "test-feature", "permissions": [] }, "entitlements": { "id": "e6a5012c-cbeb-4c1e-ab80-e5f43efd44e3", "planId": "e6a5012c-cbeb-4c1e-ab80-e5f43efd44e3", "tenantId": "e6a5012c-cbeb-4c1e-ab80-e5f43efd44e3", "userId": "e6a5012c-cbeb-4c1e-ab80-e5f43efd44e3", "expirationDate": "2022-01-01T12:00:00", "createdAt": "2022-01-01T12:00:00", "updatedAt": "2022-01-01T12:00:00", "plan": {} } }

Delete Plan

Request

Delete a plan

Path
idstringrequired
curl -i -X DELETE \
  'https://api.frontegg.com/entitlements/resources/plans/v1/{id}' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

Get Plan Features

Request

Retrieve a paginated list of plan features, with the abillity to search and order (by date (createdAt) or expiration date (expirationDate))

Path
idstringrequired
Query
offsetnumber

Page offset of the results to return

Default 0
Example: offset=0
limitnumber

Number of results per page

Default 10
Example: limit=10
filterstring

Search input; Searchable fields: name

Example: filter=search-text
orderBystring

Order fields by date created (createdAt) or expired (expirationDate)

Enum"name""key""createdAt"
Example: orderBy=key
sortTypestring

Sort fields by an ascending (ASC) or a decending (DESC) order

Enum"ASC""DESC"
Example: sortType=ASC
featureIdsArray of strings

Comma separated feature IDs that can be used to filter the results

Example: featureIds=e6a5012c-cbeb-4c1e-ab80-e5f43efd44e3
permissionKeysArray of strings

Comma separated permission keys that can be used to filter the results

Example: permissionKeys=permission.read&permissionKeys=permission.write
hasFeatureFlagboolean

Filter out features that are linked/not linked to feature-flag

Example: hasFeatureFlag=flase
featureKeysArray of strings

Comma separated feature Keys that can be used to filter the results

Example: featureKeys=test-feature
curl -i -X GET \
  'https://api.frontegg.com/entitlements/resources/plans/v1/{id}/features' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

Bodyapplication/json
itemsArray of objects(PlanFeatureDto)
hasNextboolean
Response
application/json
{ "items": [ {} ], "hasNext": true }

Entitlements

Operations

Feature Flags

Operations

API Access Control

Operations