Skip to content

API Overview

Base URL

https://us-central1-cg-license-server.cloudfunctions.net

All endpoints are HTTPS-only. HTTP requests will be rejected.


Authentication

Endpoint Group Method
Client endpoints No auth required. The license key itself is the credential.
Admin endpoints adminSecret (super admin) OR apiKey (per-creator, scoped to your products)
Webhook endpoints x-webhook-secret header

API Key Delivery (Admin)

The apiKey can be sent in any of three ways:

{
  "apiKey": "your_api_key_here",
  "licenseKey": "..."
}
POST /getLicense?apiKey=your_api_key_here
X-API-Key: your_api_key_here

Error Format

Error responses vary by endpoint type:

validate and verify use a valid field:

{
  "valid": false,
  "error": "Human-readable message describing the problem"
}

activate, deactivate, and heartbeat use a success field:

{
  "success": false,
  "error": "Human-readable message describing the problem"
}

HTTP Status Codes

Code Meaning
400 Bad request. Missing or invalid parameters.
401 Unauthorized. Invalid or expired session token.
403 Forbidden. License revoked, expired, machine limit reached, or wrong product.
404 Not found. License key does not exist.
409 Conflict. Resource already exists (e.g. duplicate product slug or discount code).
429 Too many requests. Rate limit exceeded on /activate (15 attempts per hour per key).
500 Internal server error. Unexpected failure on the server side.

Endpoints at a Glance

Client Endpoints (no auth)

Method Path Description
POST /verify Verify a license key without machine binding
POST /activate Activate a license on a machine
POST /validate Validate a session token
POST /deactivate Deactivate a license from a machine
POST /heartbeat Keep a floating license session alive

Admin: License Management

Method Path Description
POST /createLicense Create a new license
GET/POST /getLicense Get license details + activations + violations
GET/POST /listLicenses List licenses with filters
POST /updateLicense Update license fields
POST /revokeLicense Revoke a license
POST /reinstateLicense Reinstate a revoked license
POST /resolveLicense Resolve flagged violations
POST /resetActivations Clear all machine activations

Admin: Products and Variants

Method Path Description
POST /createProduct Create a product
GET/POST /listProducts List all products
POST /updateProduct Update product fields
POST /createVariant Create a product variant
POST /updateVariant Update a variant
GET/POST /listVariants List variants for a product

Admin: Discount Codes

Method Path Description
POST /createDiscountCode Create a discount or trial code
GET/POST /listDiscountCodes List discount codes
POST /updateDiscountCode Update a discount code
POST /deleteDiscountCode Delete a discount code
POST /redeemTrialCode Redeem a trial code for a license

Admin: API Keys

Method Path Description
POST /createApiKey Create a new API key
GET/POST /listApiKeys List API keys
POST /revokeApiKey Revoke an API key