Skip to main content
POST
/
workspaces
Create Workspace
const options = {
  method: 'POST',
  headers: {'X-Browser-Use-API-Key': '<api-key>', 'Content-Type': 'application/json'},
  body: JSON.stringify({name: '<string>'})
};

fetch('https://api.browser-use.com/api/v4/workspaces', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
curl --request POST \
--url https://api.browser-use.com/api/v4/workspaces \
--header 'Content-Type: application/json' \
--header 'X-Browser-Use-API-Key: <api-key>' \
--data '
{
"name": "<string>"
}
'
import requests

url = "https://api.browser-use.com/api/v4/workspaces"

payload = { "name": "<string>" }
headers = {
"X-Browser-Use-API-Key": "<api-key>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "archived": true,
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z",
  "name": "<string>"
}
{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}

Authorizations

X-Browser-Use-API-Key
string
header
required

Body

application/json
name
string | null
Maximum string length: 255

Response

Successful Response

id
string<uuid>
required
archived
boolean
required
createdAt
string<date-time>
required
updatedAt
string<date-time>
required
name
string | null