EYMINT
DocumentationAPI Reference
BlogDashboard
EYMINT
SectionsDocumentationAPI Reference
Go to Dashboard

For AI agents: the documentation index is at /llms.txt. Every docs page is also available as markdown by adding .md to its URL.

Overview

  • API Introduction
  • API Reference Overview
  • Authentication
  • Rate Limits
  • Error Codes

Customers

  • Create Customer
  • Get All Customers
  • Get Customer
  • Update Customer
  • Get Customer Keys
  • Toggle Status
  • Delete Customer

License Keys

  • Create Key
  • Get Key Info
  • Update Key
  • Activate Key
  • Sign Offline Key
  • Checkout Floating Session
  • Heartbeat Floating Session
  • Checkin Floating Session
  • Deactivate Key
  • Block Key
  • Unblock Key
  • Delete Key
post/key/activate

Activate Key

Activate a node-locked license on a device. Requires a `client` or `admin` key, or the `license:activate` grant; a product-bound key works only for its products. A `client` key may include `licensee` to claim an unassigned license.

Anonymous activation: If you omit hostId (or pass "N/A"), Keymint uses the reusable hostless slot "N/A" and returns that value in metadata.hostId. Subsequent anonymous activations for the same license reuse that slot; they do not create a new random host ID on every restart. This slot is not device binding and is shared by all hostless activations for the license.

For real device binding and node-locked licensing, provide a stable SDK-generated machine or installation identifier as hostId and persist it across app restarts. Pass the returned metadata.hostId back unchanged when re-activating or deactivating an anonymous activation.

Optional Licensee Claim

Client-scoped keys may attach an anonymous buyer to the license during activation by passing licensee.

json
{
  "productId": "YOUR_PRODUCT_ID",
  "licenseKey": "A8E2K-9F1BC-3D4GH-7J2KM",
  "hostId": "mac-studio-m2",
  "licensee": {
    "name": "Jane Doe",
    "email": "jane@example.com"
  }
}

This is constrained to the license being activated:

  • customerId is never accepted from client-side activation requests.
  • If the license is unassigned, Keymint creates or reuses a customer with that email and attaches the license.
  • If the license is already assigned, Keymint does not reassign it during activation.
  • If a new customer is needed and the workspace's plan has no room for one, activation returns 403 with errorCode: "licensee_not_allowed". If the existing customer with that email is disabled, activation returns the generic 401.
  • While the vendor's workspace is in its billing continuity period, a licensee claim returns 402 subscription_required.
  • Responses only include masked licensee details.

licensee.name takes 3–255 characters and licensee.email a valid address of up to 320 characters.

Showing The Expiry Date

A successful activation returns expirationDate: when the license expires, as an ISO 8601 date, or null if it never expires. Your app can use it to show the expiry date and the days remaining, with the same client key it uses to activate. No extra permission is needed.

js
const res = await activate(); // { code: 0, message: "License valid", expirationDate: "2027-03-01T00:00:00.000Z", ... }
const daysLeft = res.expirationDate
  ? Math.max(0, Math.ceil((new Date(res.expirationDate) - Date.now()) / 86_400_000))
  : null; // null: never expires

Store the last expirationDate your app received. An expired license fails activation with the same generic error as an invalid key, which stops anyone from probing for valid keys. The stored date lets your app tell the user the license expired on that date, rather than calling the key invalid.

Authentication required: Bearer Token in Authorization header.

Parameters

Idempotency-Key
headerstring

Use a unique value to safely retry this request without repeating its effects.

Example9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d

Request Body (application/json)

productIdrequired
string

The product ID. 22–256 characters.

licenseKeyrequired
string

The license key. 20–256 characters.

hostId
string

Stable device or installation identifier. Omit it (or send "N/A") to use the license's single shared hostless slot. 1–64 characters.

deviceTag
string

Optional human-readable device label. 1–64 characters.

licensee
object

Optional first-time licensee claim. Applies only while the license has no customer: Keymint reuses the workspace customer with this email or creates one (the workspace's plan must allow another customer). Ignored when the license already has a customer.

Responses

200License key activated successfully
400
401The API key is missing, invalid or not allowed here (`api_key_missing` / `api_key_invalid`), or the key was accepted but the license can't be used: unknown key, expired, blocked, a floating license, assigned to a disabled customer, device not in `allowedHosts`, or the claimed licensee's customer is disabled. All license cases return the same `license_invalid_or_forbidden` body so keys can't be probed.
402The vendor's workspace subscription doesn't cover this activation: restricted mode, a new device or licensee claim during the continuity period, or a license archived when the plan lapsed.
403The license is active on `maxActivations` devices (`activation_limit_reached`), the plan doesn't allow creating the claimed licensee (`licensee_not_allowed`), or the API key isn't allowed from this IP address.
404No active product with this ID in the API key's workspace.
409
413
429Rate limited. On this endpoint the plan limit, the per-IP share for `client` keys and the per-action limit all answer with the nested shape and `code: 3`. Calls for the same license key are also limited to 5 per minute (shared with deactivate and checkout), answered as `Too many activation attempts. Please try again later.` in the same shape. The Free-plan monthly quota answers `quota_exceeded` with `code: 1`, and the Idempotency-Key budget answers the flat `rate_limited` body. Honor `Retry-After`; see Rate Limits.
503

Response Body (200)

code
integer
message
string
expirationDate
string (nullable)

When the license expires (ISO 8601), or null if it never expires. Use it to show the days remaining; client keys need no extra permission.

licenseeName
string

Masked name of the assigned customer. Omitted when the license has no customer.

licenseeEmail
string

Masked email of the assigned customer. Omitted when the license has no customer.

metadata
object

The license metadata plus `hostId`: the host ID this activation was recorded under ("N/A" for hostless activations).

versionId
string (nullable)

The ID of the product version associated with this license key

version
object (nullable)

Present only when the license is tied to a product version.

Request Example
curl -X POST "https://api.keymint.dev/key/activate" \
  -H "Authorization: Bearer <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
  "productId": "4898d6707ffa56ed9b0eea",
  "licenseKey": "A8E2K-9F1BC-3D4GH-7J2KM",
  "hostId": "mac-studio-m2",
  "deviceTag": "MacBook Pro",
  "licensee": {
    "name": "Jane Doe",
    "email": "jane@example.com"
  }
}'
Response (200 OK)
{
  "code": 0,
  "message": "License valid",
  "expirationDate": "2027-03-01T00:00:00.000Z",
  "licenseeName": "J*** D**",
  "licenseeEmail": "j***@example.com",
  "metadata": {
    "features": {
      "Pro Mode": true
    },
    "hostId": "mac-studio-m2"
  },
  "versionId": null
}