> ## Documentation Index
> Fetch the complete documentation index at: https://docs.unprice.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# List entitlements

> Get active entitlements for a customer

<RequestExample>
  ```ts theme={null}
  const { result, error } = await unprice.access.entitlements.list({
    customerId: "cus_1234567890"
  });

  if (error) {
    console.error(error.message);
    return;
  }

  console.log(result);
  ```
</RequestExample>

<ResponseExample>
  ```json theme={null}
  [
    {
      "customerId": "cus_1234567890",
      "featurePlanVersion": {
        "featureType": "usage",
        "unitOfMeasure": "messages"
      }
    }
  ]
  ```
</ResponseExample>

## Request

<ParamField body="customerId" type="string" required>
  The customer ID to load entitlements for.
</ParamField>

<ParamField body="projectId" type="string">
  Optional project ID. Only main-project keys can request another project.
</ParamField>

## Response

Returns an array of active customer entitlements with their feature plan version and grant data.
