Delete Activation
Deletes an activation. There are two ways to call this endpoint, depending on where the request comes from. Both use the same URL — the difference is the keyzy-product-code header.
DELETE https://api.keyzy.io/v2/activations/{id}
Method 1 — Server-side, by activation ID
Use this from your backend or admin tooling to remove any activation by its id (the id returned by Get Activations).
Requires a write API key. Never embed a write key in a distributable application — anyone who extracts it could modify or delete your licenses. For in-app deactivation, use Method 2 instead.
Parameters
| Parameter | Description |
|---|---|
| id | id of the activation object |
Arguments
| Parameter | Description |
|---|---|
| app_id | An app_id that has write permission |
| api_key | An api_key that has write permission |
Method 2 — In-app, by serial number and device
Use this inside a distributable application to let it deactivate its own activation on the current device. The request is scoped to a single serial number on a single device (host_id), so it can only ever remove that one activation.
Works with a read API key. This is the same call the KEYZY client libraries make internally, so you can bake a read key into your app and never ship write credentials.
To select this method, send the keyzy-product-code header with your product code. When that header is present, the {id} segment of the URL is treated as the serial number.
Headers
| Header | Description |
|---|---|
| keyzy-product-code | Your product code |
Parameters
| Parameter | Description |
|---|---|
| serial | the serial number of the license (passed as {id} in the URL) |
Arguments
| Parameter | Description |
|---|---|
| app_id | An app_id that has read permission |
| api_key | An api_key that has read permission |
| host_id | The device whose activation should be removed (the same host_id used at activation / validation) |
Returns
Success
{
"message": "Activation successfully deleted."
}
Errors
You are not authorized
{
"error": {
"message": "You are not authorized!",
"status_code": 401
}
}
Activation does not exist
{
"error": {
"message": "Activation does not exist!",
"status_code": 404
}
}
Product does not exist (Method 2 — when the keyzy-product-code header does not match one of your products)
{
"error": {
"message": "Product does not exist!",
"status_code": 404
}
}
License does not exist (Method 2 — when the serial number is not found)
{
"error": {
"message": "License does not exist!",
"status_code": 404
}
}