---
title: "End a session"
method: DELETE
path: "/sessions/{sid}"
tags: ["Sessions"]
---

# End a session

`DELETE /sessions/{sid}`

## Request

- Base URL: `https://api.phone-harness.com`
- URL: `https://api.phone-harness.com/sessions/{sid}`
- Auth: HTTP bearer

Request closure of an owned session. New API operations stop and billable use ends at recorded closure. Capacity stays occupied until cleanup is confirmed. Repeating after the session is removed may return 404; use the create receipt to confirm cleanup.

## Path parameters

- `sid` string, required

## Response `200`

Cleanup confirmed.

- Release
  - `released` boolean, required: True only when cleanup was confirmed by this response.
  - `cleanup_pending` boolean, required

## Other responses

- `202`: Closure accepted; cleanup is pending.
- `401`: Bad or missing bearer credential.
- `403`: Account access denied or rental access unavailable.
- `404`: No live session visible to the caller.
- `500`: Unexpected service error.

---

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