Skip to content

The organization’s plan, its limits and current usage

GET
/api/v1/organizations/{organizationId}/subscription
curl --request GET \
--url https://api.crossmart.io/api/v1/organizations/example/subscription \
--cookie better-auth.session_token=<better-auth.session_token>

For people holding billing:view (owners and admins) in a workspace of the organization; others in it get 403, and outsiders 404. Usage is counted across all of its workspaces. Needs a signed-in user.

organizationId
required
string
Media typeapplication/json
object
organizationId
required
string format: uuid
plan
required
object
code
required

Stable identifier of the plan

string
name
required
string
version
required

The plan version the organization is on; later versions never change it

number
status
required
string
Allowed values: ACTIVE TRIALING PAST_DUE CANCELED
currentPeriodEnd
required

When the paid period ends; null until billing is connected

string format: date-time
nullable
enforced
required

Whether limits block actions here (402), or are only reported

boolean
features
required

Every feature, with what the plan allows and what is in use

Array<object>
object
feature
required
string
Allowed values: active_listings channel_connections workspaces members api_keys ai_credits autonomous_agents bring_your_own_key
kind
required

A counted limit, or a flag the plan turns on or off

string
Allowed values: limit flag
enabled
required

Whether the plan includes the feature at all

boolean
limit
required

How many the plan allows; null is unlimited, 0 is not included

number
nullable
usage
required

How many are in use now, across the organization; null for flags

number
nullable

Example

{
"plan": {
"code": "growth",
"name": "Growth",
"version": 1
},
"status": "ACTIVE",
"features": [
{
"feature": "active_listings",
"kind": "limit"
}
]
}