Entitlement routes: check
The Entitlement Verbs check as api.sb routes, with inputs, result, refusals and an example.
Reference for Entitlement, one group of Entitlement routes.
Entitlement.check
Check says whether a Customer may call a Verb now, how much of its Limit remains, when that resets, and which Offer lifts it. Verb page.
POST /{namespace}/ entitlements/ checkBody, as JSON: the inputs. Emits Entitlement.checked.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
customer | Customer | required | The Customer making the call. |
verb | Verb | required | The Verb it wants to call, as Noun.verb. |
amount | integer | How many units the call would use. Defaults to 1. |
Returns
| Output | Type | Required | Description |
|---|---|---|---|
allowed | boolean | required | True when an Entitlement grants the call and its Limit has room for amount. |
entitlement | Entitlement | The Entitlement that grants the Verb, when one does. | |
remaining | integer | Units left in the current period; absent for a feature Entitlement. | |
resetsAt | datetime | When the period resets; absent when the Limit never resets. | |
upgrade | Offer | The Offer that lifts the bound, when its Offer’s atBound is upgrade. |
Refuses when
| Check | Error | Fix | Then call |
|---|---|---|---|
| The key is valid, but its scopes do not allow this operation. | forbidden | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | None. |
Example
curl -X POST https: //api.sb/ leaseline.app/ entitlements/ check \
-H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
-H "Content-Type: application/ json" \
-d '{"customer": "cus_K1BROJhqzZ", "verb": "verb_hlkWBvrAyZ"}'{
"api": "https: //api.sb/ leaseline.app",
"allowed": true,
"entitlement": {
"$id": "https: //api.sb/ leaseline.app/ entitlements/ ent_7MQACmrzGj",
"$type": "Entitlement",
"verb": "verb_hlkWBvrAyZ"
},
"remaining": 1,
"resetsAt": "2026-10-22T12: 00: 00Z",
"upgrade": {
"$id": "https: //api.sb/ leaseline.app/ offers/ offer_HNonLXradP",
"$type": "Offer",
"price": {
"amount": 29,
"currency": "USD"
}
},
"action": {
"$id": "https: //api.sb/ leaseline.app/ actions/ act_br07HsG8MG",
"operation": "Entitlement.check",
"status": "done"
},
"links": {
"self": "https: //api.sb/ leaseline.app/ actions/ act_br07HsG8MG"
}
}