Validate a License Key
/v1/licenses/validate
Checks if a license key is valid and returns information about the license key and its associated instance.
Parameters
license_key Required
The license key to validate.
instance_id
If included, validate a license key instance, otherwise validate a license key. If no instance_id
is provided, the response will contain "instance": null
.
Returns
valid
A boolean indicating whether the license was successfully validated.
error
An error message if the license could not be validated. This will be null
if the license was validated successfully.
license_key
The information about the license that was deactivated.
instance
The information about the license key instance that was validated. If no instance_id
was provided, this will be null
.
meta
Additional information about the license key, including the order, product, variant, and customer information.
ID fields in the meta
object can be used to fetch data related to the license key, such as relevant order/product information, from the Lemon Squeezy API. The meta
object also contains convenience information from the license key, including product and variant names, and the customer’s name and email address.