Skip to content

Organizations, Usage & License

These endpoints provide access to organization details, usage metrics, and license information. Authentication is required. API key scopes apply as listed. Scope checks do not apply to JWT callers. API keys access their own organization. JWT callers need membership in the requested organization.

All five endpoints can return 401, 403, 429, or 500. See HTTP Status Codes for shared errors. The examples show illustrative stored values, rather than license tier defaults. Some limits entries are explicitly omitted.

GET /v1/organizations

Returns the organizations accessible to the authenticated identity. The list is not paginated.

  • API key: Returns the single organization the key belongs to, or an empty list if that organization is absent.
  • JWT: Returns all organizations that the user belongs to.

Scope required (API key): org:read

{
"data": [
{
"id": "11111111-1111-4111-8111-111111111111",
"name": "Ananke Research",
"slug": "ananke-research",
"avatarUrl": null,
"role": "owner",
"createdAt": "2025-01-10T08:00:00.000Z"
}
]
}
FieldTypeDescription
iduuidOrganization ID
namestringDisplay name
slugstringURL-friendly identifier
avatarUrlstring | nullAvatar image URL
rolestringJWT membership role (owner, admin, member, viewer) or api_key
createdAtstringISO 8601 timestamp
GET /v1/organizations/{id}

Returns details for a single organization, including member count.

Scope required (API key): org:read

ParameterTypeDescription
iduuidOrganization ID
{
"id": "11111111-1111-4111-8111-111111111111",
"name": "Ananke Research",
"slug": "ananke-research",
"avatarUrl": null,
"memberCount": 5,
"createdAt": "2025-01-10T08:00:00.000Z"
}
StatusCodeWhen
403FORBIDDENMissing scope, mismatched API key organization, or missing JWT membership
404NOT_FOUNDOrganization does not exist
GET /v1/organizations/{orgId}/usage/summary

Returns recorded usage for the current calendar-month billing period. The server computes calendar boundaries in its timezone and returns them as UTC timestamps. A missing organization license returns 404 NOT_FOUND when the endpoint loads the limits.

Scope required (API key): usage:read

ParameterTypeDescription
orgIduuidOrganization ID
{
"simulationRuns": 142,
"apiCalls": 1830,
"tickCount": 284000,
"limits": {
"maxSimulationsPerMonth": 1000,
"maxTicksPerSimulation": 10000
// Other stored limits omitted
},
"periodStart": "2025-06-01T00:00:00.000Z",
"periodEnd": "2025-07-01T00:00:00.000Z"
}
FieldTypeDescription
simulationRunsnumberSimulations created this period
apiCallsnumberRecorded API-key-authenticated requests this period
tickCountnumberTotal ticks computed this period
limitsobjectStored organization license limits
periodStartstringBilling period start (ISO 8601)
periodEndstringBilling period end (ISO 8601)
GET /v1/organizations/{orgId}/usage/history

Returns usage metrics for the current billing period first, followed by preceding calendar months. Period boundaries use the server’s timezone and are returned as UTC timestamps.

Scope required (API key): usage:read

ParameterTypeDescription
orgIduuidOrganization ID
ParameterTypeDefaultDescription
periodsinteger6Number of billing periods, clamped to 1 to 12

The handler uses integer parsing. Zero or an unparseable value uses 6. The example shows a two-period response, including the current period.

{
"data": [
{
"periodStart": "2025-06-01T00:00:00.000Z",
"periodEnd": "2025-07-01T00:00:00.000Z",
"simulationRuns": 142,
"apiCalls": 1830,
"tickCount": 284000
},
{
"periodStart": "2025-05-01T00:00:00.000Z",
"periodEnd": "2025-06-01T00:00:00.000Z",
"simulationRuns": 98,
"apiCalls": 1204,
"tickCount": 196000
}
]
}
GET /v1/organizations/{orgId}/license

Returns the organization’s stored license and subscription details. The lookup does not filter by license status.

Scope required (API key): org:read

ParameterTypeDescription
orgIduuidOrganization ID
{
"id": "22222222-2222-4222-8222-222222222222",
"tier": "professional",
"status": "active",
"limits": {
"maxSimulationsPerMonth": 1000,
"maxTicksPerSimulation": 10000
// Other stored limits omitted
},
"currentPeriodStart": "2025-06-01T00:00:00.000Z",
"currentPeriodEnd": "2025-07-01T00:00:00.000Z",
"hasStripeSubscription": true
}
FieldTypeDescription
iduuidLicense ID
tierstringcommunity, research, evaluation, professional, enterprise, strategic, or licensing
statusstringtrialing, active, past_due, canceled, or unpaid
limitsobjectTier-specific limits
currentPeriodStartstring | nullCurrent billing period start
currentPeriodEndstring | nullCurrent billing period end
hasStripeSubscriptionbooleanWhether the license has a Stripe subscription ID
StatusCodeWhen
403FORBIDDENCaller does not have access to this organization
404NOT_FOUNDNo license found for this organization.