# 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 %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.sunlicense.hapangama.com/api-documentation/license-api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
