> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ancestraldev.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Avalex Portal: Manage Licenses, Slots, and Bindings

> Issue, view, and manage software licenses in Avalex. Edit HWID and IP bindings, adjust expiration dates, and monitor real-time validation attempts.

Licenses are the core entitlement records in Avalex. Each license ties a specific customer to a specific product and controls exactly how and where that product can be used — through IP address limits, hardware device (HWID) bindings, and expiration dates. When you issue a license, Avalex automatically inherits the slot limits defined on the associated product, so you rarely need to configure them manually. You can, however, override any of those values on a per-license basis at any time.

<Note>
  You need the **`licenses:write`** permission to issue or modify licenses in the portal.
</Note>

## Issuing a License

<Steps>
  <Step title="Go to Licenses">
    Select **Licenses** from the left-hand sidebar.
  </Step>

  <Step title="Click Issue License">
    Click the **Issue License** button in the top-right corner.
  </Step>

  <Step title="Select the customer and product">
    Choose the **Customer** this license belongs to and the **Product** it covers from the respective dropdowns.
  </Step>

  <Step title="Review inherited slot limits">
    Avalex automatically populates **Max IPs** and **Max HWIDs** from the product's default values. You can override these now or adjust them later on the license detail page.
  </Step>

  <Step title="Set an expiration date (optional)">
    If this license should expire, enter the desired expiration as an **`expiresAtEpochMillis`** timestamp. Leave this blank for a perpetual license.
  </Step>

  <Step title="Issue the license">
    Click **Issue**. The license is created immediately and the customer can begin validating against it.
  </Step>
</Steps>

## Managing Existing Licenses

Once a license has been issued, you can make targeted edits from the license detail page without affecting the underlying product or other licenses.

### Editing Slot Limits

Change **Max IPs** or **Max HWIDs** directly on the license to override the product default. This is useful when a specific customer needs more or fewer slots than your standard configuration.

### Unbinding IPs

Remove a specific IP address from the license's `usedIps` list to free up that slot. This is helpful when a customer moves offices and needs to validate from a new IP address.

### Unbinding HWIDs

Remove a hardware identifier from the `usedHwids` list to free up that device slot. This is most commonly needed when a customer replaces a computer or reinstalls their operating system.

### Extending Expiration

Update the **`expiresAtEpochMillis`** field to push the expiration date forward — or remove it entirely to convert a time-limited license into a perpetual one.

<Warning>
  Removing a HWID binding frees that slot for a new device. The previously-bound device will no longer be able to validate unless a new HWID slot is available on the license.
</Warning>

## Viewing Validation Attempts

Every license in Avalex maintains a full history of the validation requests made against it. To access this history, go to **Licenses**, click the license you want to inspect, and select the **Validation Attempts** tab on the license detail page.

* Each validation attempt is displayed with a **green badge** for a successful validation or a **red badge** for a failed one.
* Each entry in the list shows the **timestamp**, **client IP address**, **HWID**, and **status** of the attempt.
* You can use this history to investigate unusual validation patterns or confirm that a customer's installation is working correctly.

## License Schema

```json theme={null}
{
  "id": "lic_12345",
  "productId": "prod_123",
  "customerId": "cust_123",
  "expiresAtEpochMillis": 1754676000000,
  "maxIps": 5,
  "maxHwids": 2,
  "usedIps": ["192.168.1.1"],
  "usedHwids": ["HWID-A1B2"],
  "version": 1,
  "validationAttempts": [],
  "createdAtEpochMillis": 1723140000000
}
```
