curl --request POST \
  --url https://api.useautumn.com/v1/entitled \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "customer_id": "john-123",
  "feature_id": "compute_seconds"
}'
{
  "allowed": true,
  "balances": [
    {
      "feature_id": "<string>",
      "balance": 123,
      "required": 123
    }
  ]
}

If the customer_id you send doesn’t already exist, Autumn will automatically create a new customer. You can optionally set the properties of this new customer through the customer_data field.

Authorizations

Authorization
string
header
required

You can use your Secret or Publishable key for this endpoint. To include usage events however, you must use your Secret key.

Body

application/json
Customer to check
customer_id
string
required

ID which you provided when creating the customer

feature_id
string
required

ID of the feature to check access to

required_quantity
integer

If you know the quantity of the feature the end user is consuming in advance

event_data
object

Record a usage event together with checking access, in the same request. For dedicated usage tracking (recommended), see /events.

customer_data
object

Properties to create a new customer. If a customer with the provided customer_id already exists, this object is ignored. Alternatively, use the /customers endpoint.

Response

200 - application/json
Customer has access to the product
allowed
boolean

Whether the customer has access to the feature

balances
object[]

Balances of this feature / credits using this feature for the customer