---
title: "Contexts"
description: "Persistent browser contexts."
---

> Documentation Index
> Fetch the complete documentation index at: https://help.tooluse.net/llms.txt
> Use this file to discover all available pages before exploring further.

# Contexts

<p>Contexts preserve encrypted browser profile state between sessions when the deployment has Credential Broker and private R2 storage configured. Without that configuration, the API returns <code>503 context_storage_unavailable</code>. The Cloudflare Containers transport currently refuses contexts.</p>
<pre><code class="language-bash">curl -X POST "https://api.tooluse.net/v1/browsers/contexts" \
  -H "Authorization: Bearer $TOOLUSE_API_KEY" \
  -H "Idempotency-Key: tooluse-example-001" \
  -H "Content-Type: application/json" \
  -d '{"name":"checkout-profile"}'
</code></pre>
<p>Keep the returned context ID and supply it as the top-level <code>contextId</code> in a later session creation request. A context is exclusively leased while in use; a concurrent session cannot reuse it. Read and delete it through <code>GET /v1/browsers/contexts/{id}</code> and <code>DELETE /v1/browsers/contexts/{id}</code>. The service owns encryption keys; no plaintext profile or client-side key is returned.</p>

Source: https://help.tooluse.net/browsers/core-features/contexts/index.mdx
