Skip to Content

Licenses API

Manage software license keys with activation tracking, feature support, and public verification.

List Licenses

GET /api/licenses

Response 200 OK

[ { "id": "01JQX...", "licenseKey": "RUSTBILL-XXXX-XXXX-XXXX", "customerId": "01JQA...", "productId": "01JQB...", "status": "active", "maxActivations": 5, "currentActivations": 2, "features": { "api_access": true, "premium_support": true, "max_users": 50 }, "expiresAt": "2027-01-15T00:00:00Z", "createdAt": "2026-01-15T10:30:00Z" } ]

Create License

POST /api/licenses Content-Type: application/json

Body

FieldTypeRequiredDescription
customerIdUUIDYesLicense owner
productIdUUIDYesLicensed product
maxActivationsintegerNoDevice limit (default: unlimited)
featuresobjectNoFeature flags / limits
expiresAtstringNoISO 8601 expiration date

A unique license key is auto-generated.

Update License

PUT /api/licenses/:key Content-Type: application/json

Note: licenses are addressed by their key string, not UUID.

FieldTypeDescription
statusstringactive, suspended, revoked
maxActivationsintegerUpdate device limit
featuresobjectUpdate feature flags
expiresAtstringUpdate expiration

Delete License

DELETE /api/licenses/:key

Public Verification (No Auth Required)

These endpoints are public — designed to be called from your software’s license check:

Verify License

POST /api/licenses/verify Content-Type: application/json { "licenseKey": "RUSTBILL-XXXX-XXXX-XXXX" }

Response 200 OK

{ "valid": true, "status": "active", "features": { "api_access": true }, "expiresAt": "2027-01-15T00:00:00Z" }

Validate and Activate

POST /api/licenses/validate Content-Type: application/json { "licenseKey": "RUSTBILL-XXXX-XXXX-XXXX", "deviceId": "device-fingerprint-hash", "deviceName": "John's Laptop" }

Validates the license and registers a device activation. Returns an error if the activation limit is reached.

License Statuses

StatusDescription
activeValid and usable
expiredPast expiration date
suspendedTemporarily disabled
revokedPermanently disabled
Last updated on