> ## Documentation Index
> Fetch the complete documentation index at: https://docs.equa.cc/llms.txt
> Use this file to discover all available pages before exploring further.

# Data Room Endpoints

> Document storage, folder management, and file operations for organization data rooms

> **Source:** `equa-server/modules/api/src/endpoints/data-room-endpoints.ts`

<Warning>
  These endpoints are currently disabled in production. The source file exists but is
  commented out in the endpoint registration (`endpoints.ts`). These endpoints are
  documented here for reference and will become active when the feature is re-enabled.
</Warning>

# Data Room Endpoints

Endpoints for managing an organization's data room — uploading documents, creating folders, downloading files, and organizing the file structure. Files are stored in S3.

All data room endpoints require authentication.

## List Documents

```
GET /v1/organization/:organization/document
```

| Field      | Value                 |
| ---------- | --------------------- |
| Auth       | Required              |
| Permission | `canViewOrganization` |

List all documents and folders in the organization's data room.

**Response:**

```json theme={null}
[
  {
    "id": "uuid",
    "name": "Operating Agreement.pdf",
    "type": "file",
    "parentFolder": "uuid",
    "size": 245000,
    "created": "2025-03-10T14:00:00Z"
  },
  {
    "id": "uuid",
    "name": "Contracts",
    "type": "folder",
    "parentFolder": null,
    "created": "2025-02-01T09:00:00Z"
  }
]
```

***

## Upload Documents

```
POST /v1/organization/:organization/document
```

| Field        | Value                 |
| ------------ | --------------------- |
| Auth         | Required              |
| Permission   | `canEditDocuments`    |
| Content-Type | `multipart/form-data` |

Upload one or more documents to the data room. Max file size is configurable via `DATA_ROOM_UPLOAD_SIZE_LIMIT_MB` (default 10 MB).

***

## Download Document

```
GET /v1/organization/:organization/document/:document/content
```

| Field      | Value              |
| ---------- | ------------------ |
| Auth       | Required           |
| Permission | `canViewDocuments` |

Download a document as an attachment (Content-Disposition: attachment).

***

## View Document Inline

```
GET /v1/organization/:organization/document/:document/content/:name
```

| Field      | Value              |
| ---------- | ------------------ |
| Auth       | Required           |
| Permission | `canViewDocuments` |

View a document inline in the browser (Content-Disposition: inline).

***

## Create Folder

```
POST /v1/organization/:organization/folder
```

| Field      | Value              |
| ---------- | ------------------ |
| Auth       | Required           |
| Permission | `canEditDocuments` |

Create a new folder in the data room.

**Request:**

```json theme={null}
{
  "name": "Legal Documents",
  "parentFolder": "uuid-or-null"
}
```

***

## Move Document or Folder

```
POST /v1/organization/:organization/document/:document/move
```

| Field      | Value              |
| ---------- | ------------------ |
| Auth       | Required           |
| Permission | `canEditDocuments` |

Move a document or folder to a different location in the data room. Can also be used to rename items.

**Request:**

```json theme={null}
{
  "name": "New Folder Name",
  "parentFolder": "uuid-of-target-folder"
}
```

***

## Delete Document or Folder

```
DELETE /v1/organization/:organization/document/:document
```

| Field      | Value              |
| ---------- | ------------------ |
| Auth       | Required           |
| Permission | `canEditDocuments` |

Delete a document or folder from the data room.
