# Seats and devices

A seat is a person who uses a license. A device is a computer or phone where your application runs. The [policy](../policies/) of a license decides whether a claim takes a seat, binds a device, or both.

## Binding

| The policy binds | A claim must send | A successful claim creates |
| --- | --- | --- |
| Neither | The license key | No seat and no device binding |
| Customers | The license key and a customer | A seat |
| Devices | The license key and a device | A device binding |
| Both | The license key, a customer and a device | A seat and a device binding |

- A claim without a required customer fails with the reason `customer_required`.
- A claim without a required device fails with the reason `device_required`.
- Seatify ignores the customer or the device if the policy does not bind it.
- If the policy binds both, each device binding belongs to the person who claimed the license from that device.

See [Claim a license](../../license-api/licenses/claim/).

## Seats

A seat connects one person to one license. The claim names the person with a customer reference. Use the user ID from your own system. An email address also works.

- The reference identifies a [customer](../customers/) in your account. If no customer has the reference, the claim creates the customer.
- The reference is case-sensitive, so `user-42` and `USER-42` are two different people.
- The claim can also send an email address and a name. Seatify writes these values only into empty properties of the customer. It never changes a value that is already set.
- A person holds one seat on a license. The same person can claim the license from several devices and still uses one seat.
- A seat has no lease. The seat stays until it is released in the dashboard. The License API cannot release a seat.
- Validate, heartbeat and release send a device. They do not name a person.

## Devices

The application identifies each device with a fingerprint. The fingerprint is a case-sensitive string. A claim, a validation, a heartbeat and a release all send the fingerprint.

A device can also have a hostname. The dashboard shows the device by this name.

- Send the same fingerprint each time. A different fingerprint is a different device.
- Seatify knows a device by its fingerprint across your whole account. One device can be bound to licenses of several products.
- A new claim from a device that is already bound returns the same binding. It does not use another device slot.
- Under a policy that binds devices, a validation from a device that has not claimed the license fails with `not_claimed`. A validation does not create a binding.
- If the policy binds devices, a license file is valid on one device only. See [License files](../licenses/#license-files).

## Limits

| Limit | What it counts | Policy setting that it needs |
| --- | --- | --- |
| Seat limit | The seats of the license. | Bind customers |
| Device limit | The devices that are bound to the license now. | Bind devices |

- An empty limit means that there is no limit. A limit is at least 1.
- A license can override both limits. See [License overrides](../policies/#license-overrides).
- A claim that needs a new seat when all seats are taken fails with `seat_limit_reached`.
- A claim from a new device when all device slots are taken fails with `device_limit_reached`.
- A refused claim does not change the seats or the device bindings.
- A device whose lease has ended does not count. See [Heartbeats and leases](#heartbeats-and-leases).

## Release

Your application calls [release](../../license-api/licenses/release/) with the license key and the device fingerprint. Call it when the user signs out or moves to another device.

- Release removes the device binding. The device slot is free immediately, and another device can claim the license.
- Release keeps the seat.
- Release keeps the device in your account, because the device can be bound to other licenses.
- Release also works on an expired or suspended license.
- If the device has no binding, release answers `released: false` with the reason `not_claimed`.

## Heartbeats and leases

If the policy requires heartbeats, each device binding has a lease. The lease lasts for the heartbeat interval plus the heartbeat grace. A claim starts the lease. Each [heartbeat](../../license-api/licenses/heartbeat/) starts it again.

- The responses to a claim and a heartbeat show when the lease ends. The end of the lease is not the expiry date of the license.
- When the lease ends, the device is released immediately. It no longer counts against the device limit.
- After that, validate and heartbeat fail with `not_claimed`. The application must claim the license again, and the claim checks the device limit again.
- A heartbeat fails with `heartbeat_not_required` if the policy does not require heartbeats.
- Seats have no lease. A heartbeat keeps only the device binding.

## Floating devices

A floating license lets a group of users share a fixed number of devices. Seatify has no separate setting for it. You build it from a device limit and heartbeats:

1. The policy binds devices, sets a device limit and requires heartbeats.
2. The application claims the license when it starts, and it sends heartbeats while it runs.
3. The application calls release when it closes. The slot is free immediately.
4. If the application stops without a release, the slot is free when the lease ends.

Seats do not float. A seat stays until it is released in the dashboard. See [Licensing models](../../guides/licensing/licensing-models/).

## Suspension and deletion

- A suspended license keeps its seats and device bindings. Release still works.
- If the policy requires heartbeats, heartbeats fail during a suspension. When the lease of a device ends, that device is released.
- Deleting a license deletes its seats and device bindings too.

See [Suspension](../licenses/#suspension) and [Deletion](../licenses/#deletion).

