﻿<head><script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-4357510538660394"
     crossorigin="anonymous"></script></head>---
canonical_url: "https://docs.composio.dev/reference/api-reference/files/getFilesList"
markdown_url: "https://docs.composio.dev/reference/api-reference/files/getFilesList.md"
product: "platform"
version: "3.1"
last_updated: null
---

# List files with optional app and action filters (DEPRECATED)

**Documentation:** /reference/api-reference/files/getFilesList

> **API version:** This page documents Composio REST API v3.1, the current version, at `https://backend.composio.dev/api/v3.1`. `https://backend.composio.dev/api/v3` is the previous version and remains supported.

DEPRECATED: This endpoint is deprecated and will be removed in a future release. Retrieves a list of files associated with the authenticated project. Results can be filtered by toolkit and tool slugs. Responses carry a `Deprecation` header (RFC 9745) for client-side detection.

---

## GET `/api/v3.1/files/list`

**Endpoint:** `https://backend.composio.dev/api/v3.1/files/list`

**Summary:** List files with optional app and action filters (DEPRECATED)

DEPRECATED: This endpoint is deprecated and will be removed in a future release. Retrieves a list of files associated with the authenticated project. Results can be filtered by toolkit and tool slugs. Responses carry a `Deprecation` header (RFC 9745) for client-side detection.

### Authentication

**ApiKeyAuth** - API Key in `header` header `x-api-key`

### Query Parameters

- `toolkit_slug` (string): Filter files by app slug. Example: "file-converter"
- `tool_slug` (string): Filter files by action slug. Example: "convert-to-pdf"
- `limit` (number,null): Number of items per page, max allowed is 50
- `cursor` (string): Cursor for pagination. The cursor is a base64 encoded string of the page and limit. The page is the page number and the limit is the number of items per page. The cursor is used to paginate through the items. The cursor is not required for the first page.

### Responses

#### 200 - Successfully retrieved files

**Response Schema:**

- `items` (array<object>) *(required)*
  - Array items:
    - `toolkit_slug` (string) *(required)*: Slug of the app where this file belongs to. Example: "file-converter"
    - `tool_slug` (string) *(required)*: Slug of the action where this file belongs to. Example: "convert-to-pdf"
    - `filename` (string) *(required)*: Name of the original file. Example: "document.docx"
    - `mimetype` (string) *(required)*: Mime type of the original file. Example: "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
    - `md5` (string) *(required)*: MD5 hash of the file for integrity verification. Example: "d41d8cd98f00b204e9800998ecf8427e"
- `next_cursor` (string,null)
- `total_pages` (number) *(required)*
- `current_page` (number) *(required)*
- `total_items` (number) *(required)*

**Example Response:**

```json
{
  "items": [
    {
      "toolkit_slug": "string",
      "tool_slug": "string",
      "filename": "string",
      "mimetype": "string",
      "md5": "string"
    }
  ],
  "next_cursor": null,
  "total_pages": 1,
  "current_page": 1,
  "total_items": 1
}
```

#### 400 - Bad request

**Response Schema:**

- `error` (object) *(required)*
  - `message` (string) *(required)*
  - `code` (number) *(required)*
  - `slug` (string) *(required)*
  - `status` (number) *(required)*
  - `request_id` (string)
  - `suggested_fix` (string)
  - `errors` (array<string>)

#### 401 - Unauthorized

**Response Schema:**

- `error` (object) *(required)*
  - `message` (string) *(required)*
  - `code` (number) *(required)*
  - `slug` (string) *(required)*
  - `status` (number) *(required)*
  - `request_id` (string)
  - `suggested_fix` (string)
  - `errors` (array<string>)

#### 404 - Not found

**Response Schema:**

- `error` (object) *(required)*
  - `message` (string) *(required)*
  - `code` (number) *(required)*
  - `slug` (string) *(required)*
  - `status` (number) *(required)*
  - `request_id` (string)
  - `suggested_fix` (string)
  - `errors` (array<string>)

#### 500 - Internal server error

**Response Schema:**

- `error` (object) *(required)*
  - `message` (string) *(required)*
  - `code` (number) *(required)*
  - `slug` (string) *(required)*
  - `status` (number) *(required)*
  - `request_id` (string)
  - `suggested_fix` (string)
  - `errors` (array<string>)

### Example requests

Python uses `requests`; TypeScript uses Node.js fetch. Replace sample IDs and values before sending these requests.

Set `COMPOSIO_API_KEY` before running these requests.

#### Python

```python
import os
import requests

response = requests.request("GET", "https://backend.composio.dev/api/v3.1/files/list",
    headers={"x-api-key": os.environ["COMPOSIO_API_KEY"]})
response.raise_for_status()
print(response.text)
```

#### TypeScript

```typescript
const response = await fetch("https://backend.composio.dev/api/v3.1/files/list", {
  method: "GET",
  headers: { "x-api-key": process.env["COMPOSIO_API_KEY"]! },
});
if (!response.ok) throw new Error(`HTTP ${response.status}: ${await response.text()}`);
console.log(await response.text());
```

#### API

```bash
curl -X GET "https://backend.composio.dev/api/v3.1/files/list" \
  -H "x-api-key: $COMPOSIO_API_KEY"
```

---

## REST API version

The current REST API version is **v3.1**, served at `https://backend.composio.dev/api/v3.1`. Prefer it for new code and new examples.

`https://backend.composio.dev/api/v3` is the previous version. It is frozen with pinned tool-version defaults and remains supported — existing v3 integrations keep working and do not need to migrate.