Import license keys
Import existing keys and devices into a generated service. Secret and trusted tokens need licenses:create and read access to the service, customers and products. Limited tokens cannot import. The token sets Test or Live mode. Other service types return 409 license_import_service_conflict. Send 1 to 20 rows, at most 500 devices and a body of at most 1 MiB. Each key allows 90 devices; contact support for more. Unknown fields and duplicate JSON properties are refused. Dry run checks rows and saves a receipt without creating licenses or devices. Confirm with a new Idempotency-Key. Check every row in a 200 report: failed rows do not undo successful rows. Exact source duplicates return the existing license. Changed source data returns license_import_conflict. A key used by another license returns license_key_conflict, including across modes in one account. Re-import does not restore removed devices or old settings. Match Comecero customers and products first. Optional order_id and item_id must name a one-time line for the same customer and product, and need order read/update access. Import creates no payments, invoices or subscriptions and keeps the exact expiry. Wait for active_in_apollo before using devices. After an unknown result, read the receipt when its ID is known, then explicitly retry the same body and key. If no receipt ID was received, deliberately resend the same body and Idempotency-Key to recover or continue it. Requests are never retried automatically.
AuthorizationBearer <token>A secret, trusted or limited token. See Authentication.
license_service_id*stringThe resource id.
Idempotency-Key*stringSend one printable ASCII key. Keep the body and key for retries. A changed body returns 409 idempotency_conflict; work still running returns 409 request_pending. Reuse requires the same account, mode, method, path, merchant scope and response options. Permissions are checked again. Saved requests do not expire.
^[\x20-\x7e]+$1 <= length <= 128application/json- body
dry_run*booleanTrue checks rows and saves a receipt only. Confirmation needs a new key.
rows*array<>At most 500 devices in total, and 90 per key. Maximum decoded request body is 1 MiB.
1 <= items <= 20A saved report with results and errors for each row. Full keys are hidden.
application/json- response
object*stringThe object type.
import_id*stringThe saved receipt id.
^lim_[0-9a-f]{64}$url*stringThe receipt URL.
uriaccount_id*stringThe owning account.
test*booleanThe authenticated mode.
date_created*stringWhen the request was saved.
date-timedate_modified*stringWhen progress last changed.
date-timedry_run*booleanWhether this was a dry run.
status*stringA completed import may still be preparing devices.
"running""completed"summary*results*array<>curl -X POST 'https://api.comecero.com/api/v1/license_services/string/imports' \ -H 'Idempotency-Key: string' \ -H 'Content-Type: application/json' \ -d '{ "dry_run": true, "rows": [ { "row_id": "ls-42", "license_key": "TEST-80e15db5-c796-436b-850c-8f9c98a48abe", "customer_id": "customer_test", "product_id": "widget-pro.test", "order_id": null, "item_id": null, "status": "active", "activation_limit": 3, "activation_usage": 1, "expires_at": null, "over_limit": "rotate", "external": { "provider": "lemon_squeezy", "store_id": "10", "license_key_id": "42", "customer_id": "15", "order_id": "20", "order_item_id": "21", "product_id": "30", "variant_id": null, "subscription_id": null, "created_at": "2024-05-24T14:15:07Z" }, "instances": [ { "instance_id": "f70a79fa-6054-433e-9c1b-6075344292e4", "name": "Existing laptop", "activated_at": "2024-05-24T14:15:07Z" } ] } ]}'{ "object": "license_import", "import_id": "lim_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "url": "https://api.comecero.com/api/v1/license_services/ls_test/imports/lim_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "account_id": "AB1234", "test": true, "date_created": "2026-12-03T10:00:00Z", "date_modified": "2026-12-03T10:00:01Z", "dry_run": true, "status": "completed", "summary": { "imported": 0, "valid": 1, "duplicate": 0, "error": 0 }, "results": [ { "index": 0, "row_id": "ls-42", "result": "valid", "license_id": null, "license": null, "key_last4": "8ABE", "imported_activations": 1, "error": null } ]}Overview
Previous Page
Get an import receipt GET
Read saved row results, including a request still running after a lost reply. Secret and trusted tokens need license and service read access. Limited tokens cannot read receipts. Full keys are hidden. Read this before retrying the same body and key. Wait for each license's active_in_apollo before using devices, even when the import is completed.