Licenses

Validate license

Verify if a license is valid.

POST
/api/v1/licenses/validate
AuthorizationBearer <token>

Your API key.

In: header

Header Parameters

License-Keystring

The license key.

deviceIdentifier?string

The identifier of the device to validate the license for. Optional, but recommended.

productId?string

The product ID of the license. Optional, but recommended.

Response Body

application/json

curl -X POST "https://keyforge.dev/api/v1/licenses/validate" \  -H "License-Key: ABCDE-ABCDE-ABCDE-ABCDE-ABCDE" \  -H "Content-Type: application/json" \  -d '{}'
{
  "isValid": true,
  "status": "active",
  "device": {
    "identifier": "some_device_id",
    "name": "My computer name",
    "activationDate": "2024-05-19T18:39:33.000Z"
  },
  "license": {
    "key": "ABCDE-ABCDE-ABCDE-ABCDE-ABCDE",
    "userId": "05d27bfb-61c7-45f7-9d07-09a41defc88a",
    "productId": "p_123456",
    "type": "perpetual",
    "expiresAt": null,
    "revoked": false,
    "email": "[email protected]",
    "maxDevices": 5,
    "activeDevices": [
      {
        "identifier": "some_device_id",
        "name": "My computer name",
        "activationDate": "2024-05-19T18:39:33.000Z"
      }
    ],
    "createdAt": "2024-05-19T18:39:33.000Z"
  }
}