---
title: "Create a Context"
method: POST
path: "/v1/contexts"
---

# Create a Context

`POST /v1/contexts`

## Request body

- object
  - `projectId` string — The Project ID. Can be found in [Settings](https://www.browserbase.com/settings). Optional - if not provided, the project will be inferred from the API key.

## Response `201`

The request has succeeded and a new resource has been created as a result.

- object
  - `id` string, required
  - `uploadUrl` string, required — An upload URL to upload a custom user-data-directory.
  - `publicKey` string, required — The public key to encrypt the user-data-directory.
  - `cipherAlgorithm` string, required — The cipher algorithm used to encrypt the user-data-directory. AES-256-CBC is currently the only supported algorithm.
  - `initializationVectorSize` integer, required — The initialization vector size used to encrypt the user-data-directory. [Read more about how to use it](/features/contexts).

---

[API](https://skmtc.net/browserbase/apis/browserbase-api.md) · [All operations](https://skmtc.net/browserbase/apis/browserbase-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/browserbase/browserbase-api/versions/832b22144edf/schema)
