---
title: "Download a directory as a ZIP archive"
method: GET
path: "/browsers/{id_or_name}/fs/download_dir_zip"
tags: ["Browser Filesystem"]
---

# Download a directory as a ZIP archive

`GET /browsers/{id_or_name}/fs/download_dir_zip`

## Request

- Base URL: `https://api.onkernel.com`
- URL: `https://api.onkernel.com/browsers/{id_or_name}/fs/download_dir_zip`
- Auth: HTTP bearer

Returns a ZIP file containing the contents of the specified directory.

## Path parameters

- `id_or_name` string, required

## Query parameters

- `path` string, required

## Response `200`

ZIP archive of the requested directory

## Other responses

- `400`: Bad Request – invalid input
- `403`: Forbidden – insufficient permissions or plan
- `404`: Resource not found
- `500`: Internal Server Error
- `default`: Error returned by the browser or its proxy

---

[API](https://skmtc.dev/onkernel/apis/kernel-api.md) - [All operations](https://skmtc.dev/onkernel/apis/kernel-api/llms.txt) - [OpenAPI document](https://skmtc.dev/onkernel/apis/kernel-api/revisions/0f6cf4f58fe6?raw)
