---
title: "browser_close_all_contexts | Owl Browser API"
description: "Close ALL browser contexts at once and reclaim the entire context pool."
canonical: https://owlbrowser.net/docs/browser_close_all_contexts/
---
Find a tool

[Context](https://owlbrowser.net/docs/#context)

# browser_close_all_contexts

Close ALL browser contexts at once and reclaim the entire context pool.

Emergency recovery for when the context limit is reached but contexts are orphaned or unresponsive. Returns the number of contexts closed.

POST /execute/browser_close_all_contexts no context needed 0 parameters, 0 required

Before you run it

Closes every context on the server, including other clients' contexts.

## Usage notes

- Use with care: this terminates every active session.

## Parameters

No parameters. Send an empty JSON object (`{}`) as the body.

## Request

`POST /execute/browser_close_all_contexts` (`/api/execute/browser_close_all_contexts` via the container). No browser context is needed. Setup: [quick start](https://owlbrowser.net/docs/#quick-start). SDK guides: [Node.js](https://owlbrowser.net/node-sdk/), [Python](https://owlbrowser.net/python-sdk/).

```bash
curl -s -X POST "$OWL_URL/execute/browser_close_all_contexts" -H "$AUTH" -H "$JSON" \
  -d '{}'; echo
```

## Response

The OpenAPI document does not describe this tool's result, and we did not publish a captured one because the call needs the setup described above. Envelope and errors: [responses and errors](https://owlbrowser.net/docs/#responses).
