---
title: "Close and release a device session"
method: DELETE
path: "/sessions/{sessionId}"
tags: ["Session Lifecycle"]
---

# Close and release a device session

`DELETE /sessions/{sessionId}`

## Request

- Base URL: `https://api.us-west-1.saucelabs.com/rdc/v2`
- URL: `https://api.us-west-1.saucelabs.com/rdc/v2/sessions/{sessionId}`
- Auth: HTTP basic
- TypeScript: <https://skmtc.dev/saucelabs/apis/real-device-access-api-reference/docs/sessions/:sessionId/delete.ts> (a function with typed inputs; its response is checked against the schema)

Closes an active device session and releases the device back to the pool. The session transitions to CLOSING state
and then CLOSED. For private devices, set rebootDevice to true to reboot the device after release. Once closed,
the session cannot be reused — create a new session to continue testing.

## Path parameters

- `sessionId` string, required

## Query parameters

- `rebootDevice` boolean

## Response `200`

Session is closing

- object
  - `sessionId` string: Unique id of device session
  - `state` 'PENDING' | 'CREATING' | 'ACTIVE' | 'CLOSING' | 'CLOSED' | 'ERRORED'

## Other responses

- `400`: Bad Request
- `403`: Device reboot not available on public devices
- `404`: Not Found

---

[API](https://skmtc.dev/saucelabs/apis/real-device-access-api-reference.md) - [All operations](https://skmtc.dev/saucelabs/apis/real-device-access-api-reference/llms.txt) - [OpenAPI document](https://skmtc.dev/saucelabs/apis/real-device-access-api-reference/revisions/f845a4b66e37?raw)
