---
title: "List Deployment Files"
method: GET
path: "/v6/deployments/{id}/files"
tags: ["deployments"]
---

# List Deployment Files

`GET /v6/deployments/{id}/files`

Allows to retrieve the file structure of the source code of a deployment by supplying the deployment unique identifier. If the deployment was created with the Vercel CLI or the API directly with the `files` key, it will have a file tree that can be retrievable.

## Path parameters

- `id` string, required — The unique deployment identifier

## Query parameters

- `teamId` string
- `slug` string

## Response `200`

Retrieved the file tree successfully

- FileTree[]
  - `name` string, required — The name of the file tree entry
  - `type` 'directory' | 'file' | 'invalid' | 'lambda' | 'middleware' | 'symlink', required — String indicating the type of file tree entry.
  - `uid` string — The unique identifier of the file (only valid for the `file` type)
  - `children` FileTree[] — The list of children files of the directory (only valid for the `directory` type)
  - `contentType` string — The content-type of the file (only valid for the `file` type)
  - `mode` number, required — The file "mode" indicating file type and permissions.

## Other responses

- `400` — One of the provided values in the request query is invalid.
- `401` — The request is not authorized.
- `403` — You do not have permission to access this resource.
- `404` — File tree not found Deployment not found
- `410`

---

[API](https://skmtc.net/vercel/apis/api.md) · [All operations](https://skmtc.net/vercel/apis/api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/vercel/api/versions/61d1ba3f6dac/schema)
