# Deactivate a license device (/api/licenses/deactivate-license-instance)

`POST https://api.comecero.com/api/v1/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.

## Parameters

- `license_id` (path, required): The issued license id.
- `instance_id` (path, required): The device instance id.
- `Idempotency-Key` (header, required): One stable printable ASCII key, scoped to account, mode and license. Preserve it while the outcome is unknown.

Request body: the `license_support_deactivate_request` schema.

Responses: 200, 400, 401, 403, 404, 409, 413, 503.

Full schemas: operation `deactivate_license_instance` in /openapi.json.