Skip to main content
POST
/
workspaces
/
{workspace_id}
/
files
/
upload
Upload Workspace Files
const options = {
  method: 'POST',
  headers: {'X-Browser-Use-API-Key': '<api-key>', 'Content-Type': 'application/json'},
  body: JSON.stringify({files: [{name: '<string>', contentType: 'application/octet-stream', size: 2}]})
};

fetch('https://api.browser-use.com/api/v3/workspaces/{workspace_id}/files/upload', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
{
  "files": [
    {
      "name": "<string>",
      "uploadUrl": "<string>",
      "path": "<string>"
    }
  ]
}

Authorizations

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

Path Parameters

workspace_id
string<uuid>
required

Query Parameters

prefix
string
default:""

Directory prefix to upload into (e.g. "uploads/")

Body

application/json

Request body for generating presigned upload URLs.

files
FileUploadItem · object[]
required
Required array length: 1 - 10 elements

Response

Successful Response

Presigned upload URLs for the requested files.

files
FileUploadResponseItem · object[]
required