# Processes

These endpoints report each copy of your application that runs on a device. Seatify uses them to count the concurrent runs and to enforce the process limit. This page describes the objects and the reasons that the endpoints share.

## Endpoints

| Endpoint | Path | Description |
| --- | --- | --- |
| [Spawn](spawn/) | `POST /v1/processes/spawn` | Registers a copy of your application and starts its lease. |
| [Heartbeat](heartbeat/) | `POST /v1/processes/heartbeat` | Starts the lease of the process again. |
| [Exit](exit/) | `POST /v1/processes/exit` | Removes the process. The slot is free immediately. |

The endpoints work only when the policy tracks processes. A process interval on the policy turns on process tracking. See [Concurrent runs](../../concepts/concurrent-runs/).

## Order of calls

1. Claim the license on the device. See [Claim a license](../licenses/claim/).
2. Spawn the process each time your application starts.
3. Send a process heartbeat once in each process interval while your application runs.
4. Report the exit when your application closes.

Send the same license key, fingerprint and process ID in all three process calls. See [Limit concurrent runs](../../guides/licensing/limit-concurrent-runs/).

## Process object

Spawn and heartbeat answer with a [license check object](../licenses/#license-check-object). Its `process` field holds the process:

| Field | Type | Description |
| --- | --- | --- |
| `id` | string | The ID of the process. |
| `pid` | string | The process ID that your application sent. |
| `expires_at` | string | The end of the process lease. It always has a value. |

The `process` field is null when `valid` is `false`.

The `process_heartbeat` field holds the process settings of the policy. See [Process heartbeat](../licenses/#process-heartbeat). When the answer has a device, `limits.max_processes` is the limit that applies to that device.

Exit does not answer with a license check object. See [End a process](exit/).

## Refused answers

A refused spawn or heartbeat answers with the status 200, `valid` set to `false` and a reason. The fields follow the rules in [Refused answers](../licenses/#refused-answers), with one difference:

- For `process_limit_reached` and `process_not_spawned`, the device has a binding. So `device` holds the binding, and `limits.max_processes` is the limit of this device.

`process` is null, and `entitlements` is empty in every refusal.

```json
{
  "valid": false,
  "status": "active",
  "expired": false,
  "reason": "process_not_spawned",
  "license": {
    "id": "<license id>",
    "name": "CIRRUS Team Floating Devices #0007",
    "expires_at": "2026-12-20T00:00:00Z",
    "activated_at": "2026-01-22T01:50:56Z"
  },
  "entitlements": [],
  "limits": {
    "max_devices": 50,
    "max_seats": 25,
    "max_processes": 4
  },
  "device": {
    "id": "<device binding id>",
    "expires_at": "2026-09-26T14:50:43Z"
  },
  "heartbeat": {
    "required": true,
    "interval_seconds": 3600,
    "grace_seconds": 1800
  },
  "process": null,
  "process_heartbeat": {
    "tracked": true,
    "interval_seconds": 300,
    "grace_seconds": 120
  }
}
```

## Reasons

| Reason | Endpoints | Description |
| --- | --- | --- |
| `license_not_found` | All | No license has this key. |
| `product_mismatch` | All | The license belongs to another product than the publishable key. |
| `suspended` | Spawn, heartbeat | The license is suspended. |
| `expired` | Spawn, heartbeat | The license has expired, and the policy uses Expire. |
| `process_tracking_not_enabled` | Spawn, heartbeat | The policy has no process interval. |
| `not_claimed` | All | The device has no binding on this license. The device never claimed the license, it was released, or its heartbeat lease has ended. |
| `process_limit_reached` | Spawn | All process slots of the device are taken. |
| `process_not_spawned` | Heartbeat, exit | The device has no running process with this process ID. The process was never spawned, it exited, or its lease has ended. |

See [Reasons](../licenses/#reasons) for the reasons of the license endpoints.

