Skip to main content
POST
/
v1
/
entitlements
curl --request POST \
  --url https://api.paygentic.io/v1/entitlements \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "customerId": "cus_q3r4s5t6u7v8w9x0",
  "featureId": "feat_a1b2c3d4e5f6g7h8",
  "template": {
    "type": "boolean"
  }
}
'
{
  "object": "entitlement",
  "id": "<string>",
  "customerId": "<string>",
  "featureId": "<string>",
  "status": "active",
  "activeFrom": "2023-11-07T05:31:56Z",
  "config": {},
  "subscriptionId": "<string>",
  "activeTo": "2023-11-07T05:31:56Z",
  "metadata": {}
}

Authorizations

Authorization
string
header
required

API key authentication

Body

application/json
customerId
string
required

The customer to issue the entitlement to.

featureId
string
required

The feature to grant access to.

template
object
required

The template defining the entitlement type and configuration.

activeFrom
string<date-time>

When the entitlement becomes active. Defaults to now.

activeTo
string<date-time> | null

When the entitlement expires. Null means no expiration.

subscriptionId
string | null

Optional subscription ID to associate with this entitlement.

metadata
object

Additional metadata for the entitlement.

Response

Entitlement successfully issued.

object
enum<string>
default:entitlement
required
Available options:
entitlement
id
string
required

Unique identifier for the entitlement.

customerId
string
required

Unique identifier for a customer

featureId
string
required

The feature this entitlement grants access to.

status
enum<string>
required

Current status of the entitlement.

Available options:
active,
canceled,
expired
activeFrom
string<date-time>
required

When the entitlement becomes active.

config
object
required

Configuration values for static features.

subscriptionId
string | null

The subscription this entitlement is associated with, if any.

activeTo
string<date-time> | null

When the entitlement expires. Null means no expiration.

metadata
object

Additional metadata for the entitlement.