For the complete documentation index, see llms.txt. This page is also available as Markdown.

Get an organization's subscription

Returns whether the organization is on a trial, the free plan or a paid plan, when its trial ends, and where to upgrade. Use it to answer questions about the plan or the trial, or to find how to upgrade.

get
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
organizationIdstringRequired

A unique entity identifier

Pattern: ^[a-zA-Z0-9_-]+$
Responses
200

OK

application/json

An organization's subscription, as needed to tell a user their plan, trial and how to upgrade.

objectstring · enumRequired

Type of Object, always equals to "organization-subscription"

Possible values:
statusstring · enumRequired

Whether the organization is on a trial, the free plan, or a paid plan.

Possible values:
canManageBillingbooleanRequired

Whether the user is an administrator of the organization, and so can upgrade. Otherwise, they have to ask an administrator to upgrade.

upgradeUrlstring · uri · max: 2048Optional

Where to upgrade in the application. Only set when canManageBilling is true.

pricingUrlstring · uri · max: 2048Required

Public page comparing the GitBook plans.

get/orgs/{organizationId}/subscription
GET /v1/orgs/{organizationId}/subscription HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "object": "organization-subscription",
  "status": "trial",
  "plan": {
    "id": "free_2024",
    "title": "text"
  },
  "trial": {
    "status": "notapplicable",
    "endDate": "2026-01-01T00:00:00.000Z",
    "daysRemaining": 1
  },
  "canManageBilling": true,
  "upgradeUrl": "https://example.com",
  "pricingUrl": "https://example.com"
}

Last updated

Was this helpful?