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

# API

> API reference for Docsumo: every `docsumo.api.*` operation with input and output types.

Every `docsumo.api.*` operation is listed below with parameter shapes and return types from the plugin Zod schemas.

> [!NOTE]
>
> **New to Corsair?** See [API access](/concepts/api), [authentication](/concepts/auth), and [error handling](/concepts/error-handling).

## Agents

### listCases

`agents.listCases`

List cases for an external agent case type with pagination

**Risk:** `read`

```ts theme={null}
await corsair.docsumo.api.agents.listCases({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `casetype_id` | `string` | Yes | — |
| `limit` | `number` | No | — |
| `offset` | `number` | No | — |
| `sort_by` | `created_date.asc \| created_date.desc \| modified_date.asc \| modified_date.desc` | No | — |
| `stage_id` | `string[]` | No | — |
| `assigned_to` | `string[]` | No | — |
| `workflow_state` | `string[]` | No | — |
| `created_date_from` | `string` | No | — |
| `created_date_to` | `string` | No | — |
| `modified_date_from` | `string` | No | — |
| `modified_date_to` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `status` | `string` | No | — |
| `status_code` | `number` | No | — |
| `message` | `string` | No | — |
| `error` | `string` | No | — |
| `error_code` | `string` | No | — |
| `data` | `object` | No | — |

> **data full type**
>
> ```ts theme={null}
> {
>   cases?: {
>   }[],
>   pagination?: {
>     limit?: number,
>     offset?: number,
>     total?: number
>   }
> }
> ```

***

### listExternal

`agents.listExternal`

List external agents configured in the Docsumo account

**Risk:** `read`

```ts theme={null}
await corsair.docsumo.api.agents.listExternal({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `type` | `all \| doctype \| casetype` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `status` | `string` | No | — |
| `status_code` | `number` | No | — |
| `message` | `string` | No | — |
| `error` | `string` | No | — |
| `error_code` | `string` | No | — |
| `data` | `object` | No | — |

> **data full type**
>
> ```ts theme={null}
> {
>   agents?: {
>   }[],
>   disabled_agents?: any[]
> }
> ```

***

## Analytics

### mcaAnalysis

`analytics.mcaAnalysis`

Run MCA analysis on uploaded bank statement documents

**Risk:** `read`

```ts theme={null}
await corsair.docsumo.api.analytics.mcaAnalysis({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `doc_ids` | `string[]` | Yes | — |
| `mca_list_db_table` | `string` | No | — |
| `non_mca_list_db_table` | `string` | No | — |
| `allow_partial` | `boolean` | No | — |
| `webhook` | `boolean` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `account_summaries` | `object[]` | No | — |
| `status` | `string` | No | — |
| `status_code` | `number` | No | — |
| `message` | `string` | No | — |

> **account\_summaries full type**
>
> ```ts theme={null}
> {
> }[][]
> ```

***

## Documents

### listAll

`documents.listAll`

List documents with optional filters and pagination

**Risk:** `read`

```ts theme={null}
await corsair.docsumo.api.documents.listAll({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `view` | `files \| folder \| all_files` | No | — |
| `folder_id` | `string` | No | — |
| `limit` | `number` | No | — |
| `offset` | `number` | No | — |
| `doc_type` | `string` | No | — |
| `status` | `reviewing \| processed \| erred` | No | — |
| `q` | `string` | No | — |
| `sort_by` | `created_date.asc \| created_date.desc` | No | — |
| `created_date` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `status` | `string` | No | — |
| `status_code` | `number` | No | — |
| `message` | `string` | No | — |
| `error` | `string` | No | — |
| `error_code` | `string` | No | — |
| `data` | `object` | No | — |

> **data full type**
>
> ```ts theme={null}
> {
>   documents?: {
>   }[],
>   limit?: number,
>   offset?: number,
>   total?: number
> }
> ```

***

## Document Types

### getEnabled

`documentTypes.getEnabled`

Get a summary of enabled and disabled document types for the account

**Risk:** `read`

```ts theme={null}
await corsair.docsumo.api.documentTypes.getEnabled({});
```

**Input:** *empty object*

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `status` | `string` | No | — |
| `status_code` | `number` | No | — |
| `message` | `string` | No | — |
| `error` | `string` | No | — |
| `error_code` | `string` | No | — |
| `data` | `object` | No | — |

> **data full type**
>
> ```ts theme={null}
> {
> }
> ```

***

### listEnabled

`documentTypes.listEnabled`

List document types currently enabled for the account

**Risk:** `read`

```ts theme={null}
await corsair.docsumo.api.documentTypes.listEnabled({});
```

**Input:** *empty object*

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `status` | `string` | No | — |
| `status_code` | `number` | No | — |
| `message` | `string` | No | — |
| `error` | `string` | No | — |
| `error_code` | `string` | No | — |
| `data` | `object` | No | — |

> **data full type**
>
> ```ts theme={null}
> {
>   document?: {
>     title?: string,
>     doc_type?: string
>   }[]
> }
> ```

***

## Folders

### create

`folders.create`

Create a folder for organizing Docsumo documents

**Risk:** `write`

```ts theme={null}
await corsair.docsumo.api.folders.create({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `folder_name` | `string` | Yes | — |
| `type` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `status` | `string` | No | — |
| `status_code` | `number` | No | — |
| `message` | `string` | No | — |
| `error` | `string` | No | — |
| `error_code` | `string` | No | — |
| `data` | `object` | No | — |

> **data full type**
>
> ```ts theme={null}
> {
> }
> ```

***

## Tables

### addRow

`tables.addRow`

Add a new empty row to a Docsumo database table

**Risk:** `write`

```ts theme={null}
await corsair.docsumo.api.tables.addRow({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `ddid` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `status` | `string` | No | — |
| `status_code` | `number` | No | — |
| `message` | `string` | No | — |
| `error` | `string` | No | — |
| `error_code` | `string` | No | — |
| `data` | `object[]` | No | — |

> **data full type**
>
> ```ts theme={null}
> {
> }[]
> ```

***

### delete

`tables.delete`

Delete one or more Docsumo database tables

**Risk:** `write`

```ts theme={null}
await corsair.docsumo.api.tables.delete({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `dd_ids` | `string[]` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `status` | `string` | No | — |
| `status_code` | `number` | No | — |
| `message` | `string` | No | — |
| `error` | `string` | No | — |
| `error_code` | `string` | No | — |

***

### getData

`tables.getData`

Retrieve all rows from a Docsumo database table

**Risk:** `read`

```ts theme={null}
await corsair.docsumo.api.tables.getData({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `ddid` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `status` | `string` | No | — |
| `status_code` | `number` | No | — |
| `message` | `string` | No | — |
| `error` | `string` | No | — |
| `error_code` | `string` | No | — |
| `data` | `object` | No | — |

> **data full type**
>
> ```ts theme={null}
> {
>   data?: {
>   }[],
>   limit?: number,
>   offset?: number,
>   total?: number
> }
> ```

***

## User

### getDocumentTypes

`user.getDocumentTypes`

Get user account details and available document types

**Risk:** `read`

```ts theme={null}
await corsair.docsumo.api.user.getDocumentTypes({});
```

**Input:** *empty object*

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `status` | `string` | No | — |
| `status_code` | `number` | No | — |
| `message` | `string` | No | — |
| `error` | `string` | No | — |
| `error_code` | `string` | No | — |
| `data` | `object` | No | — |

> **data full type**
>
> ```ts theme={null}
> {
>   document_types?: {
>     title?: string,
>     value?: string
>   }[],
>   email?: string,
>   full_name?: string,
>   monthly_doc_current?: number,
>   monthly_doc_limit?: number,
>   user_id?: string
> }
> ```

***


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.