Skip to main content
GET
/
api
/
v1-beta
/
customers
/
{id}
/
entitlements
/
check
JavaScript
import Stigg from '@stigg/typescript';

const client = new Stigg({
  apiKey: process.env['STIGG_API_KEY'], // This is the default and can be omitted
});

const response = await client.v1Beta.customers.entitlements.check('x');

console.log(response.data);
{
  "data": {
    "isGranted": true,
    "type": "FEATURE",
    "accessDeniedReason": null,
    "feature": {
      "id": "feature-api-calls",
      "displayName": "API Calls",
      "featureType": "NUMBER",
      "featureStatus": "ACTIVE"
    },
    "usageLimit": 10000,
    "hasUnlimitedUsage": false,
    "resetPeriod": "MONTH",
    "currentUsage": 2500,
    "chains": [
      [
        {
          "entityId": "user-u1",
          "usageLimit": 100,
          "currentUsage": 30,
          "isGranted": true
        }
      ]
    ]
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.stigg.io/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

X-API-KEY
string
header
required

Server API Key

Path Parameters

id
string
required

The unique identifier of the entity

Required string length: 1 - 255

Query Parameters

featureId
string

Feature ID (refId) to check. Mutually exclusive with currencyId.

Required string length: 1 - 255
currencyId
string

Currency ID (refId) to check for credit entitlements. Mutually exclusive with featureId.

Required string length: 1 - 255
resourceId
string

Resource ID to scope the entitlement check to a specific resource

Required string length: 1 - 255
requestedUsage
integer

Requested usage amount to evaluate against the entitlement limit (numeric features only)

Required range: x >= 0
requestedValues
string[]

Requested values to evaluate against allowed values (enum features only)

dimensions
object

Optional attribution map (e.g. dimensions[userId]=u1). When provided, the response includes a chains array with per-entity governance limits.

Response

The single entitlement with optional chains array carrying per-entity governance limits when dimensions was provided.

Response object

data
BetaFeatureEntitlement · object
required

Feature entitlement with optional governance chains attached.