The license object

Every field of a license as the server endpoints return it.

  • Every server endpoint that answers { license } returns it: GET /v1/licenses/:key, the license list, the checkout lookup, a test license, and the endpoints that change a key (extend, versions, devices, seat-release, user-lock and the meter routes).
  • Times are in Unix milliseconds.
Response
{  "license": {    "key": "MYPROD-9K4T-2M8P-XQ7V-H3DW",    "product": "my-product",    "model": "subscription",    "modelId": "mod_5c1e0a7b9d2f4e8a6b3c1d0e9f8a7b6c",    "modelName": "Annual",    "status": "active",    "kind": "active",    "test": false,    "email": "[email protected]",    "expiresAt": 1822435200000,    "term": null,    "validUntil": 1823644800000,    "deviceLimit": 3,    "activeDevices": 1,    "leaseDays": null,    "graceDays": 14,    "seatReleaseDays": 30,    "userLock": "off",    "seats": 1,    "delivery": "key",    "createdAt": 1790899200000,    "revokedAt": null,    "revokedReason": null,    "versions": { "minMajor": 1, "maxMajor": null, "upgradeUntil": null },    "versionRule": null,    "entitlements": { "edition": "pro" },    "meters": {      "exports": {        "uses": 1000, "extra": 500, "used": 950, "left": 550, "overage": 0,        "offline": 150, "ownOffline": null, "resets": "never", "periodEnd": null      }    }  }}

Identity

key

The license key, as issued.

product

The API ID of its product.

model

Its type: perpetual, subscription, trial or timed.

modelId, modelName

The license model it was sold under and that model's current name, or null for a key sold under no model.

test

true for a test license.

email

The customer's email, or null.

createdAt

When the key was issued.

seats

The quantity bought in its Stripe or Paddle checkout, 1 otherwise. It is not the device limit.

  • 1 on each key of a sale of several keys: the sale is what was bought.
sale

Only on a key that is one of a sale of several keys: { id, index, size }, the sale's ID, this key's place in it (from 1) and how many keys it has. A key issued alone has no sale.

Status and term

status

active or revoked. A perpetual key past its expiry stays active; use kind to tell whether it still works.

  • Up to a day after a subscription key's grace period ends or a trial key expires, KeyGrant revokes it.
kind

The key's current state, the first that holds:

  • revoked if it is revoked.
  • Otherwise expired once past validUntil.
  • Otherwise trial for a trial key.
  • Otherwise active.
  • A key inside its grace period is still active or trial.
expiresAt

When the key's term ends: a subscription's paid period, a trial's end, a timed key's term, or the expiry it was issued with.

  • null for a key with no expiry, and for a timed key still waiting for its first activation.
term

A timed key still waiting for its first activation: how long it runs once it starts, { months, days }, calendar months and days. null on every other key, a timed one that has started included (see Timed models).

validUntil

When the key stops working: expiresAt plus its grace period, or null when it never stops.

  • For a test license it is never null: when the license has no expiry it is 30 days after creation, and it never includes grace.
graceDays

The grace it runs on after its expiry, in days, copied from its license model when it was issued: 0 for none, and always 0 on a test license.

leaseDays

Its Offline days: how long each lease lives without a check-in, copied from its license model when it was issued (see Lease lifetime).

  • null means its type's default: 30 days for a perpetual key, 7 for a subscription, trial or timed key.

Range 1 to 90

revokedAt, revokedReason

When and why it was revoked: refund, chargeback, subscription_canceled or manual.

  • A Stripe subscription that is canceled but still running to the end of its period also has them, with subscription_canceled, while status is still active.
  • A subscription key that ran out is revoked with subscription_canceled, and a trial key that ran out with manual.

Devices

deviceLimit

How many devices may hold a seat: the license model's, unless the key has a limit of its own, from its issue, its import, its checkout's metadata or a later change. See Device limits and seats.

activeDevices

How many devices hold a seat now. It can be more than deviceLimit after the limit was lowered: lowering it releases no device.

seatReleaseDays

How many days a device may go without checking in before its seat is freed, from its license model unless the key has its own; null when no seat is freed. See Free unused seats.

userLock

Who may activate a new device on the key: off, email or code, from its license model unless the key has its own. See Who can activate.

Versions and entitlements

versions

The majors it covers: minMajor to maxMajor (null means every later major too). While upgradeUntil is in the future, the key covers every major from minMajor up. See Licensing by version.

versionRule

at_purchase or from_purchase when the key was sold without the version it needs: its first activation sets that version, and until then versions is provisional. null otherwise.

  • A license file's key takes the product's current version when its file is made.
entitlements

What it grants beyond the base product, the set its next lease will carry. {} for none.

Meters

meters

What it counts, by meter code (see Metered uses); {} for none. Set with the meter routes.

Each meter has:

uses

Its model's uses, or its own.

extra

Uses added on top: top-ups, adds by hand, time bought again.

used

Spent this billing period, or for good.

left

The uses and the extra less what was used, never below 0.

overage

What was used past both, which only a device back from offline can report.

offline

The allowance a lease signs now.

ownOffline

The key's own allowance, null for the default.

resets

never or period.

periodEnd

The end of the billing period a period meter is counting, when one is known.

Delivery

delivery

How the key was delivered, from its license model when it was issued: key (typed in by the customer), key_file (the same key in a signed file) or license_file (an offline file for good, perpetual only). A backend that sends its own mail fetches a file for a key_file or license_file key with POST /v1/licenses/:key/file.

What it does not include

The license object does not include the license's devices or their activation IDs (list them with GET /v1/licenses/:key/activations), its price, its last lease, or its Internal note.