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

# Verification Endpoint

> API reference for the license verification endpoint. Verify keys, auto-activate devices, and retrieve full license details in one call.

## `POST https://license.rmz.gg/verify`

Verifies a license key and auto-activates the device in a single call. No separate activation step is needed.

## Request

Send a JSON body with the following fields:

| Field         | Type    | Required | Description                                    |
| ------------- | ------- | -------- | ---------------------------------------------- |
| `product_id`  | integer | Yes      | Your product ID from the dashboard             |
| `license_key` | string  | Yes      | The customer's license key                     |
| `hwid`        | string  | No       | Hardware ID -- required if lock type is `hwid` |

```bash theme={null}
curl -X POST https://license.rmz.gg/verify \
  -H "Content-Type: application/json" \
  -d '{
    "product_id": 123,
    "license_key": "MYAPP-XXXX-XXXX-XXXX-XXXX",
    "hwid": "a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4"
  }'
```

## Success Response (200)

```json theme={null}
{
  "success": true,
  "data": {
    "status": "active",
    "lock_type": "hwid",
    "product": {
      "id": 123,
      "name": "My Script Pro"
    },
    "plan": {
      "duration": "annually",
      "duration_label": "سنه",
      "start_date": "2026-03-23 12:00:00",
      "end_date": "2027-03-23 12:00:00",
      "is_active": true
    },
    "expires_at": "2027-03-23T12:00:00+00:00",
    "expires_in_days": 365,
    "activations": {
      "current": 1,
      "max": 3,
      "remaining": 2
    },
    "metadata": null
  }
}
```

## Response Field Reference

| Field                        | Type            | Description                                                                                                 |
| ---------------------------- | --------------- | ----------------------------------------------------------------------------------------------------------- |
| `success`                    | boolean         | `true` if the license is valid                                                                              |
| `data.status`                | string          | `active`, `expired`, `suspended`, or `revoked`                                                              |
| `data.lock_type`             | string          | `none`, `hwid`, or `ip`                                                                                     |
| `data.product.id`            | integer         | Product ID                                                                                                  |
| `data.product.name`          | string          | Product display name                                                                                        |
| `data.plan`                  | object \| null  | Subscription plan details (`null` if no plan)                                                               |
| `data.plan.duration`         | string          | Raw duration key: `monthly`, `quarterly`, `semiAnnual`, `annually`, `biennial`, `quinquennial`, `decennial` |
| `data.plan.duration_label`   | string          | Arabic display name for the duration                                                                        |
| `data.plan.start_date`       | string          | Plan start date (`YYYY-MM-DD HH:MM:SS` format)                                                              |
| `data.plan.end_date`         | string          | Plan end date (`YYYY-MM-DD HH:MM:SS` format)                                                                |
| `data.plan.is_active`        | boolean         | Whether the subscription is currently active                                                                |
| `data.expires_at`            | string \| null  | ISO 8601 expiry date (e.g., `2027-03-23T12:00:00+00:00`). `null` means lifetime license                     |
| `data.expires_in_days`       | integer \| null | Days remaining until expiry. `null` means lifetime                                                          |
| `data.activations.current`   | integer         | Number of devices currently activated                                                                       |
| `data.activations.max`       | integer \| null | Maximum allowed activations. `null` means unlimited                                                         |
| `data.activations.remaining` | integer \| null | Activation slots remaining. `null` means unlimited                                                          |
| `data.metadata`              | object \| null  | Custom JSON data from product settings                                                                      |

## Error Response

```json theme={null}
{
  "success": false,
  "error": "LICENSE_NOT_FOUND",
  "message": "License not found"
}
```

See [Error Codes](/licensing/error-codes) for the full list of error codes, messages, and their HTTP status codes.

<Note>
  When [E2EE](/licensing/e2ee) is enabled on the product, both success and error responses are AES-256-GCM encrypted. The response structure changes to:

  ```json theme={null}
  {
    "encrypted": true,
    "payload": "base64-encoded-ciphertext",
    "nonce": "base64-encoded-nonce",
    "tag": "base64-encoded-tag"
  }
  ```

  Decrypt the `payload` using AES-256-GCM with your product's encryption key, the `nonce`, and the `tag` to get the original JSON response.
</Note>
