PlatformXeDocs
Get API Key

License

SDK method for reading your organisation's Enterprise License state, edition and granted plugins.

The client.license namespace reads your own organisation's Enterprise License: GET /api/v1/license. Available in TypeScript, Python, and Go SDKs. See Enterprise License for what a license grants, its lifecycle and how it is installed.

SDKInstallNamespace
TypeScriptnpm install @caldera/platformxe-sdk (1.19.0+, pending release)client.license
Pythonpip install platformxe (1.15.0+, pending release)client.license (sync and async)
Gogo get github.com/calderaxe/platformxe-go (v1.15.0+, pending release)client.License

Requires the license:read scope (billing:read does not grant it, and license:read reads no invoices). It is not one of the scopes a self-registered or portal sign-up key starts with: a key holds it when its scope list names it or holds *, or when it has no scope list. An organisation key is needed: a platform key with no organisation is refused with 403 FORBIDDEN. Default rate tier (1,000 requests/hr per API key).

Read-only. A license is installed by its holder on the portal's Billing page (the License card), never through the API. The answer never carries money, the license text, your business registration or another organisation's grants.

Get the license

const { edition, bypass, license } = await client.license.get();

console.log(edition.plan, edition.source); // e.g. ENTERPRISE license
if (license) {
  console.log(license.state, license.expiresAt, license.daysLeft, license.plugins);
  if (license.renewalDue) console.log('Renewal due: contact licensing');
}
view = client.license.get()
print(view["edition"]["plan"], view["edition"]["source"])
if view["license"]:
    print(view["license"]["state"], view["license"]["daysLeft"], view["license"]["plugins"])

# Async client
view = await async_client.license.get()
view, err := client.License.Get()
if err != nil {
    log.Fatal(err)
}
fmt.Println(view.Edition.Plan, view.Edition.Source)
if view.License != nil {
    fmt.Println(view.License.State, view.License.DaysLeft, view.License.Plugins)
}

The answer is { edition, bypass, license }:

FieldMeaning
edition.planYour organisation's effective plan: FREE, BASIC, PRO or ENTERPRISE. Every plan-level limit follows it.
edition.sourcelicense (a live license grant's edition), plan (your stored plan; Free and Basic need no license) or first_party (a Caldera first-party tenant, always Enterprise).
bypassfirst_party or demo when your organisation needs no license, else null.
licenseThe license that covers your organisation, or null when none does (a holder whose license does not cover the holder itself gets null too; the portal's License card still shows it the license).

A license is:

FieldMeaning
licenseIdThe license id (lic_...).
kindtrial (7 days, no grace) or standard (365 or 730 days).
issuedAt / expiresAt / graceEndsAtThe validity window: valid from issuedAt, then a renewal grace until graceEndsAt.
statevalid, grace (everything still runs), lapsed (its plugins pause; your data is kept) or revoked.
livetrue while the grant is live for your organisation: installed, valid or in grace, and your verified business registration still matches the license.
daysLeftDays to the expiry day, counted on Lagos dates (negative after it).
renewalDuetrue in the last 30 days before expiry and during grace.
holderNameThe organisation that holds the license (it installs it for every organisation it covers).
isHoldertrue when your organisation is the holder.
editionYour organisation's edition under the grant: PRO or ENTERPRISE.
pluginsThe plugins granted to your organisation only, packs before add-ons (for example insurance, insurance.health).

Errors

StatusCodeWhen
401UNAUTHORIZEDMissing or invalid API key
403FORBIDDENThe key lacks license:read; its organisation is inactive; or it is a platform key with no organisation
404NOT_FOUNDThe key's organisation does not exist
429RATE_LIMITEDOver the key's budget
500INTERNAL_ERRORAnything else

Any method other than GET on /api/v1/license is answered 405 Method Not Allowed: there is no API route that installs a license.

Scopes required

MethodScopeRate limit
license.get()license:readDefault (1,000/hr)