API Reference

All endpoints require an API key and accept JSON request bodies.

Authentication activate deactivate validate licenses

Authentication

Include your API key in the Authorization header on every request:

Authorization: Bearer lfg_<prefix>.<secret>

API keys are scoped to a project. Requests can only operate on licenses and products belonging to that project. Generate keys from the organization panel under API Keys.

Error Format

All error responses return:

{
    "status": "error",
    "message": "Human-readable description"
}

POST /api/activate

Activate a license on a computer. Returns a signed license file.

Request Body

{
    "license_key": "XXXX-XXXX-XXXX-XXXX",
    "computer_uin": "base64-encoded-unique-id",
    "computer_nickname": "My PC"
}
FieldTypeDescription
license_keystringrequiredLicense key to activate
computer_uinstringrequiredBase64-encoded computer unique identifier
computer_nicknamestringoptionalHuman-readable name for the computer

Response 200

{
    "status": "ok",
    "license_file": "base64-encoded-license-file",
    "is_eval": false,
    "timestamp": "1234567890"
}
If the computer is already activated for this license, a fresh license file is returned without creating a duplicate.

Errors

400Missing fields, invalid key, activation limit reached, license expired
403License belongs to a different project

POST /api/deactivate

Deactivate a license on a specific computer. Limited to 3 deactivations per license per year.

Request Body

{
    "license_key": "XXXX-XXXX-XXXX-XXXX",
    "computer_uin": "base64-encoded-unique-id"
}
FieldTypeDescription
license_keystringrequiredLicense key to deactivate
computer_uinstringrequiredBase64-encoded computer unique identifier

Response 200

{
    "status": "ok",
    "deactivated": true,
    "license_file": "base64-encoded-updated-license-file"
}

Errors

400Missing fields, invalid key, computer not found, no activation found, yearly limit reached
403License belongs to a different project

POST /api/validate

Validate a license and get a fresh license file. Read-only — no state is modified.

Request Body

{
    "license_key": "XXXX-XXXX-XXXX-XXXX",
    "computer_uin": "base64-encoded-unique-id"
}
FieldTypeDescription
license_keystringrequiredLicense key to validate
computer_uinstringrequiredBase64-encoded computer unique identifier

Response 200

{
    "status": "ok",
    "license_file": "base64-encoded-license-file",
    "is_eval": false,
    "timestamp": "1234567890"
}

Errors

400Missing fields, invalid key, computer not found, not activated, license expired
403License belongs to a different project

POST /api/licenses

Create a new license programmatically (e.g. from a payment webhook).

Request Body

{
    "product_identifier": 1,
    "license_type": 1,
    "activation_limit": 2,
    "email": "user@example.com",
    "external_ref": "stripe_sub_123",
    "is_eval": false
}
FieldTypeDescription
product_identifierintegerrequiredProduct identifier (not the database ID)
license_typeintegerrequired1 = Computer, 2 = Named User
activation_limitintegerrequiredMax simultaneous activations
emailstringoptionalLicense holder email (max 254 chars)
external_refstringoptionalExternal reference, e.g. Stripe subscription ID
is_evalbooleanoptionalEvaluation license (default: false)

Response 201

{
    "status": "ok",
    "license_key": "XXXX-XXXX-XXXX-XXXX",
    "is_eval": false,
    "expire": null,
    "features_count": 3
}
Eval licenses expire after the product's configured eval period (default 30 days). Permanent licenses have no expiry.

Errors

400Missing required fields, invalid JSON
403Product belongs to a different project
404Product identifier not found

Home