Deactivate a key
Free a device's activation so the key can be used somewhere else.
POST
/api/v1/licenses/deactivateRemoves one device's activation. Call it when the user signs out of your app or moves to a new machine.
Request
license_keystringrequiredThe key.
instance_idstringrequiredThe instance.id to remove.
curl https://shop.example.com/api/v1/licenses/deactivate \
-d license_key="7KQ2M-XW9PA-4TB8N-R2HDE" \
-d instance_id="inst_8fq2…"const response = await fetch("https://shop.example.com/api/v1/licenses/deactivate", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
license_key: "7KQ2M-XW9PA-4TB8N-R2HDE",
instance_id: "inst_8fq2…",
}),
});
const result = await response.json();var request = URLRequest(url: URL(string: "https://shop.example.com/api/v1/licenses/deactivate")!)
request.httpMethod = "POST"
request.setValue("application/json", forHTTPHeaderField: "Content-Type")
request.httpBody = try JSONEncoder().encode([
"license_key": "7KQ2M-XW9PA-4TB8N-R2HDE",
"instance_id": "inst_8fq2…",
])
let (data, _) = try await URLSession.shared.data(for: request)import requests
result = requests.post("https://shop.example.com/api/v1/licenses/deactivate", json={
"license_key": "7KQ2M-XW9PA-4TB8N-R2HDE",
"instance_id": "inst_8fq2…",
}, timeout=10).json()Response
200 OK
{
"deactivated": true,
"error": null,
"license_key": {
"id": "lic_3k9x…",
"status": "active",
"key": "7KQ2M-XW9PA-4TB8N-R2HDE",
"activation_limit": 3,
"activation_usage": 0,
"created_at": "2026-11-17T09:51:52.000Z",
"expires_at": null
},
"meta": { "…": "…" }
}An instance that's already gone is 404 with deactivated: false; your app can treat that as done.
Note
Buyers can also free devices themselves at
https://shop.example.com/portal, and you can in the dashboard, so a lost laptop never strands a key.