Create License Key

Added in v1.0
POST https://api.example.com/api/keys
Requires authentication: x-api-key: YOUR_API_KEY

Creates a license key with the desired information.

Body parameters

  • uid string required
    The user ID to attach the license key to.
  • pid integer required
    The product ID to register the license key for.
  • status boolean optional
    The active state of the license key.
  • ip string optional
    The authorised IP address for the license key to pass authentication.
  • disabled boolean optional
    Determines if the license key is force disabled. Defaults to false.

Responses

  • 200OK
  • 201OK
  • 400Bad Request
Request
curl -X POST 'https://api.example.com/api/keys' \
  -H 'x-api-key: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "uid": "123",
  "pid": 456,
  "ip": "192.168.1.2",
  "status": true,
  "disabled": false
}'
Response
OK
{
  "id": 1,
  "uuid": "123",
  "product": 1,
  "key": "0190a5f3-7c1e-7b2a-9d4e-3f8a6c1b2d90",
  "ip": "1.1.1.1",
  "status": true,
  "disabled": false,
  "locked": true,
  "lastSeen": 1790000000000
}