Remove a domain from a license. Requires the requesting user to be an administrator or the license owner.
Authentication: Valid license_key
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
license_key | string | Yes | The license key |
domain | string | Yes | Domain to remove |
current_user | int | Yes | User ID performing the action |
environment | string | No | live or staging |
Example Request:
curl -X POST https://your-site.com/wp-json/slswc/v1/remove_domain \
-d license_key=ABCD-1234-EFGH-5678 \
-d domain=https://old-site.com \
-d current_user=5
Success Response (200):
{
"status": "deactivated",
"product_name": "My Plugin",
"message": "The license has been successfully deactivated for this domain."
}
The roles allowed to remove domains are filterable via slswc_remove_domain_roles (default: ['administrator']).
Back to License Endpoints.