Activate a License (POST /activate)

Activate a license on a domain.

Authentication: Valid license_key

Parameters:

NameTypeRequiredDescription
license_keystringYesThe license key to activate
domainstringYesThe domain to activate on (e.g. https://example.com)
environmentstringNolive or staging (auto-detected if empty)
versionstringNoCurrent software version

Example Request:

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

Success Response (200):

{
    "status": "active",
    "product_name": "My Plugin",
    "message": "License activated successfully.",
    "expires": "2027-01-15 00:00:00",
    "license": {
        "id": 42,
        "order_id": 100,
        "customer_id": 5,
        "product_id": 123,
        "license_key": "ABCD-1234-EFGH-5678",
        "software_title": "My Plugin",
        "software_type": "plugin",
        "domains": {
            "https://customer-site.com": {
                "domain": "https://customer-site.com",
                "status": "active",
                "environment": "live",
                "date_time": "2026-04-09 10:30:00"
            }
        },
        "renewal_period": "yearly",
        "license_status": "active",
        "activations": 1,
        "max_activations": 5,
        "staging_activations": 0,
        "max_staging_activations": 5,
        "allow_staging": true,
        "expiration_date": "2027-01-15 00:00:00",
        "purchase_date": "2026-01-15 00:00:00",
        "debug": false
    },
    "domain": {
        "domain": "https://customer-site.com",
        "status": "active"
    }
}

Already Activated Response (200):

{
    "status": "active",
    "product_name": "My Plugin",
    "message": "License activated.",
    "expires": "2027-01-15 00:00:00",
    "license": {
        "id": 42,
        "order_id": 100,
        "customer_id": 5,
        "product_id": 123,
        "license_key": "ABCD-1234-EFGH-5678",
        "software_title": "My Plugin",
        "software_type": "plugin",
        "domains": {
            "https://customer-site.com": {
                "domain": "https://customer-site.com",
                "status": "active",
                "environment": "live",
                "date_time": "2026-01-15 12:00:00"
            }
        },
        "renewal_period": "yearly",
        "license_status": "active",
        "activations": 1,
        "max_activations": 5,
        "staging_activations": 0,
        "max_staging_activations": 5,
        "allow_staging": true,
        "expiration_date": "2027-01-15 00:00:00",
        "purchase_date": "2026-01-15 00:00:00",
        "debug": false
    },
    "domain": {
        "domain": "https://customer-site.com",
        "status": "active"
    }
}

Activation Limit Reached Response (200):

{
    "status": "active",
    "product_name": "My Plugin",
    "message": "Maximum number of activations reached.",
    "expires": "2027-01-15 00:00:00",
    "license": {
        "id": 42,
        "order_id": 100,
        "customer_id": 5,
        "product_id": 123,
        "license_key": "ABCD-1234-EFGH-5678",
        "software_title": "My Plugin",
        "software_type": "plugin",
        "domains": {
            "https://site-one.com": {
                "domain": "https://site-one.com",
                "status": "active",
                "environment": "live",
                "date_time": "2026-01-15 12:00:00"
            },
            "https://site-two.com": {
                "domain": "https://site-two.com",
                "status": "active",
                "environment": "live",
                "date_time": "2026-02-20 09:00:00"
            }
        },
        "renewal_period": "yearly",
        "license_status": "active",
        "activations": 2,
        "max_activations": 2,
        "staging_activations": 0,
        "max_staging_activations": 5,
        "allow_staging": true,
        "expiration_date": "2027-01-15 00:00:00",
        "purchase_date": "2026-01-15 00:00:00",
        "debug": false
    }
}

Back to License Endpoints.

Was this article helpful?