Check a License (POST /check_license)

Check the current status of a license.

Authentication: Valid license_key + domain must be registered

Parameters:

NameTypeRequiredDescription
license_keystringYesThe license key to check
domainstringYesThe requesting domain. Must already be registered on the license; an unregistered or missing domain fails validation with slswc_invalid_domain.
environmentstringNolive or staging

Example Request:

curl -X POST https://your-site.com/wp-json/slswc/v1/check_license \
  -d license_key=ABCD-1234-EFGH-5678 \
  -d domain=https://customer-site.com

Valid License Response (200):

{
    "status": "active",
    "product_name": "My Plugin",
    "message": "The license is valid",
    "expires": "2027-01-15 00:00:00",
    "domain": {
        "domain": "https://customer-site.com",
        "status": "active"
    }
}

Invalid License Response (200):

{
    "status": "invalid",
    "product_name": "My Plugin",
    "message": "The license does not exist.",
    "expires": null,
    "domain": {
        "domain": "https://customer-site.com",
        "status": "invalid"
    }
}

Back to License Endpoints.

Was this article helpful?