API Reference
The public endpoints your WordPress plugins call. All are unauthenticated (the license key is the credential), accept and return JSON, and send permissive CORS headers.
Base URL
https://license.devswizard.comPOST /api/license/activate
Called once when a site first enters a license key. Binds the license to the domain.
{
"license_key": "DW-A3F9-KX2M-9PLQ-77TN",
"domain": "https://example.com",
"plugin_slug": "dw-ai-blog-automation",
"plugin_version": "1.3.0"
}{
"valid": true,
"message": "License activated successfully.",
"status": "active",
"expires_at": "2026-12-31T00:00:00.000Z"
}Errors: 400 invalid key format, 403 slug mismatch or expired, 404 key not found, 409 already active on another domain.
POST /api/license/verify
Called daily by WP-Cron to keep the license honest and pick up revocations.
{
"license_key": "DW-A3F9-KX2M-9PLQ-77TN",
"domain": "https://example.com",
"plugin_slug": "dw-ai-blog-automation"
}{
"valid": true,
"status": "active",
"message": "License is valid.",
"expires_at": "2026-12-31T00:00:00.000Z"
}A 403 with valid: false means expired, inactive, or a domain mismatch — stop serving premium features.
POST /api/license/deactivate
Frees the license from its domain so it can move to another site.
{
"license_key": "DW-A3F9-KX2M-9PLQ-77TN",
"domain": "https://example.com"
}{ "valid": true, "message": "License deactivated. Domain removed." }GET /api/update/check
WordPress calls this to discover updates. Query parameters:
| Param | Required | Description |
|---|---|---|
plugin_slug | Yes | Registered plugin slug. |
version | Yes | The site's currently installed version. |
license_key | No | Included so the returned download URL is license-scoped. |
{
"update_available": true,
"new_version": "1.3.0",
"current_version": "1.2.0",
"download_url": "https://license.devswizard.com/api/update/download?plugin_slug=dw-ai-blog-automation&license_key=DW-…",
"changelog": "Bug fixes and new features.",
"published_at": "2026-07-01T10:00:00Z",
"slug": "dw-ai-blog-automation"
}GET /api/update/download
Verifies the license, then streams the GitHub release zip with a Content-Type: application/zip response. Query params: plugin_slug and license_key (required), domain (optional, enforced if present).
GET /api/update/download?plugin_slug=dw-ai-blog-automation&license_key=DW-A3F9-KX2M-9PLQ-77TN
→ 200 application/zip (dw-ai-blog-automation-1.3.0.zip)
→ 403 { "error": "License is not active." }Quick test with curl
curl -X POST https://license.devswizard.com/api/license/verify \
-H 'Content-Type: application/json' \
-d '{
"license_key": "DW-A3F9-KX2M-9PLQ-77TN",
"domain": "https://example.com",
"plugin_slug": "dw-ai-blog-automation"
}'The endpoints above are the only ones your plugin needs. All license and update management is done from your dashboard.