Create a Context

post/v1/contexts

Request body

projectIdstring

The Project ID. Can be found in Settings. Optional - if not provided, the project will be inferred from the API key.

namestring

Optional user-defined name for the Context. Leading and trailing whitespace is trimmed before storage. Names are unique within the project among active Contexts, compared case-insensitively.

Response

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

idstring required
uploadUrlstring required

Deprecated. Browserbase no longer supports context uploads via the API; this field always contains a non-functional sentinel URL and remains only for backwards compatibility.

publicKeystring required

The public key to encrypt the user-data-directory.

cipherAlgorithmstring required

The cipher algorithm used to encrypt the user-data-directory. AES-256-CBC is currently the only supported algorithm.

initializationVectorSizeinteger required

The initialization vector size used to encrypt the user-data-directory. Read more about how to use it.

Changes