> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.cadrooms.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.cadrooms.com/_mcp/server.

# List files

GET https://api.cadrooms.workers.dev/v1/projects/{projectId}/files

Retrieves all files in a project, including their latest state and revision details. Results are sorted by file path and include each file's name, folder, and full path.

Files reflect the state of the project as of the latest contribution. Changes that have not yet been contributed are excluded.

Use the optional `path` parameter to retrieve specific files. Repeat the parameter to specify multiple file paths, up to 100. Only files that exactly match the specified paths are returned. Paths that do not match an existing file are omitted.

Use `starred=true` to retrieve only starred files. Use `include=eco` to include the draft or open ECO associated with each file. The `include=eco` option requires the Business plan. Requests using this option on other plans return a `403` response.

Required permission: Viewer or higher in the project.


Reference: https://docs.cadrooms.com/api-reference/files/list-files

## Authentication

- `Authorization` header (bearer token, required) — An API key associated with your user account and workspace. API requests inherit your existing workspace permissions.
- `Authorization` header (bearer token, required) — The session token of a user signed in to the CAD ROOMS app. Every endpoint accepts it in place of an API key.

## Request

### Path parameters

- `projectId` (string, required) — Unique identifier of the project.

### Query parameters

- `path` (list of string, optional) — Returns only the files at these exact paths. Repeat the parameter for each path, for example `?path=parts/bracket.prt&path=parts/base.prt`.
- `starred` (boolean, optional) — Returns only starred files when `true`, and only files without a star when `false`.
- `include` (list of enum, optional) — Adds data to the response. Separate several values with commas. - `eco`: Adds `eco` to each file, the draft or open ECO that includes it. Needs the Business plan. - `totalCount`: Adds `totalCount`, the number of records that match the request, next to `nextCursor`.
  - Allowed values: `eco`, `totalCount`
- `limit` (integer, optional, default: 100) — Maximum number of records to return per page. Accepts values between 1 and 1000.
- `cursor` (string, optional) — Cursor for retrieving the next page. Use the `nextCursor` value from the previous response. Omit for the first page.

## Response

### 200

Returns a paginated list of files, sorted by path.

- `data` (list of File, required) — Array of records returned for the current page, following the endpoint's defined sort order.
- `nextCursor` (string, required, nullable) — Cursor for retrieving the next page. Returns `null` when there are no more results.
- `totalCount` (integer, optional) — Number of records that match the request, across all pages. Returned only when the list accepts `include=totalCount` and you send it.

## Errors

### 400 Bad Request Error

The request contains invalid or missing parameters. See `details` for specific validation errors.

- `error` (ErrorError, required)

### 401 Unauthorized Error

The API key is missing, invalid, expired, or revoked.

- `error` (ErrorError, required)

### 403 Forbidden Error

The workspace plan does not support the requested feature.

- `error` (ErrorError, required)

### 404 Not Found Error

The requested resource does not exist or is not accessible to your account. Both cases return the same response.

- `error` (ErrorError, required)

### 429 Too Many Requests Error

The rate limit has been exceeded. Wait for the duration specified in the `Retry-After` header before retrying.

- `error` (ErrorError, required)

### 500 Internal Server Error

An unexpected server error occurred. Retry later. Include the `requestId` when contacting support.

- `error` (ErrorError, required)

## Types

### File

Represents a file within a project, including its current revision and latest contribution details.

- `projectId` (string, required) — ID of the project containing the file.
- `path` (string, required) — Full file path, including its folder and filename, separated by `/`.
- `name` (string, required) — Filename, including its extension.
- `folder` (string, required) — Folder containing the file. Returns an empty string for files in the project root.
- `revisionId` (string, required) — ID of the current revision.
- `revisionMajor` (string, required) — Letter part of the current revision. Advances when the file is released, from `A` to `Z`, then `AA`.
- `revisionMinor` (integer, required) — Number part of the current revision. Advances with each contribution.
- `contentType` (string, required, nullable) — MIME type of the file, or `null` if unknown. After CAD processing, this can hold a CAD format code such as `creo_prt`.
- `sizeBytes` (integer, required, nullable) — Size of the current file revision in bytes, or `null` if unavailable.
- `sha256` (string, required, nullable) — Hash of the current file revision's content, as sent by the uploading client. The server does not check it. Returns `null` if unavailable.
- `starred` (boolean, required) — Whether the file is starred in the project. A file has one star, and every project member sees it.
- `latestContribution` (Contribution, required) — Details of the most recent contribution that modified the file.
- `createdAt` (datetime, required) — Timestamp when the file was first added to the project.
- `updatedAt` (datetime, required) — Timestamp when the file was last modified.
- `eco` (FileEco, optional, nullable) — The draft or open ECO that includes the file, or `null` if there is none. Returned only with `include=eco`.

### ErrorError

- `code` (string, required) — Stable error identifier for programmatic error handling. Every endpoint can return the general codes listed on the Errors page. Where a business condition applies, an endpoint returns a more specific code, documented on that endpoint.
- `message` (string, required) — Human-readable error description. May change over time.
- `requestId` (string, required) — Unique request identifier used for troubleshooting. The same value is returned in the `Request-Id` header of every response. Include this when contacting support.
- `details` (list of ErrorErrorDetailsItems, optional) — Optional. Contains field-level validation errors for `400` responses.

### Contribution

