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

# List Files

> List files in a room with optional filters.

Retrieve a list of files stored in a room, with optional filtering by MIME type and user.

## Endpoint

```
GET /v1/accounts/:accountId/files
```

## Authentication

**Bearer token** required.

## Query Parameters

<ParamField query="roomId" type="string" required>
  The room to list files from.
</ParamField>

<ParamField query="mimeType" type="string">
  Filter by MIME type. Use a trailing slash for categories (e.g., `image/` matches all image types). Can be specified multiple times for OR matching.
</ParamField>

<ParamField query="userId" type="string">
  Filter by the user who uploaded the files.
</ParamField>

## Response

<ResponseField name="files" type="StorageFile[]">
  Array of file objects. See [`StorageFile`](/types/storage#storagefile).
</ResponseField>

## Example

<CodeGroup>
  ```bash curl theme={null}
  # List all files in a room
  curl "https://api.collab-kit.com/v1/accounts/${ACCOUNT_ID}/files?roomId=${ROOM_ID}" \
    -H "Authorization: Bearer ${TOKEN}"

  # Filter by MIME type
  curl "https://api.collab-kit.com/v1/accounts/${ACCOUNT_ID}/files?roomId=${ROOM_ID}&mimeType=image/" \
    -H "Authorization: Bearer ${TOKEN}"

  # Filter by user
  curl "https://api.collab-kit.com/v1/accounts/${ACCOUNT_ID}/files?roomId=${ROOM_ID}&userId=user-001" \
    -H "Authorization: Bearer ${TOKEN}"
  ```

  ```typescript JavaScript theme={null}
  const res = await fetch(
    `https://api.collab-kit.com/v1/accounts/${accountId}/files?roomId=${roomId}&mimeType=image/`,
    { headers: { 'Authorization': `Bearer ${token}` } }
  );
  const { data } = await res.json();
  console.log(data.files);
  ```
</CodeGroup>

```json Response theme={null}
{
  "type": "response",
  "success": true,
  "description": "Files retrieved",
  "data": {
    "files": [
      {
        "key": "c3003c93/uploads/screenshot.png",
        "url": "https://api.collab-kit.com/v1/accounts/${ACCOUNT_ID}/storage/c3003c93/uploads/screenshot.png",
        "filename": "screenshot.png",
        "mimeType": "image/png",
        "size": 245760,
        "uploadedAt": "2026-05-29T10:15:00.000Z",
        "uploadedBy": "user-001"
      }
    ]
  },
  "error": null
}
```
