Overview
On this page, we’ll dive into the different license key endpoints you can use to activate and manage license keys programmatically.
The Licenses API endpoints helps you manage licenses purchased through your store.
Note
License instances are part of a license key. Each license key can be linked to multiple instances. Whenever you activate a license key, you create a new instance of the license key.
Endpoints
- Activate a license key
- Validate a license key
- List all license keys
- Retrieve a license key
- Update a license key
The license key model
The license key model represents a single license key purchased by a customer.
Properties
- Name
idinteger- Description
(read-only) The unique identifier for the license key.
- Name
keystring- Description
(read-only) The actual license key string
- Name
limitinteger | null- Description
The maximum number of instances this key can be activated on.
nullmeans unlimited activations.- Name
activeboolean- Description
Whether the license key is currently active which you can modify via the API and which is unrelated to the status. Inactive keys cannot be activated or validated successfully.
- Name
statusstring- Description
(read-only) The status of the license key, one of:
ACTIVE,INACTIVE,EXPIRED- Name
expires_attimestamp | null- Description
The timestamp when the license key expires.
nullmeans the license will never expire.- Name
is_expiredboolean- Description
Whether the license key is expired.
- Name
store_idinteger- Description
(read-only) The ID of the store this license key belongs to.
- Name
order_idinteger | null- Description
(read-only) The ID of the order associated with this license key.
- Name
invoice_idinteger | null- Description
(read-only) The ID of the associated invoice V2, if applicable.
- Name
product_idinteger- Description
(read-only) The ID of the product this license is for.
- Name
variant_idinteger- Description
(read-only) The ID of the specific product variant this license is for.
- Name
customer_idinteger- Description
(read-only) The ID of the customer that purchased this license key.
- Name
subscription_idinteger | null- Description
(read-only) The ID of the associated subscription, if applicable.
- Name
created_attimestamp- Description
(read-only) Time at which the license key was created.
- Name
updated_attimestamp- Description
(read-only) Time at which the license key was last updated.
The license instance model
The license instance model represents a single activation of a license key on a specific device or identifier.
Properties
- Name
idstring (uuid)- Description
(read-only) The unique identifier (UUID) of the license instance. This is the
instance_idused for validation.- Name
license_key_idinteger- Description
(read-only) The unique identifier for the parent license key which this instance is linked to.
- Name
namestring- Description
(read-only) The name provided during activation, which you can use to identify this instance (e.g., the customer's email or HWID).
- Name
store_idinteger- Description
(read-only) The ID of the store this instance belongs to.
- Name
created_attimestamp- Description
(read-only) Time at which the instance was created (activation time).
- Name
updated_attimestamp- Description
(read-only) Time at which the instance was last updated.
Issue replacement for completed invoice PATCH
In the event you want to replace the deliverables of an invoice, this endpoint lets you do so.
Activate a license key POST
This endpoint activates a given license key and creates an instance of the license key. Activation registers a unique identifier (instance name) against the license key. If the activation is successful, it returns the details of the newly created LicenseKeyInstance, including its unique id which should be stored by the client/application for future validation.