---
updatedAt: 2026-06-12T20:00:32.000Z
agentTools:
  projectIndex: https://layer-api.readme.io/llms.txt
---

# Get Files

This operation can be used to retrieve the list of all files for a project.

# OpenAPI definition

```json
{
  "openapi": "3.0.3",
  "info": {
    "termsOfService": "https://layer.team/terms-of-service",
    "title": "Layer API",
    "version": "0.3.0",
    "x-logo": {
      "altText": "Layer logo",
      "url": "https://layer.team/wp-content/themes/lessis/images/assets/layer-logo-footer.png"
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "bearerFormat": "JWT",
        "scheme": "bearer",
        "type": "http"
      }
    }
  },
  "paths": {
    "/projects/{projectId}/files": {
      "get": {
        "operationId": "getProjectFiles",
        "summary": "Get Files",
        "tags": [
          "Files"
        ],
        "description": "This operation can be used to retrieve the list of all files for a project.",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "elementId",
            "required": false,
            "description": "Include only files linked to a specific element"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "fieldId",
            "required": false,
            "description": "Include only files linked to a specific field"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "projectId",
            "required": true,
            "description": "Project ID"
          }
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "List of Layer Project Files",
            "content": {
              "application/json": {
                "schema": {
                  "description": "List of Layer Project Files",
                  "type": "object",
                  "required": [
                    "files",
                    "total"
                  ],
                  "properties": {
                    "files": {
                      "description": "List of Layer Project Files",
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "createdAt",
                          "createdBy",
                          "drawingViewFile",
                          "element",
                          "field",
                          "fileType",
                          "id",
                          "metadata",
                          "name",
                          "stage",
                          "status",
                          "updatedAt",
                          "updatedBy",
                          "urls"
                        ],
                        "properties": {
                          "caption": {
                            "description": "File caption",
                            "type": "string"
                          },
                          "createdAt": {
                            "description": "Date the file was created",
                            "format": "date-time",
                            "type": "string"
                          },
                          "createdBy": {
                            "description": "Name of the user who created the file",
                            "type": "string"
                          },
                          "drawingViewFile": {
                            "description": "Boolean value indicating that the file is being use as a drawing view file",
                            "type": "boolean"
                          },
                          "element": {
                            "nullable": true,
                            "type": "object",
                            "required": [
                              "id",
                              "name"
                            ],
                            "properties": {
                              "id": {
                                "description": "Element ID",
                                "type": "string"
                              },
                              "name": {
                                "description": "Element name",
                                "type": "string"
                              }
                            }
                          },
                          "field": {
                            "nullable": true,
                            "type": "object",
                            "required": [
                              "id",
                              "name"
                            ],
                            "properties": {
                              "id": {
                                "description": "Field ID",
                                "type": "string"
                              },
                              "name": {
                                "description": "Field name",
                                "type": "string"
                              }
                            }
                          },
                          "fileSize": {
                            "description": "Size of the file in KB",
                            "type": "number"
                          },
                          "fileType": {
                            "description": "Type of the file from the extension",
                            "type": "string"
                          },
                          "id": {
                            "type": "string"
                          },
                          "isMobileOptimized": {
                            "description": "Boolean value indicating that a mobile-optimized PDF is enabled for this file",
                            "type": "boolean"
                          },
                          "metadata": {
                            "description": "Additional file data.",
                            "type": "object",
                            "required": [
                              "UsePanoramaViewer"
                            ],
                            "properties": {
                              "UsePanoramaViewer": {
                                "description": "Flag to determine use of the 360 panorama viewer in Layer",
                                "type": "boolean"
                              }
                            }
                          },
                          "name": {
                            "description": "Name of the file",
                            "type": "string"
                          },
                          "optimizedFullUrl": {
                            "description": "URL to the mobile-optimized full-size PDF",
                            "type": "string"
                          },
                          "stage": {
                            "description": "Indicates the current processing stage of the file",
                            "enum": [
                              [
                                "COMPLETE",
                                "ERROR",
                                "LOCAL",
                                "processed",
                                "PROCESSING",
                                "UPLOADING"
                              ]
                            ],
                            "type": "string"
                          },
                          "status": {
                            "description": "File status",
                            "enum": [
                              "active",
                              "archived"
                            ],
                            "type": "string"
                          },
                          "updatedAt": {
                            "description": "Date & time the file was last updated",
                            "format": "date-time",
                            "type": "string"
                          },
                          "updatedBy": {
                            "description": "Name of the user who last updated the file",
                            "type": "string"
                          },
                          "urls": {
                            "description": "Set of storage URLs where the original file and generated thumbnails reside. Only available once the file's status has moved from PROCESSING to COMPLETE",
                            "type": "object",
                            "properties": {
                              "full": {
                                "description": "URL to the full size file",
                                "type": "string"
                              },
                              "thumb256": {
                                "description": "URL to a 256px thumbnail for the file",
                                "type": "string"
                              },
                              "thumb512": {
                                "description": "URL to a 512px thumbnail for the file",
                                "type": "string"
                              },
                              "thumb64": {
                                "description": "URL to a 64px thumbnail for the file",
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    },
                    "total": {
                      "description": "Total number of files in the response",
                      "type": "number"
                    }
                  }
                }
              }
            }
          },
          "413": {
            "description": "Response payload exceeded the configured size limit for this API.",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Response payload exceeded the configured size limit for this API.",
                  "properties": {
                    "code": {
                      "description": "Stable machine-readable error code.",
                      "type": "string"
                    },
                    "error": {
                      "description": "Human-readable error message.",
                      "type": "string"
                    }
                  },
                  "required": [
                    "code",
                    "error"
                  ],
                  "type": "object"
                }
              }
            }
          },
          "4XX": {
            "description": "Default error response.",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Default error response.",
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "description": "Human-readable error message.",
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "servers": [
    {
      "url": "https://api.layer.team"
    }
  ],
  "x-readme": {
    "samples-languages": [
      "curl"
    ]
  }
}
```