Update a license
Secret and trusted tokens need licenses update permission. Limited tokens are refused. Generated keys accept only over_limit. Imported keys also accept status, revoked_reason, activation_limit and expires_at. Requires Idempotency-Key and expected_version. Stale versions return 409 license_version_conflict. An actual change raises version and queues sync and normal lifecycle events; no change keeps the version. This route does not change purchased generated terms, payments, refunds or subscriptions.
AuthorizationBearer <token>A secret, trusted or limited token. See Authentication.
license_id*stringThe resource id.
Idempotency-Key*stringExactly one header with 1-128 printable ASCII characters. Retain it after a timeout and across retries. Identity is scoped to account, mode, method, path and actor. Completed responses replay their original status, JSON, Location and Retry-After permanently. A different body, query or If-Match returns 409 credit_request_conflict. An unknown in-progress outcome stays 409 credit_request_pending and is never executed again. Use a new key only for a deliberate new change.
^[ -~]{1,128}$1 <= length <= 128application/json- body
expected_version*integerThe version you reviewed. A stale version returns license_version_conflict.
1 <= value <= 9007199254740991over_limit?stringChanges this issued generated or imported key.
"block""rotate"status?stringImported keys only.
"active""revoked"revoked_reason?stringImported keys only. To reactivate, send status: active and omit revoked_reason; this clears revocation state.
"merchant""refund""chargeback""subscription_cancelled"activation_limit?|Imported keys only. Null is unlimited.
1 <= value <= 2147483647expires_at?|The exact expiry, or null for no expiry. Send seconds and a timezone (Z or ±HH:mm), with up to seven fractional digits.
^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{1,7})?(Z|[+-]\d{2}:\d{2})$date-timeThe license after the update.
application/json- response
A license key issued for an order item or imported without an order, from the product's license service. A limited token may read a license only when it is bound to it, such as the customer's own order. Every field is returned unless show or hide (on the request, or on the event subscription for a webhook) leaves it out, except the fields from key_last4 to version, which generated and imported keys have.
object?"license"The object type. Always license.
"license"url?stringThe URL of this license in the API.
urilicense_id?stringThe id of the license.
date_created?stringWhen the license was issued.
date-timedate_modified?stringWhen the license was last changed.
date-timetest?booleanTrue for a test-mode license.
item_id?|The order item, or null for an orderless import.
account_id?stringThe account the license belongs to.
label?stringWhat the key is called, copied from the license service, for example License Code.
license_service?|The license service that issued the key, as a link, or the full object when you send expand=license_service. Not returned to limited tokens.
order?||The order, as a link, or the full object when you send expand=order.
product?|The product, as a link, or the full object when you send expand=product.
text?|The key as plain text, with any HTML removed. For a generated key, the key itself. Always null for a generated key in a webhook (any event, at any expand depth), which never carries the key.
html?|The key as HTML, with line breaks turned into <br>. For a generated key, the key itself, HTML-encoded. Always null for a generated key in a webhook.
instructions?|How to use the key, from the license service or your license server.
key_last4?stringThe last 4 characters of the key, without dashes, to tell keys apart without showing them. Only on generated and imported keys.
status?stringWhether the key can still be used. A key past its expires_at stays active here; the license key routes answer EXPIRED for it. Only on generated and imported keys.
"active""revoked"revoked_reason?|Why the key was revoked: refund (the order item was fully refunded) or chargeback (a payment of the order was charged back). Null while the key is active. merchant is used for imported-key revocation. subscription_cancelled is reserved. Only on generated and imported keys.
"refund""chargeback""subscription_cancelled""merchant"nulldate_revoked?|When the key was revoked, or null. Only on generated and imported keys.
date-timeactivation_limit?|How many devices the key can be active on at once: the service's activation_limit times the quantity bought, lowered by a partial refund. Null is unlimited. Only on generated and imported keys.
expires_at?|When the key stops working, or null if it never expires. For a subscription, the end of the last paid period plus the service's subscription_grace_days; each renewal moves it later. Only on generated and imported keys.
date-timecustomer_id?|The native customer who owns the key. Only on generated and imported keys.
subscription_id?|The subscription the key was sold with, or null for a one-off sale. One key serves the whole subscription. Only on generated and imported keys.
source?stringWhere the key came from. generated when Comecero made it. Present only on keys of a generated service; keys from list and remote_url services have none of the fields from key_last4 to source.
"generated""imported"version?integerGoes up by one with every change to the key. Webhooks can arrive out of order, so keep the license with the highest version you have seen and ignore an event with a lower one. Changes made close together can be sent as one event with the latest state, and a change to none of status, activation_limit and expires_at (such as revoked_reason moving from refund to chargeback) sends no event, so the version in events can skip numbers. license:expired does not raise version, so it can carry the same one as an earlier event (such as license:issued or license:reinstated): treat an equal version as current, and skip repeats by event_id, not by version. Only on generated and imported keys.
1 <= valueformatted?Present only when you send formatted=true.
over_limit?stringBlock refuses new devices at capacity. Rotate replaces the oldest device, imported devices first, then activated_at and instance_id.
"block""rotate"active_in_apollo?booleanTrue when devices are ready for the current license version. Wait for true before using device support.
curl -X POST 'https://api.comecero.com/api/v1/licenses/string' \ -H 'Idempotency-Key: guide_5501' \ -H 'Content-Type: application/json' \ -d '{ "expected_version": 1, "over_limit": "rotate"}'{ "object": "license", "url": "https://api.comecero.com/api/v1/licenses/0142130710581LiRr8sT2c", "license_id": "0142130710581LiRr8sT2c", "date_created": "2026-11-02T00:45:11Z", "date_modified": "2026-11-02T00:45:11Z", "test": true, "item_id": null, "account_id": "AB1234", "label": "License Code", "license_service": "https://api.comecero.com/api/v1/license_services/0095012789659LsuOeAWLC", "order": null, "product": "https://api.comecero.com/api/v1/products/widget-pro.test", "text": null, "html": null, "instructions": "Open Widget Pro, choose Help, then Enter License, and paste the code.", "key_last4": "8ABE", "status": "active", "activation_limit": 3, "expires_at": null, "source": "imported", "version": 2, "over_limit": "rotate", "active_in_apollo": false}Get a license GET
Returns one license key. A limited token may read it only when the license is bound to the token, such as a license on the signed-in customer's order. Secret, trusted and limited tokens may call it.
List license devices GET
Secret and trusted tokens require licenses read permission; limited tokens are refused. Core resolves ownership and mode from the token. Only generated/imported keys with activation state are supported, including expired and revoked keys. Setup restriction does not block issued-key maintenance. No key material, fingerprints or raw metadata are returned. Returns current-generation active and deactivated devices in instance-id order. Counts and pages are live observations. An empty page can have next_cursor; continue until null. Restart pagination to refresh. A failed usage meter read is an error, never an empty list. The device cursor cannot be used for history.