comecerodocs

Deactivate a license device

POST
/licenses/{license_id}/instances/{instance_id}/deactivate

Secret and trusted tokens require licenses update permission; limited tokens are refused. Core verifies license ownership and mode. Supports generated/imported issued keys, including expired and revoked keys; setup restriction does not block maintenance. Frees at most one slot without changing purchased seats, expiry, money or refunds. Requires a trimmed reason, expected generation and one stable Idempotency-Key. The body is limited to 16 KiB; duplicate JSON fields are refused. Core saves an unknown audit intent before Apollo. Success is returned only after completion and durable audit confirmation. A lost reply or failed final read remains unknown. Preserve the exact reviewed body and key for explicit replay after review; no background replay occurs. Same-key/body replay returns stored completion or resumes the same operation. Changed values conflict. The original actor and request id are retained. generation_conflict requires refresh and a newly reviewed request with a new key.

Authorization

headerAuthorizationBearer <token>

A secret, trusted or limited token. See Authentication.

Path Parameters

license_id*string

The issued license id.

Match^[A-Za-z0-9_.:-]+$
Length1 <= length <= 128
instance_id*string

The device instance id.

Match^[A-Za-z0-9_.:-]+$
Length1 <= length <= 128

Header Parameters

Idempotency-Key*string

One stable printable ASCII key, scoped to account, mode and license. Preserve it while the outcome is unknown.

Match^[\x20-\x7e]+$
Length1 <= length <= 128

Request Body

application/json
  1. body
reason*string

Trimmed reason, 1 to 1000 characters after trimming. Control characters other than tab, newline and carriage return are refused.

Match^[^\x00-\x08\x0b\x0c\x0e-\x1f\x7f]*$
Length1 <= length <= 1000
expected_generation*integer
Range1 <= value <= 9007199254740991

Response Body

The confirmed current data.

application/json
  1. response
object*string
operation_id*string
Match^[A-Za-z0-9_.:-]+$
Length1 <= length <= 128
account_id*string
test*boolean
license_id*string
Match^[A-Za-z0-9_.:-]+$
Length1 <= length <= 128
instance_id*string
Match^[A-Za-z0-9_.:-]+$
Length1 <= length <= 128
expected_generation*integer
Range1 <= value <= 9007199254740991
reason*string
actor_type*string
actor_id*string
request_id*string
date_created*string
Formatdate-time
date_modified*string
Formatdate-time
outcome*string

Unknown requires explicit reconciliation or replay. Opening or refreshing never replays deactivation.

Value in"unknown""succeeded""generation_conflict"
error_code*null
Value innull"generation_conflict"
result*

Populated only for a confirmed succeeded outcome.

Example Request
curl -X POST 'https://api.comecero.com/api/v1/licenses/string/instances/string/deactivate' \  -H 'Idempotency-Key: string' \  -H 'Content-Type: application/json' \  -d '{  "reason": "Lost device",  "expected_generation": 1}'
Example Response
{  "object": "license_support_action",  "operation_id": "lsa_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",  "account_id": "AB1234",  "test": true,  "license_id": "lic_1",  "instance_id": "ins_0123456789abcdef0123456789abcdef",  "expected_generation": 1,  "reason": "Lost device",  "actor_type": "secret",  "actor_id": "user_1",  "request_id": "request_1",  "date_created": "2026-12-01T01:00:00Z",  "date_modified": "2026-12-01T01:00:00Z",  "outcome": "succeeded",  "error_code": null,  "result": {    "result": "deactivated",    "instance": {      "instance_id": "ins_0123456789abcdef0123456789abcdef",      "name": "Laptop",      "status": "deactivated",      "activated_at": "2026-12-01T00:00:00.000Z",      "deactivated_at": "2026-12-01T01:00:00.000Z"    },    "license": {      "license_id": "lic_1",      "test": true,      "generation": 1,      "status": "active",      "activation_limit": 3,      "activations": 0,      "expires_at": null    }  }}