Licenses

Generate licenses

POST /api/v1/{application_id}/licenses
{
    "count": 1,
    "format": "[A-Z0-9]{13}",
    "duration": {
        "unit": "m",
        "count": 1
    }
}

200 OK
{
    "success": true,
    "licenses": [
        "ABC1234567890",
        "ABC1234567891",
        ...
        "ABC1234567899"
    ]
}

Available duration units: m (minutes), h (hours), d (days)

duration is optional, if not provided, the license will be valid forever

Get a license

GET /api/v1/{application_id}/licenses/{license}

200 OK
{
    "id": 1,
    "hwid": "...",
    "duration": 15,
    "revoked": false,
    "expiresAt": 1234567890,
    "createdAt": 1234567890,
    "updatedAt": 1234567890
}

duration is in minutes

expiresAt and duration are undefined if the license is not timed

Reset HWID

PUT /api/v1/{application_id}/licenses/{license}/reset

Revoke a license

DELETE /api/v1/{application_id}/licenses/{license}