Skip to content

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

HeaderRequiredDescription
Seatify-Publishable-KeyYesThe publishable key of the product.
Content-TypeYesAlways application/json.
Seatify-NonceNoA new random value that the signature includes. See Signed responses.
Seatify-Signing-KeyNoThe key ID of the signing key in your application. See Signed responses.
FieldTypeRequiredDescription
keystringYesThe license key.
deviceobjectYesThe device to release. A release always needs the device, whatever the policy.

The device object has these fields:

FieldTypeRequiredDescription
fingerprintstringYesThe fingerprint that the device sent in its claim. The fingerprint is case-sensitive. See Devices.
hostnamestringNoThe 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:

FieldTypeDescription
releasedbooleantrue if Seatify removed the device binding.
reasonstringThe 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.

ReasonDescription
license_not_foundNo license has this key.
product_mismatchThe license belongs to another product.
not_claimedThe 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

StatusReasonDescription
400The request body could not be read.The body is not valid JSON.
400The submitted details are not valid.A field is not valid. The errors field names it. See the table below.
400The signing key is not known.Your organization has no signing key with the ID in Seatify-Signing-Key.
400The nonce must be at most 255 characters.The value of Seatify-Nonce is too long.
401A publishable key is required.The request has no Seatify-Publishable-Key header, or the header is empty.
401The publishable key is not valid.No product has this key.
429There are too many requests. Try again later.See Rate limits.

These fields can be in errors:

FieldDescription
keyThe license key is missing or too long.
deviceThe request has no device.
device.fingerprintThe device object has no fingerprint, or the fingerprint is too long.
device.hostnameThe 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
}