Activate license

Activate a license. No API key is needed to access this endpoint.

POST
/api/v1/public/licenses/activate

Request Body

application/jsonRequired
licenseKeyRequiredstring

The key of the license to activate.

deviceIdentifierRequiredstring

A unique identifier of the device. Must have at most 64 characters.

deviceNameRequiredstring

The name of the device. Must have at most 64 characters.

productIdRequiredstring | string[]

The product ID of the license. Can also be an array if your app supports multiple products.

curl -X POST "https://keyforge.dev/api/v1/public/licenses/activate" \
  -H "Content-Type: application/json" \
  -d '{
    "licenseKey": "ABCDE-ABCDE-ABCDE-ABCDE-ABCDE",
    "deviceIdentifier": "some_device_id",
    "deviceName": "My computer name",
    "productId": "p_123456"
  }'

Success. The license is valid and has been activated on the device.

{
  "isValid": true,
  "device": {
    "identifier": "some_device_id",
    "name": "My computer name",
    "activationDate": "2023-05-19T18:39:33.000Z"
  },
  "license": {
    "key": "ABCDE-ABCDE-ABCDE-ABCDE-ABCDE",
    "productId": "p_123456",
    "type": "perpetual",
    "revoked": false,
    "maxDevices": 5,
    "expiresAt": null,
    "createdAt": "2023-05-19T18:39:33.000Z"
  }
}