---
title: "Close the open session (30 s grace before sleep)"
method: POST
path: "/api/v1/computers/{computer_id}/sessions/close"
tags: ["computers"]
---

# Close the open session (30 s grace before sleep)

`POST /api/v1/computers/{computer_id}/sessions/close`

## Request

- Base URL: `https://api.maritime.sh` (the document declares no server; this is the origin it was published from)
- URL: `https://api.maritime.sh/api/v1/computers/{computer_id}/sessions/close`
- Auth: HTTP bearer

## Path parameters

- `computer_id` string, required

## Response `200`

Successful Response

- SessionOut
  - `id` string, required
  - `computerId` string, required
  - `startedAt` string, date-time, required
  - `lastActionAt` string, date-time, required
  - `endedAt` string, date-time, nullable
  - `wallSeconds` integer
  - `actions` integer
  - `screenshots` integer
  - `bytesOut` integer
  - `invocationsCharged` integer
  - `endReason` string, nullable
  - `client` string, nullable
  - `modelHint` string, nullable
  - `graceUntil` string, date-time, nullable

## Other responses

- `204`: No open session
- `402`: Plan or quota refusal
- `409`: A person is in control of the computer
- `422`: Validation Error
- `503`: Computers disabled or no capacity

---

[API](https://skmtc.dev/maritime/apis/maritime-api.md) - [All operations](https://skmtc.dev/maritime/apis/maritime-api/llms.txt) - [OpenAPI document](https://skmtc.dev/maritime/apis/maritime-api/revisions/acd712090ad6?raw)
