> 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 shares

GET https://api.cadrooms.workers.dev/v1/shares

Retrieves file shares, ordered from newest to oldest. Send either `revisionId` or `workspaceId`. Each result represents either a confirmed share with a user or a pending share with an email address not yet associated with a CAD ROOMS account.

- `revisionId`: Returns shares of the file version associated with the revision. Collaborators and higher can see all shares. Users with whom the file is shared can see their own share.
- `workspaceId`: Returns shares within a workspace that you have permission to view. Use `memberId` to list files shared with a specific guest or pending invite, and `projectId` to list shares within a specific project.

Send `include=totalCount` to retrieve the total number of matching shares. For example, send `workspaceId`, `memberId`, `status=confirmed`, `limit=1` and `include=totalCount` to retrieve the number of files shared with a specific user.

Required permission: Depends on the filter.

- For `revisionId`: Viewer or higher in the project, or a share of the file.
- For `workspaceId`: Any workspace role.
- For the files of a guest: Workspace owner or admin, Collaborator or higher in the project of the file, or the guest.
- For the files of a pending invite: Viewer or higher in the workspace, or the user who sent the invite.


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

## 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

### Query parameters

- `revisionId` (string, optional) — Returns the shares of the file version behind this revision. Send either this or `workspaceId`.
- `workspaceId` (string, optional) — Returns the shares in this workspace. Send either this or `revisionId`.
- `memberId` (string, optional) — With `workspaceId`, returns only the shares with this person: the `userId` of a guest or member, or the `inviteId` of a pending invite.
- `projectId` (string, optional) — With `workspaceId`, returns only the shares of files in this project.
- `status` (enum, optional) — Returns only confirmed shares, or only pending shares.
  - Allowed values: `confirmed`, `pending`
- `include` (list of enum, optional) — Adds data to the response. Separate several values with commas. - `totalCount`: Adds `totalCount`, the number of records that match the request, next to `nextCursor`.
  - Allowed values: `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 shares, newest first.

- `data` (list of Share, 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)

### 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

### Share

Represents a share of one file version with a user or an email address.

- `id` (string, required, nullable) — Unique identifier of the share, or `null` if the share is pending.
- `status` (enum, required) — Whether the share is active. - `confirmed`: The user has access to the file. - `pending`: The email address has no CAD ROOMS account yet.
  - Allowed values: `confirmed`, `pending`
- `user` (User, required, nullable) — The user, or `null` if the share is pending.
- `email` (string, required) — Email address of the user or the pending share.
- `avatarUrl` (string, required, nullable) — URL of the user's avatar, or `null` if there is none.
- `sharedById` (string, required, nullable) — ID of the user who shared the file, or `null` if unknown.
- `isGuest` (boolean, required) — Whether the share is with a workspace guest.
- `projectId` (string, required) — ID of the project that holds the file.
- `projectName` (string, required) — Name of the project that holds the file.
- `projectSlug` (string, required) — URL-friendly identifier of the project, used in its app URL.
- `path` (string, required) — Path of the file in the project.
- `revisionId` (string, required) — ID of the shared revision.
- `revisionMajor` (string, required) — Letter part of the shared revision.
- `revisionMinor` (integer, required) — Number part of the shared revision.
- `createdAt` (datetime, required) — Time at which the file was shared.

### 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.

### 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.

### ErrorErrorDetailsItems

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

## Examples

**Response**

```json
{
  "data": [
    {
      "id": "1f6b2d90-8c47-4e15-b3a2-7d9e0c5f4a18",
      "status": "confirmed",
      "user": {
        "id": "f008611c-2eef-4880-af86-94dbc7ecf9f7",
        "displayName": "Jane Doe"
      },
      "email": "jane.doe@example.com",
      "avatarUrl": null,
      "sharedById": "40a078d1-1f99-459a-a09a-f21da9c5dce4",
      "isGuest": true,
      "projectId": "356d9a6c-31e9-4d9c-ad55-de709172d893",
      "projectName": "Gearbox v2",
      "projectSlug": "gearbox-v2",
      "path": "parts/bracket.prt",
      "revisionId": "e88d65cd-879d-4df3-adfc-ef0ca99238bf",
      "revisionMajor": "A",
      "revisionMinor": 3,
      "createdAt": "2026-10-09T09:00:00Z"
    },
    {
      "id": null,
      "status": "pending",
      "user": {
        "id": "40a078d1-1f99-459a-a09a-f21da9c5dce4",
        "displayName": "John Doe"
      },
      "email": "john.doe@example.com",
      "avatarUrl": null,
      "sharedById": "40a078d1-1f99-459a-a09a-f21da9c5dce4",
      "isGuest": true,
      "projectId": "356d9a6c-31e9-4d9c-ad55-de709172d893",
      "projectName": "Gearbox v2",
      "projectSlug": "gearbox-v2",
      "path": "parts/bracket.prt",
      "revisionId": "e88d65cd-879d-4df3-adfc-ef0ca99238bf",
      "revisionMajor": "A",
      "revisionMinor": 3,
      "createdAt": "2026-10-08T09:00:00Z"
    }
  ],
  "nextCursor": null
}
```

**SDK Code**

```python Files_listShares_example
import requests

