Skip to main content
PATCH
/
v1
/
subscriptions
/
entitlements
/
{entitlement_id}
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
});

const entitlement = await client.beta.subscriptions.entitlements.update('entitlement_id');

console.log(entitlement.id);
{
  "id": "<string>",
  "name": "<string>",
  "key": "<string>",
  "active": true,
  "livemode": true
}

Authorizations

Authorization
string
header
required

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

Path Parameters

entitlement_id
string
required

The unique identifier of the entitlement

Body

application/json

Request to update an entitlement. The key cannot be changed after creation.

name
string

Display name for the entitlement

active
boolean

Whether the entitlement is active. Deactivating removes it from access checks.

Response

200 - application/json

The updated entitlement object

The entitlement attached to the plan

id
string
required

Unique identifier for the entitlement

name
string
required

Display name for the entitlement (e.g., API Access, Premium Support)

key
string
required

Unique key to identify the entitlement when checking access in your app

active
boolean
required

Whether the entitlement is active and can be attached to plans

livemode
boolean
required

Whether this is a live mode entitlement (vs test mode)