# dataSources.readText

Read the text of a CSV or plain-text file attached to a row or page (up to 2 MB, UTF-8), for example a bank statement to import with imports.preview and imports.commit. Nothing is stored.

`GET | POST /api/v1/accounting/dataSources.readText`

Permissions: `accounting:read` · Roles: admin, finance

MCP tool: `accounting_data_sources_read_text`

## Fields

| Field | Type | Required | Notes |
| --- | --- | --- | --- |
| `source` | enum | Yes | Where the record came from. One of: `notion`, `google_drive`, `onedrive`. |
| `itemId` | string | Yes | 1–200 characters; Matches ^[A-Za-z0-9_.:-]+$. |
| `fileId` | string | Yes | 1–200 characters; Matches ^[A-Za-z0-9_.:-]+$. |

## Example request

```bash
curl -G https://app.getoatmilk.com/api/v1/accounting/dataSources.readText \
  -H "Authorization: Bearer $OATMILK_API_KEY" \
  --data-urlencode 'source=notion' \
  --data-urlencode 'itemId=item_id' \
  --data-urlencode 'fileId=file_id'
```

Reference page: https://app.getoatmilk.com/docs/api/dataSources.readText
