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
organizationIdstringRequiredPattern:
A unique entity identifier
^[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 · enumRequiredPossible values:
Type of Object, always equals to "organization-subscription"
statusstring · enumRequiredPossible values:
Whether the organization is on a trial, the free plan, or a paid plan.
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.
404
Not Found
application/json
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?