> ## 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.

# Download a file from sandbox

> Downloads a file as binary content Served by the live controller (answers 401 unauthenticated) but absent from its published /openapi.json — verified…

Downloads a file as binary content

Served by the live controller (answers 401 unauthenticated) but absent from its published `/openapi.json` — verified 2026-08-31.

### Path parameters

<ParamField path="id" 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

Returns `application/octet-stream` — File binary content.

### Status codes

| Code  | Meaning             |
| ----- | ------------------- |
| `200` | File binary content |

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

<ResponseExample>
  ```json 200 theme={null}
  "string"
  ```
</ResponseExample>
