---
title: "Close a session"
method: POST
path: "/v1/browser_sessions/{browser_session_id}/close"
tags: ["Browser Sessions"]
---

# Close a session

`POST /v1/browser_sessions/{browser_session_id}/close`

Close a session. Once closed, the session cannot be used again.

## Path parameters

- `browser_session_id` string, required — The ID of the browser session to close. completed_at will be set when the browser session is closed. browser_session_id starts with `pbs_`

## Headers

- `x-api-key` string, nullable — Skyvern API key for authentication. API key can be found at https://app.skyvern.com/settings.

## Response `200`

Successfully closed browser session

- unknown

## Other responses

- `403` — Unauthorized - Invalid or missing authentication
- `404` — Browser session not found
- `422` — Validation Error

## Changes

- **2026-07-12** `3c39ee1fef00` — 1 info
  - added the non-success response with the status `404`
- **2026-06-08** `3a3616091b66` — 4 info
  - `header` request parameter `x-api-key` list-of-types was widened by adding types `null`
  - for the `header` request parameter `x-api-key`, the type was generalized from `string` to no type
  - added the optional property `detail/items/ctx` to the response with the `422` status
  - added the optional property `detail/items/input` to the response with the `422` status
- **2026-02-04** `a8899e7707c4` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/skyvern-ai/apis/skyvern-api-2/changes/v1/browser_sessions/:browser_session_id/close/post.md)

---

[API](https://skmtc.dev/skyvern-ai/apis/skyvern-api-2.md) · [All operations](https://skmtc.dev/skyvern-ai/apis/skyvern-api-2/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/skyvern-ai/skyvern-api-2/revisions/d9771d57ea65/schema)
