---
updatedAt: 2025-09-17T01:47:58.000Z
agentTools:
  projectIndex: https://docs.biot-med.com/llms.txt
---

# Stop a Session

The device can stop a session by calling the [Update Usage Session](https://docs.biot-med.com/reference/updatesession) API.

To call the Update Usage Session API, the device needs to set the following fields:

* `_endTime` - Define end time of the session
* `_summary._state` - Set to `DONE`
* `_summary._stopReason` - Define the string as needed
* `_stopReasonCode` - Set as `COMPLETION` or `GENERAL_DEVICE_ERROR`.

For Example:

```
{
  "_endTime": "2022-07-28T14:02:26.199Z",
  "_state": "DONE",
  "_summary": {
    "_stopReason": "Manual Stop",
    "_stopReasonCode": "COMPLETION"
  }
}
```