---
title: "List inbox statements"
method: POST
path: "/v4/inbox/read"
tags: ["Email Import"]
---

# List inbox statements

`POST /v4/inbox/read`

## Request

- Base URL: `https://api.casparser.in`
- URL: `https://api.casparser.in/v4/inbox/read`
- Auth: API key in header `x-api-key`

List statement emails and their attachment details in a connected mailbox.

Download files directly from their `attachment_url`. No additional
headers are needed. URLs expire 30 minutes after this read.
Anyone with a URL can download that file until it expires, so keep
these URLs private.

A source is one institution sending one kind of document. Each has a
category and a document type, listed below. Choose what to read with any
mix of `categories`, `document_types`, `sources` and `senders` (at least
one); you get everything that matches any of them. For example,
`document_types: ["card_statement"]` reads every card issuer, and
`document_types: ["consolidated_statement"]` reads CAS only.

| Category | Document type | Sources |
|---|---|---|
| `investments` | `consolidated_statement` | `cams`, `kfintech`, `cdsl`, `nsdl` |
| `investments` | `contract_note` | `zerodha_contract_note` |
| `investments` | `broker_statement` | `zerodha_statement` |
| `investments` | `nps_statement` | `kfintech_nps`, `protean_nps` |
| `credit` | `card_statement` | `hdfc_credit_card`, `sbi_card`, `icici_credit_card`, `axis_credit_card`, `idfc_first_credit_card`, `kotak_credit_card`, `rbl_credit_card`, `bobcard`, `yes_credit_card`, `indusind_credit_card`, `scapia_credit_card`, `au_credit_card`, `niyo_global_credit_card` |
| `banking` | `account_statement` | `hdfc_bank_account`, `sbi_bank_account`, `icici_bank_account`, `axis_bank_account`, `kotak_bank_account`, `idfc_first_bank_account`, `yes_bank_account`, `au_bank_account`, `sbm_bank_account`, `federal_bank_account` |
| `insurance` | `insurance_document` | `policybazaar`, `icici_lombard`, `hdfc_life` |
| `tax` | `tax_notice` | `income_tax` |
| `tax` | `tds_certificate` | `dividend_tds` |

To read from an institution that isn't listed, pass its exact addresses
in `senders` (up to 20 per request). A message from one of them is
labelled with the known source it matches, if any; otherwise `source`,
`category`, `document_type` and `institution` are `null`.

**Sender verification:** `sender_verified` is the email provider's DMARC
check of the sender's domain: `true` means it passed, `false` means it
failed, and `null` means no result was available.

**Paging:** at most 50 messages per call, newest first. When `truncated`
is true, call again with `end_date` set to the oldest `message_date` you
received, and skip `message_id`s you already have.

`start_date` and `end_date` are inclusive calendar dates in IST
(UTC+05:30). `message_date` is the date the email was received, also in IST.

**Billing:** 0.2 credits per request (charged regardless of success or number of messages found). Attachment downloads are free.

## Headers

- `x-inbox-token` string, required

## Request body

- object
  - `categories` string[]: Read every source in these categories.
  - `document_types` string[]: Read every source of these document types.
  - `sources` string[]: Read these sources.
  - `senders` string[]: Exact sender addresses to read, for institutions not in the table above. Domains and wildcards aren't accepted.
  - `start_date` string, date: First day to search (YYYY-MM-DD, inclusive, IST). Defaults to 30 days before `end_date`.
  - `end_date` string, date: Last day to search (YYYY-MM-DD, inclusive, IST). Defaults to today in IST.
  - `include_body` boolean: Return each message's body as well.

## Response `200`

Messages found in the inbox

- object
  - `status` string
  - `messages` InboxMessage[]: Newest first
    - `message_id` string: The email provider's message ID. It stays the same across reads, so you can skip messages you already have.
    - `message_date` string, date: Date the email was received, in IST (UTC+05:30)
    - `sender_email` string, email: Sender address, lowercased
    - `sender_verified` boolean, nullable: The email provider's DMARC check of the sender's domain. `true`: passed. `false`: failed. `null`: no result available.
    - `subject` string
    - `source` string, nullable: The source the message matched. `null` for a message from `senders` that matches no known source.
    - `category` string, nullable: The source's category. `null` when `source` is.
    - `document_type` string, nullable: The kind of document the source sends. `null` when `source` is.
    - `institution` string, nullable: The institution's name. `null` when `source` is.
    - `attachments` InboxAttachment[]: PDF, CSV, XLS and XLSX attachments. Other files, such as images, are left out.
      - `filename` string: Standardized filename, `{source}_{YYYYMMDD}_{id}.{ext}`, with `custom` in place of the source when there's no known source. The same attachment always gets the same name.
      - `original_filename` string: Filename as sent
      - `content_type` string
      - `size` integer: File size in bytes
      - `attachment_url` string, uri: Direct download URL. No headers required. Valid for 30 minutes after the read.
    - `body` object: Present when `include_body` is true. Gmail can return both `html` and `text`, Outlook one of them, Zoho `html` only.
      - `html` string, nullable
      - `text` string, nullable
  - `count` integer
  - `failures` integer: Messages that could not be read. The rest are still returned.
  - `truncated` boolean: True when more messages may match than were returned. Page back with `end_date` as described above, or narrow the range if no messages came back.

## Other responses

- `400`: Invalid request
- `401`: Token invalid or revoked
- `502`: The email provider could not be searched

## Changes

- **2026-11-23** `1976da2e56f5`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/casparser/apis/cas-parser-track-portfolios-from-cdsl-nsdl-cams-kfintech-2/changes/v4/inbox/read/post.md)

---

[API](https://skmtc.dev/casparser/apis/cas-parser-track-portfolios-from-cdsl-nsdl-cams-kfintech-2.md) - [All operations](https://skmtc.dev/casparser/apis/cas-parser-track-portfolios-from-cdsl-nsdl-cams-kfintech-2/llms.txt) - [OpenAPI document](https://skmtc.dev/casparser/apis/cas-parser-track-portfolios-from-cdsl-nsdl-cams-kfintech-2/revisions/1976da2e56f5?raw)
