---
title: "Get project files"
method: GET
path: "/projects/{projectId}/files"
tags: ["Projects"]
---

# Get project files

`GET /projects/{projectId}/files`

## Request

- Base URL: `https://api.grapesjs.com/v1`
- URL: `https://api.grapesjs.com/v1/projects/{projectId}/files`
- Auth: HTTP bearer

Returns the stored text-based files generated by the editor for a project.

## Response `200`

Project files fetched successfully

- ProjectFilesResponse
  - `files` StoredProjectFile[], required: Stored text-based files generated by the editor.
    - `path` string: Optional directory path containing the file.
    - `pathname` string, required: Canonical file path, including the file name.
    - `filename` string, required: File name.
    - `mimeType` string, required: MIME type of the file contents.
    - `content` string, required: Text contents of the file.

## Other responses

- `400`: Invalid request
- `401`: Unauthorized
- `404`: Resource not found
- `500`: Server error

---

[API](https://skmtc.dev/grapesjs/apis/studio-platform-api.md) - [All operations](https://skmtc.dev/grapesjs/apis/studio-platform-api/llms.txt) - [OpenAPI document](https://skmtc.dev/grapesjs/apis/studio-platform-api/revisions/acc4ffe35e2d?raw)
