post/key

Create Key

Generate a new license key with custom limits, features, and optionally assign a customer.

Authentication required: Bearer Token in Authorization header.

Parameters

Idempotency-Key
string (header)

Client-generated unique key making a mutating request idempotent. Replaying a request with the same key returns the original result instead of duplicating side effects. Optional on POST/PUT/PATCH/DELETE.

e.g. <IDEMPOTENCY-KEY>

Request Body (application/json)

productIdrequired
string
allowedHosts
array (nullable)

Optional: List of authorized machine IDs for node-locked licenses

maxActivations
string

Maximum number of allowed activations for the key

customerId
string

Optional: ID of an existing customer to assign the license key to. Cannot be used together with newCustomer.

newCustomer
object

Optional: Details for creating a new customer and assigning the license key to them. Cannot be used together with customerId.

metadata
object

Arbitrary key-value pairs (e.g., is_trial, features)

versionId
string (nullable)

Optional: The ID of a specific product version to strictly associate with this license key upon creation

amountKeys
string

Accepted by the schema, but the current REST service generates one license key per request.

expiryDate
string (nullable)

Optional: Expiration date for the license key(s)

format
object

Custom configuration for generated license keys

licenseType
string [node-locked, floating]

Optional: Type of license key to create

maxConcurrentSessions
integer (nullable)

Optional: Maximum concurrent floating sessions (seats) allowed. Required if licenseType is floating.

heartbeatInterval
integer (nullable)

Optional: Frequency (in seconds) that clients should send heartbeats to keep the lease active.

sessionLeaseDuration
integer (nullable)

Optional: Duration (in seconds) before a floating session lease is automatically marked expired.

Responses

200License key created successfully
400Bad request - invalid parameters or conflicting customer data
401Invalid API key

Response Body (200)

code
integer
key
string
allowedHosts
array (nullable)

Authorized machine IDs for node‑locked licenses

metadata
object (nullable)

Arbitrary key-value pairs (or null if none)

Request Example
curl -X POST "https://api.keymint.dev/key" \
  -H "Authorization: Bearer <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
  "allowedHosts": [],
  "productId": "string",
  "maxActivations": "string",
  "customerId": "string",
  "newCustomer": {
    "name": "string",
    "email": "user@example.com"
  },
  "metadata": {
    "is_trial": true,
    "features": {
      "pro_mode": true
    }
  },
  "versionId": "string",
  "amountKeys": "string",
  "expiryDate": "2026-08-28T05:22:45.755Z",
  "format": {
    "sections": 1,
    "sectionLength": 1,
    "separator": "string",
    "charset": "string",
    "prefix": "string",
    "suffix": "string",
    "case": "string"
  },
  "licenseType": "string",
  "maxConcurrentSessions": 1,
  "heartbeatInterval": 60,
  "sessionLeaseDuration": 300
}'
Response (200 OK)
{
  "code": 0,
  "key": "T8XTR-AI21B-2990H-85SB5"
}