Activate License Key

Registers a specific device (hostId) to a license key (licenseKey), consuming an activation slot if applicable. This endpoint validates the license key and associated product/customer, then adds the device information if activation is possible. Use this during initial software setup or when activating on a new device.

Endpoint

POST /activate-key

Base URL: https://docs/api.keymint.dev

Request

Send a POST request with a JSON body and Content-Type: application/json. Include the accessToken as a Bearer token in the Authorization header.

Headers

HeaderValueRequiredDescription
AuthorizationBearer <accessToken>YesAPI access token for authentication.

Body Parameters

ParameterTypeRequiredDescription
productIdstringYesUnique product identifier (e.g., prod_...).
licenseKeystringYesLicense key string (e.g., lk_...).
hostIdstringNoUnique device identifier (e.g., MAC hash, UUID).
deviceTagstringNoOptional user-friendly device name (e.g., “John’s Laptop”).

Example Request

POST /activate-key HTTP/1.1
Host: api.keymint.dev
Authorization: Bearer at_verylongaccesstokenstringgeneratedforyourapplication12345678
Content-Type: application/json

{
  "productId": "your_product_id_123",
  "licenseKey": "xxxxx-xxxxx-xxxxx-xxxxx",
  "hostId": "a1:b2:c3:d4:e5:f6-hashed-uuid-or-other-id",
  "deviceTag": "Dev Workstation"
}

Responses

The API returns a JSON object with the activation status.

Success Response (200 OK)

{
  "code": 0,
  "message": "License valid",
  "licensee_name": "Jane Doe",
  "licensee_email": "jane.doe@example.com"
}

Error Responses

Status CodeCodeDescriptionExample Response Body
4001Missing required parameters (productId, licenseKey, hostId).{"message": "Missing required params", "code": 1}
4011Invalid accessToken.{"message": "Invalid access token", "code": 1}
4032License not active, expired, customer inactive, or activation limit reached.{"message": "Activation limit reached", "code": 2}
4041productId or licenseKey not found, or customer associated with key not found.{"message": "Invalid license key", "code": 1}
5001Internal server error during activation.{"message": "Server error", "code": 1}