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.

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 the Content-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 CodeDescription
400An error occurred. See the error field for details.
404An item could not be found.
422A 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.

Was this page helpful?