patch/key

Update License Key

Updates an existing license key's settings, assigns an existing customer, or creates and assigns a new customer in a single request.

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

The ID of the product.

licenseKeyrequired
string

The public license key string to update.

maxActivations
integer | string

The new maximum number of allowed machine activations.

expiryDate
string

The new expiration date.

customerId
string

The ID of an existing customer to assign. Pass null to explicitly remove the assigned customer.

newCustomer
object

Object payload to simultaneously create and assign a brand new customer.

metadata
object

Key-value pair custom metadata.

versionId
string

Restrict key to a specific version.

licenseType
string [node-locked, floating]

The license type.

maxConcurrentSessions
integer

Max floating sessions allowed.

Responses

200Successful response
400Bad Request (e.g. providing both customerId and newCustomer)
404License key not found

Response Body (200)

code
integer
message
string
affectedCount
integer
Request Example
curl -X PATCH "https://api.keymint.dev/key" \
  -H "Authorization: Bearer <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
  "productId": "string",
  "licenseKey": "XXXXX-XXXXX-XXXXX-XXXXX",
  "maxActivations": 1,
  "expiryDate": "2026-08-28T05:22:46.217Z",
  "customerId": "string",
  "newCustomer": {
    "name": "string",
    "email": "user@example.com"
  },
  "metadata": {},
  "versionId": "string",
  "licenseType": "string",
  "maxConcurrentSessions": 1
}'
Response (200 OK)
{
  "code": 0,
  "message": "License key updated successfully",
  "affectedCount": 1
}