Release a license
Removes the binding of the current device from a license. The device slot is then free for another device.
POST /v1/licenses/release
When to release
Release the license when the user signs out, or when the user moves the license to another device. Then remove the stored license key from the device.
If your application stops without a release and the policy requires heartbeats, Seatify releases the device when its lease ends. See Heartbeats and leases.
If the device is lost, release its binding in the dashboard.
Validity
A release does not check the license. It also works on an expired or suspended license. So a user can always move the license to a new device.
Effects
- The device binding is removed. The device slot is free immediately, and another device can claim the license.
- The seat stays. The License API cannot release a seat. See Seats.
- The device stays in your account, because it can be bound to other licenses.
- The processes of the device end. See Concurrent runs.
- A license file that the device checked out keeps working until it expires. See Devices with no internet.
- Seatify records each release in the activity of the license, a refused one too. See Activity.
Authentication
Send the publishable key of the product. See Authentication.
Request
| Header | Required | Description |
|---|---|---|
Seatify-Publishable-Key | Yes | The publishable key of the product. |
Content-Type | Yes | Always application/json. |
Seatify-Nonce | No | A new random value that the signature includes. See Signed responses. |
Seatify-Signing-Key | No | The key ID of the signing key in your application. See Signed responses. |
| Field | Type | Required | Description |
|---|---|---|---|
key | string | Yes | The license key. |
device | object | Yes | The device to release. A release always needs the device, whatever the policy. |
The device object has these fields:
| Field | Type | Required | Description |
|---|---|---|---|
fingerprint | string | Yes | The fingerprint that the device sent in its claim. The fingerprint is case-sensitive. See Devices. |
hostname | string | No | The name of the device. A release does not use the name. So your application can send the same device object as in the claim. |
A device object with no values counts as a missing device.
Response
The answer is not a license check object. It has only these fields:
| Field | Type | Description |
|---|---|---|
released | boolean | true if Seatify removed the device binding. |
reason | string | The cause when released is false. It is null when released is true. |
The answer does not show the state of the license. Validate the license to get it.
Reasons
A refused release answers with the status 200, released set to false and a reason. The refused release does not change the license, its seats or its devices.
| Reason | Description |
|---|---|
license_not_found | No license has this key. |
product_mismatch | The license belongs to another product. |
not_claimed | The device has no binding on this license. The device never claimed the license, it was released before, or its heartbeat lease has ended. It is also the answer when the policy does not bind devices. |
After not_claimed, the device holds no slot. Your application can remove the stored key as after a successful release.
See Reasons.
Errors
| Status | Reason | Description |
|---|---|---|
| 400 | The request body could not be read. | The body is not valid JSON. |
| 400 | The submitted details are not valid. | A field is not valid. The errors field names it. See the table below. |
| 400 | The signing key is not known. | Your organization has no signing key with the ID in Seatify-Signing-Key. |
| 400 | The nonce must be at most 255 characters. | The value of Seatify-Nonce is too long. |
| 401 | A publishable key is required. | The request has no Seatify-Publishable-Key header, or the header is empty. |
| 401 | The publishable key is not valid. | No product has this key. |
| 429 | There are too many requests. Try again later. | See Rate limits. |
These fields can be in errors:
| Field | Description |
|---|---|
key | The license key is missing or too long. |
device | The request has no device. |
device.fingerprint | The device object has no fingerprint, or the fingerprint is too long. |
device.hostname | The hostname is too long. |
See Errors.
Example
curl https://license.seatify.dev/v1/licenses/release \
-H "Seatify-Publishable-Key: $SEATIFY_PUBLISHABLE_KEY" \
-H "Content-Type: application/json" \
--data @- <<EOF
{
"key": "$LICENSE_KEY",
"device": { "fingerprint": "$DEVICE_FINGERPRINT" }
}
EOF{
"released": true,
"reason": null
}