--- title: Licensing API description: Endpoints for activating, validating, and managing licenses date: 2024-01-31 --- ## Overview The Licensing API allows external applications to interact with the WooNooW licensing system. **Base URL**: `https://your-domain.com/wp-json/woonoow/v1` --- ## Public Endpoints ### Activate License Activates a license key for a specific domain. ```http POST /licenses/activate ``` #### Activation Parameters | Body Params | Type | Required | Description | | :--- | :--- | :--- | :--- | | `license_key` | `string` | **Yes** | The license key to activate | | `domain` | `string` | **Yes** | The domain where the software is installed | | `activation_mode` | `string` | No | Set to `oauth` to trigger OAuth flow | #### Responses ```json { "success": true, "activation_id": 123, "license_key": "XXXX-YYYY-ZZZZ-WWWW", "status": "active" } ``` If OAuth is required: ```json { "success": false, "oauth_required": true, "oauth_redirect": "https://vendor.com/my-account/license-connect/...", "state": "abc12345" } ``` --- ### Validate License Checks if a license key is valid and active for the current domain. ```http POST /licenses/validate ``` #### Validation Parameters | Body Params | Type | Required | Description | | :--- | :--- | :--- | :--- | | `license_key` | `string` | **Yes** | The license key to validate | | `domain` | `string` | **Yes** | The domain to check against | --- ### Deactivate License Deactivates a license for the current domain. ```http POST /licenses/deactivate ``` #### Deactivation Parameters | Body Params | Type | Required | Description | | :--- | :--- | :--- | :--- | | `license_key` | `string` | **Yes** | The license key to deactivate | | `domain` | `string` | **Yes** | The domain to remove |