comecerodocs

Validate a license key

POST
/v1/licenses/validate

Checks a generated key and, when you send instance_id, one of its devices. Changes nothing. A well-formed request always answers 200: read valid and code. On the usage meter (https://usage.comecero.com), with no token: the key and your shop's public account_id are the credential.

Request Body

application/json
  1. body

The key to check and, optionally, one of its devices.

account_id*string

Your shop's public account id, for example AB1234.

Match^[A-Za-z0-9_.:-]{1,128}$
license_key*string

The key as the customer typed it. Case, spaces and dashes don't matter.

Lengthlength <= 256
instance_id?string

Also check this device, the instance_id saved from the activation.

Match^[A-Za-z0-9_.:-]{1,128}$

Response Body

The answer, in valid and code.

application/json
  1. response

Whether the key, and the device when one was sent, works now.

valid*boolean

True only when code is VALID.

code*string

The first that applies: NOT_FOUND (no such key for this account; no license in the answer), REVOKED, EXPIRED, then with instance_id INSTANCE_NOT_FOUND (not a device of this key, or one from before the key was replaced) and INSTANCE_DEACTIVATED, else VALID.

Value in"VALID""NOT_FOUND""REVOKED""EXPIRED""INSTANCE_NOT_FOUND""INSTANCE_DEACTIVATED"
license?

What your app sees of a license in the usage meter's answers. Never the key itself.

instance?

One device a license key was activated on.

Example Request
curl -X POST 'https://usage.comecero.com/v1/licenses/validate' \  -H 'Content-Type: application/json' \  -d '{  "account_id": "AB1234",  "license_key": "ACME-7K2QF-M9X4T-0BHRW-C3NDP-YV8JE",  "instance_id": "ins_3f0c9a1b2c4d5e6f708192a3b4c5d6e7"}'
Example Response
{  "valid": true,  "code": "VALID",  "license": {    "license_id": "0142130710581LiRr8sT2c",    "test": true,    "status": "active",    "activation_limit": 3,    "activations": 1,    "expires_at": null  },  "instance": {    "instance_id": "ins_3f0c9a1b2c4d5e6f708192a3b4c5d6e7",    "name": "Studio Mac",    "fingerprint": "6f1c2e8a-4b7d-4e19-9a3c-2d5b8f0e7a61",    "metadata": {      "app_version": "4.2.0"    },    "status": "active",    "activated_at": "2026-11-14T09:41:07.000Z",    "deactivated_at": null  }}