url = "https://api.cadrooms.workers.dev/v1/shares"

querystring = {"include":"totalCount","memberId":"f008611c-2eef-4880-af86-94dbc7ecf9f7","projectId":"356d9a6c-31e9-4d9c-ad55-de709172d893","revisionId":"e88d65cd-879d-4df3-adfc-ef0ca99238bf","status":"confirmed","workspaceId":"1fb60bd2-19f9-47a9-bea9-27898f43a0d5"}

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

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

print(response.json())
```

```javascript Files_listShares_example
const url = 'https://api.cadrooms.workers.dev/v1/shares?include=totalCount&memberId=f008611c-2eef-4880-af86-94dbc7ecf9f7&projectId=356d9a6c-31e9-4d9c-ad55-de709172d893&revisionId=e88d65cd-879d-4df3-adfc-ef0ca99238bf&status=confirmed&workspaceId=1fb60bd2-19f9-47a9-bea9-27898f43a0d5';
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 Files_listShares_example
package main

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

func main() {

	url := "https://api.cadrooms.workers.dev/v1/shares?include=totalCount&memberId=f008611c-2eef-4880-af86-94dbc7ecf9f7&projectId=356d9a6c-31e9-4d9c-ad55-de709172d893&revisionId=e88d65cd-879d-4df3-adfc-ef0ca99238bf&status=confirmed&workspaceId=1fb60bd2-19f9-47a9-bea9-27898f43a0d5"

	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 Files_listShares_example
require 'uri'
require 'net/http'

url = URI("https://api.cadrooms.workers.dev/v1/shares?include=totalCount&memberId=f008611c-2eef-4880-af86-94dbc7ecf9f7&projectId=356d9a6c-31e9-4d9c-ad55-de709172d893&revisionId=e88d65cd-879d-4df3-adfc-ef0ca99238bf&status=confirmed&workspaceId=1fb60bd2-19f9-47a9-bea9-27898f43a0d5")

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 Files_listShares_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.cadrooms.workers.dev/v1/shares?include=totalCount&memberId=f008611c-2eef-4880-af86-94dbc7ecf9f7&projectId=356d9a6c-31e9-4d9c-ad55-de709172d893&revisionId=e88d65cd-879d-4df3-adfc-ef0ca99238bf&status=confirmed&workspaceId=1fb60bd2-19f9-47a9-bea9-27898f43a0d5")
  .header("Authorization", "Bearer <API key>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.cadrooms.workers.dev/v1/shares?include=totalCount&memberId=f008611c-2eef-4880-af86-94dbc7ecf9f7&projectId=356d9a6c-31e9-4d9c-ad55-de709172d893&revisionId=e88d65cd-879d-4df3-adfc-ef0ca99238bf&status=confirmed&workspaceId=1fb60bd2-19f9-47a9-bea9-27898f43a0d5', [
  'headers' => [
    'Authorization' => 'Bearer <API key>',
  ],
]);

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

```csharp Files_listShares_example
using RestSharp;

var client = new RestClient("https://api.cadrooms.workers.dev/v1/shares?include=totalCount&memberId=f008611c-2eef-4880-af86-94dbc7ecf9f7&projectId=356d9a6c-31e9-4d9c-ad55-de709172d893&revisionId=e88d65cd-879d-4df3-adfc-ef0ca99238bf&status=confirmed&workspaceId=1fb60bd2-19f9-47a9-bea9-27898f43a0d5");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <API key>");
IRestResponse response = client.Execute(request);
```

```swift Files_listShares_example
import Foundation

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.cadrooms.workers.dev/v1/shares?include=totalCount&memberId=f008611c-2eef-4880-af86-94dbc7ecf9f7&projectId=356d9a6c-31e9-4d9c-ad55-de709172d893&revisionId=e88d65cd-879d-4df3-adfc-ef0ca99238bf&status=confirmed&workspaceId=1fb60bd2-19f9-47a9-bea9-27898f43a0d5")! 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()
```