> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stateset.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Read a file from sandbox

> Returns the content of a file from the sandbox (base64 encoded)

Returns the content of a file from the sandbox (base64 encoded)

### Path parameters

<ParamField path="sandboxId" type="string (uuid)" required>
  Unique sandbox identifier
</ParamField>

### Query parameters

<ParamField query="path" type="string" required>
  Path to the file in the sandbox
</ParamField>

### Response

`FileContent`

<ResponseField name="path" type="string" />

<ResponseField name="content" type="string (byte)">
  Base64-encoded file content
</ResponseField>

<ResponseField name="size" type="integer">
  File size in bytes
</ResponseField>

### Status codes

| Code  | Meaning      |
| ----- | ------------ |
| `200` | File content |
| `404` | —            |

<RequestExample>
  ```bash cURL theme={null}
  curl --request GET \
    --url 'https://api.sandbox.stateset.app/api/v1/sandbox/{sandboxId}/files' \
    --header 'Authorization: Bearer YOUR_API_KEY'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "path": "string",
    "content": "string",
    "size": 1
  }
  ```
</ResponseExample>
