License API
The License API allows you to manage licenses generated by Lemon Squeezy.
You can use the License API to activate, validate or deactivate a license key generated by Lemon Squeezy.
The License API is a separate API from the Lemon Squeezy API and has different requirements.
Requests
- All API requests must be made over HTTPS to
https://api.lemonsqueezy.com
. - All requests must include the
Accept: application/json
header. POST
requests should be sent with theContent-Type: application/x-www-form-urlencoded
header.
Responses
Responses are always in JSON format.
Rate limits
API calls are rate limited to 60 requests per minute.
Errors
The API will return a 4XX
status code in the response if an error has occurred and an error
field in the response body containing an explanation of the error.
Error Code | Description |
---|---|
400 | An error occurred. See the error field for details. |
404 | An item could not be found. |
422 | A required field was invalid or missing. |
License key status
A license key status
can be one of:
inactive
- The license key is valid but has no activations.active
- The license key has one or more activations.expired
- The license key’s expiry date has passed, either because the related product had a defined license length or because the license’s subscription has expired.disabled
- The license key has been manually disabled from the Lemon Squeezy dashboard.