Skip to main content
GET
/
v1
/
subscriptions
/
entitlements
JavaScript
import Hercules from '@usehercules/sdk';

const client = new Hercules({
  apiVersion: '2025-12-09',
  apiKey: process.env['HERCULES_API_KEY'], // This is the default and can be omitted
});

// Automatically fetches more pages as needed.
for await (const entitlement of client.beta.subscriptions.entitlements.list()) {
  console.log(entitlement.id);
}
{
  "data": [
    {
      "id": "<string>",
      "name": "<string>",
      "key": "<string>",
      "active": true,
      "livemode": true
    }
  ],
  "has_more": true
}

Authorizations

Authorization
string
header
required

API key authentication. Include your API key in the Authorization header as: Bearer

Query Parameters

limit
integer
default:100

Maximum number of entitlements to return (1-100)

Required range: 1 <= x <= 100
starting_after
string

Cursor for forward pagination

ending_before
string

Cursor for backward pagination

archived
enum<string>

Filter by archived status

Available options:
true,
false
key
string

Filter by exact key match

Response

200 - application/json

A paginated list of entitlement objects

Paginated list of entitlements

data
object[]
required

Array of entitlement objects

has_more
boolean
required

Whether there are more entitlements available after this page