# Upload raw file bytes

Source: <https://everruns.com/docs/api/operations/upload_path/>

[Docs](https://everruns.com/docs/)/[API reference](https://everruns.com/docs/api/)/[Sessions & workspaces](https://everruns.com/docs/api/groups/sessions-workspaces/)/Upload raw file bytes

# Upload raw file bytes

Preview

Creates or replaces the file with the request body, streamed to storage, so files larger than the JSON API carries (recordings, media) can be uploaded. Parent directories are created as needed.

Public APIEverruns Cloud and self-hosted Platform

PUT`/v1/workspaces/{workspace_id}/fs/_/upload/{path}`

See [authentication](https://everruns.com/docs/sre/runbooks/authentication/) for credentials and permissions.

## Parameters

### Path Parameters

**workspace_id**

required

string

Workspace ID (wsp\_<32-hex>)

**path**

required

string

File path. Wildcard route: nested paths are literal `/`-separated segments, not a single URL-encoded value.

## Request Bodyrequired

Raw file bytes

Media typeapplication/octet-stream

Array\<integer>

## Responses

200File written

### 200

File written

Media typeapplication/json

Stored file metadata (no binary data).

object

**content_type**

required

MIME type of the stored file: application/pdf or application/zip.

string

**created_at**

required

Upload timestamp.

string format: date-time

**filename**

Original filename supplied at upload, if known.

string | null

**id**

required

string

**metadata**

required

Caller-supplied metadata captured at upload.

object

**size_bytes**

required

Size of the stored file in bytes.

integer format: int64

### Example

```json
{
  "content_type": "application/pdf",
  "created_at": "2026-01-04T11:23:00Z",
  "filename": "report.pdf",
  "id": "file_01933b5a00007000800000000000001",
  "size_bytes": 1048576
}
```

400Invalid path, or the path is a directory or a mounted folder

### 400

Invalid path, or the path is a directory or a mounted folder

403File or workspace is read-only

### 403

File or workspace is read-only

413File or session storage limit exceeded

### 413

File or session storage limit exceeded

FetchcURL

Request

```js
const url = 'https://app.everruns.com/api/v1/workspaces/example/fs/_/upload/example';
const options = {
  method: 'PUT',
  headers: {'Content-Type': 'application/octet-stream'},
  body: '[ 1 ]'
};


try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

Request

```sh
curl --request PUT \
  --url https://app.everruns.com/api/v1/workspaces/example/fs/_/upload/example \
  --header 'Content-Type: application/octet-stream' \
  --data '[ 1 ]'
```

Additional language examples require JavaScript. The default request example is available above.

200400403413

200 · File written

```json
{
  "content_type": "application/pdf",
  "created_at": "2026-01-04T11:23:00Z",
  "filename": "report.pdf",
  "id": "file_01933b5a00007000800000000000001",
  "metadata": {},
  "size_bytes": 1048576
}
```

400 · Invalid path, or the path is a directory or a mounted folder

No response body example is declared for this status.

403 · File or workspace is read-only

No response body example is declared for this status.

413 · File or session storage limit exceeded

No response body example is declared for this status.

## Matching endpoints