Docs·Workspace
GET
/api/v1/spreelytics/billing/entitlementGet plan entitlement
Says whether the workspace is on a paid plan, which is what decides whether the AI assistant is included. It counts no events, so it is much cheaper than GET /billing/usage when this is all you need.
The workspace is chosen as for GET /billing/usage: an audience key reads its audience's workspace, an account key its owner's own unless an X-Team-Id header names another. Any member can read it, Viewer included.
Keys: an account key or an audience key. Getting started explains both kinds.
Response
| Prop | Type | Notes |
|---|---|---|
plan | BillingPlanDto | The current plan, in the shape GET /billing/usage uses. eventsLimit here is the plan's standard allowance. |
isPaid | boolean | false on Free and true on any Growth size. Paid plans include the AI assistant. |
Request
curl 'https://app.spreelytics.com/api/v1/spreelytics/billing/entitlement' \
-H 'Authorization: Bearer YOUR_API_KEY'
const res = await fetch('https://app.spreelytics.com/api/v1/spreelytics/billing/entitlement', {
headers: { Authorization: 'Bearer YOUR_API_KEY' },
});
const data = await res.json();
import requests
res = requests.get(
"https://app.spreelytics.com/api/v1/spreelytics/billing/entitlement",
headers={"Authorization": "Bearer YOUR_API_KEY"},
)
data = res.json()
Response
{
"plan": {
"id": "string",
"name": "string",
"monthly": 0,
"yearly": 0,
"eventsLimit": 0
},
"isPaid": true
}