Skip to content

Checking access

Every call is checked against the Entitlements a customer's Offers grant; the check call asks first, with what is left and which Offer lifts the bound.

Every call a Customer makes is checked against the Entitlements their Offers grant. The App, the API and the MCP server run that check before every Verb, so a feature locked to a plan stays locked everywhere.

What is checked for you

You write no access code for the common cases. One check, in four places:

WhereWithout the EntitlementNear or past a limit
AppThe button shows locked, with the Offer that unlocks itA usage bar, then the upgrade offer
APIA 402 reply that names the Offer covering the callThe same 402, unless the Offer bills overage past its Limit
MCPThe same 402; an agent can accept the named Offer and retryThe same
PortalThe plan comparisonUsage against each Limit, with the reset time

A call that passes counts against its Limit exactly once. A retried call never counts twice.

Ask before you act

Use Entitlement.check when your own code or agent needs the answer before it starts: before an export dialog opens, or before a long job runs. It changes nothing and never refuses.

Entitlement.check
You, to your agent

Can Riverside Property export right now?

How many exports does this customer have left today?

Check this customer’s plan before the call.

# Entitlement.check
curl -X POST https://api.sb/leaseline.app/entitlements/check \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"customer":"customer_riverside","verb":"Collection.export"}'
import { $ } from 'startup-builder'

await $.Entitlement.check({ customer: 'customer_riverside', verb: 'Collection.export' })
npx startup-builder do Entitlement.check --json '{"customer":"customer_riverside","verb":"Collection.export"}'
{
  "name": "do",
  "arguments": {
    "code": "return await $.Entitlement.check({ customer: 'customer_riverside', verb: 'Collection.export' })"
  }
}

POST /entitlements/check answers with what the customer may do now:

JSON
{
  "allowed": false,
  "entitlement": "entitlement_export_starter",
  "remaining": 0,
  "resetsAt": "2026-10-24T09:14:00Z",
  "upgrade": "offer_pro_monthly"
}

remaining and resetsAt come back only for a Limit. upgrade comes back only when the Offer's atBound is upgrade.

Features, limits and resets

An Entitlement with no Limit is a feature, and one with a Limit is a limit. The Entitlement's kind says which, computed from the Limit and never set by hand.

A calendar Limit resets at the start of each period. A rolling Limit counts the last period from now. To change what a plan grants, ask your agent to lock a feature to a plan or cap usage on a plan.

What a customer bought, and who may use it

An Entitlement says what the customer's business bought. A Permission, held through an Access Level, says which of its people may use it. Both must pass.

A property management firm buys the pro plan, so its account may export. Its front-desk staff hold an Access Level without export, so the button stays hidden for them and shows for the manager.