> For the complete documentation index, see [llms.txt](https://docs.sunlicense.hapangama.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sunlicense.hapangama.com/api-documentation/license-api.md).

# License API

## License Validation Request V1

<mark style="color:green;">`POST`</mark> `/api/v1/validate`

Api request that can be used to validate product license

**Headers**

| Name         | Value              |
| ------------ | ------------------ |
| Content-Type | `application/json` |

**Body**

| Name                          | Type   | Description                                | Type                                       |
| ----------------------------- | ------ | ------------------------------------------ | ------------------------------------------ |
| `licenseKey`                  | string | License Key of the User                    | <mark style="color:red;">Required</mark>   |
| `productId`                   | number | Product Id of the license                  | <mark style="color:red;">Required</mark>   |
| `hwid`                        | string | Hardware id of the device                  | <mark style="color:red;">Required</mark>   |
| `productVersion`              | string | Product Version                            | <mark style="color:green;">Optional</mark> |
| `ip`                          | string | Client-Provided IP Address                 | <mark style="color:green;">Optional</mark> |
| `macAddress`                  | string | MAC Address                                | <mark style="color:green;">Optional</mark> |
| `operatingSystem`             | string | Operating System of the device             | <mark style="color:green;">Optional</mark> |
| `operatingSystemVersion`      | string | OS Version of the device                   | <mark style="color:green;">Optional</mark> |
| `operatingSystemArchitecture` | string | CPU Architecture of the device (ARM / x86) | <mark style="color:green;">Optional</mark> |
| `javaVersion`                 | string | Java Version installed in the device       | <mark style="color:green;">Optional</mark> |

**Response**

{% tabs %}
{% tab title="200" %}

```json
{
    "message": "License validated",
    "status": 200,
    "timestamp": "2025-01-27T19:01:25.710+00:00"
}
```

{% endtab %}

{% tab title="400" %}

```json
{
    "message": "Max IPs reached",
    "status": 400,
    "timestamp": "2025-01-27T20:01:34.140+00:00"
}
```

{% endtab %}
{% endtabs %}

{% file src="/files/HI6MoXljT5OdsR0MMDOf" %}
Postman Collection
{% endfile %}
