---
title: "Read box file"
method: GET
path: "/boxes/{boxId}/fs/read"
tags: ["File System"]
---

# Read box file

`GET /boxes/{boxId}/fs/read`

Reads the contents of a file inside the box and returns it as a string. Supports absolute or relative paths, with `workingDir` as the base for relative paths.

## Path parameters

- `boxId` string, required

## Query parameters

- `workingDir` string
- `path` string, required

## Response `200`

Read file

- ReadFileResult — Response containing file content
  - `content` string, required — Content of the file

## Other responses

- `404` — File/dir not found
- `405` — Is a dir

---

[API](https://skmtc.dev/babelcloud/apis/gbox-open-api.md) · [All operations](https://skmtc.dev/babelcloud/apis/gbox-open-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/babelcloud/gbox-open-api/revisions/d655577fa915/schema)