Represents a set of changes submitted to a project by a user.

- `id` (string, required) — Unique identifier for the contribution.
- `title` (string, required) — Title provided by the user when submitting the contribution.
- `description` (string, required) — Description of the contribution. Returns an empty string if none was provided.
- `author` (User, required) — User who submitted the contribution.
- `createdAt` (datetime, required) — Timestamp when the contribution was submitted.

### FileEco

The draft or open ECO that includes the file, or `null` if there is none. Returned only with `include=eco`.

- `id` (string, required) — Unique identifier for the ECO.
- `displayNumber` (string, required) — Number of the ECO, unique within the project.

### ErrorErrorDetailsItems

- `field` (string, required) — Name of the request field that failed validation.
- `message` (string, required) — Description of the validation issue.

### User

Represents a CAD ROOMS user.

- `id` (string, required) — Unique identifier for the user.
- `displayName` (string, required) — User's display name in the CAD ROOMS app.

## Examples

**Response**

```json
{
  "data": [
    {
      "projectId": "6c83044f-ec8a-4a01-8a6b-e8b3eb988d2b",
      "path": "parts/bracket.prt",
      "name": "bracket.prt",
      "folder": "parts",
      "revisionId": "a7e9d949-ebc6-4707-a493-a3f13f2a1b51",
      "revisionMajor": "A",
      "revisionMinor": 3,
      "contentType": "application/octet-stream",
      "sizeBytes": 482113,
      "sha256": "9b74c1a3e5f2d8b0c6a1e4f7d2b9c8a5e3f1d0b7a6c4e2f9d8b1a0c7e5f3d2b1",
      "starred": false,
      "latestContribution": {
        "id": "2253ac5a-ab55-4f34-9389-b725aa9cebcb",
        "title": "Fillet edges",
        "description": "",
        "author": {
          "id": "40a078d1-1f99-459a-a09a-f21da9c5dce4",
          "displayName": "John Doe"
        },
        "createdAt": "2026-10-02T09:00:00Z"
      },
      "createdAt": "2026-04-10T10:00:00Z",
      "updatedAt": "2026-10-02T09:00:00Z"
    }
  ],
  "nextCursor": null
}
```

**SDK Code**

```python Example
import requests

url = "https://api.cadrooms.workers.dev/v1/projects/6c83044f-ec8a-4a01-8a6b-e8b3eb988d2b/files"

querystring = {"include":"totalCount","path":"[\"BRK-ASM-020-CaliperModule_BRK-ASM-030-Caliper.STEP\"]","starred":"true"}

headers = {"Authorization": "Bearer <API key>"}

response = requests.get(url, headers=headers, params=querystring)

print(response.json())
```

```javascript Example
const url = 'https://api.cadrooms.workers.dev/v1/projects/6c83044f-ec8a-4a01-8a6b-e8b3eb988d2b/files?include=totalCount&path=%5B%22BRK-ASM-020-CaliperModule_BRK-ASM-030-Caliper.STEP%22%5D&starred=true';
const options = {method: 'GET', headers: {Authorization: 'Bearer <API key>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Example
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.cadrooms.workers.dev/v1/projects/6c83044f-ec8a-4a01-8a6b-e8b3eb988d2b/files?include=totalCount&path=%5B%22BRK-ASM-020-CaliperModule_BRK-ASM-030-Caliper.STEP%22%5D&starred=true"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <API key>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Example
require 'uri'
require 'net/http'

url = URI("https://api.cadrooms.workers.dev/v1/projects/6c83044f-ec8a-4a01-8a6b-e8b3eb988d2b/files?include=totalCount&path=%5B%22BRK-ASM-020-CaliperModule_BRK-ASM-030-Caliper.STEP%22%5D&starred=true")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <API key>'

response = http.request(request)
puts response.read_body
```

```java Example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.cadrooms.workers.dev/v1/projects/6c83044f-ec8a-4a01-8a6b-e8b3eb988d2b/files?include=totalCount&path=%5B%22BRK-ASM-020-CaliperModule_BRK-ASM-030-Caliper.STEP%22%5D&starred=true")
  .header("Authorization", "Bearer <API key>")
  .asString();
```

```php Example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.cadrooms.workers.dev/v1/projects/6c83044f-ec8a-4a01-8a6b-e8b3eb988d2b/files?include=totalCount&path=%5B%22BRK-ASM-020-CaliperModule_BRK-ASM-030-Caliper.STEP%22%5D&starred=true', [
  'headers' => [
    'Authorization' => 'Bearer <API key>',
  ],
]);

echo $response->getBody();
```

```csharp Example
using RestSharp;

var client = new RestClient("https://api.cadrooms.workers.dev/v1/projects/6c83044f-ec8a-4a01-8a6b-e8b3eb988d2b/files?include=totalCount&path=%5B%22BRK-ASM-020-CaliperModule_BRK-ASM-030-Caliper.STEP%22%5D&starred=true");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <API key>");
IRestResponse response = client.Execute(request);
```

```swift Example
import Foundation

let headers = ["Authorization": "Bearer <API key>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.cadrooms.workers.dev/v1/projects/6c83044f-ec8a-4a01-8a6b-e8b3eb988d2b/files?include=totalCount&path=%5B%22BRK-ASM-020-CaliperModule_BRK-ASM-030-Caliper.STEP%22%5D&starred=true")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```