---
title: "Read a file from the sandbox"
method: GET
path: "/v1/stacks/{id}/read-file"
tags: ["Stacks"]
---

# Read a file from the sandbox

`GET /v1/stacks/{id}/read-file`

Reads file content from inside the sandbox (using exec under the hood)

## Path parameters

- `id` string, required — Stack identifier

## Query parameters

- `path` string, required — Absolute path inside the sandbox

## Response `200`

File content

- object
  - `path` string, required
  - `content` string, required

## Other responses

- `404` — Sandbox or file not found

## Changes

- **2025-11-06** `8510caff5164` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/benchify/apis/benchify-api/changes/v1/stacks/:id/read-file/get.md)

---

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