Email Import

List inbox statements

Changed on

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.

CategoryDocument typeSources
investmentsconsolidated_statementcams, kfintech, cdsl, nsdl
investmentscontract_notezerodha_contract_note
investmentsbroker_statementzerodha_statement
investmentsnps_statementkfintech_nps, protean_nps
creditcard_statementhdfc_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
bankingaccount_statementhdfc_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
insuranceinsurance_documentpolicybazaar, icici_lombard, hdfc_life
taxtax_noticeincome_tax
taxtds_certificatedividend_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_ids 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.

post/v4/inbox/read

Request

  • Base URL
    https://api.casparser.in
  • Auth
    API key in header x-api-key

Headers

x-inbox-tokenstring required

The encrypted inbox token

Request body

categoriesstring[]

Read every source in these categories.

document_typesstring[]

Read every source of these document types.

sourcesstring[]

Read these sources.

sendersstring[]

Exact sender addresses to read, for institutions not in the table above. Domains and wildcards aren't accepted.

start_datestring date

First day to search (YYYY-MM-DD, inclusive, IST). Defaults to 30 days before end_date.

end_datestring date

Last day to search (YYYY-MM-DD, inclusive, IST). Defaults to today in IST.

include_bodyboolean

Return each message's body as well.

Example request

{
  "categories": [
    "credit"
  ],
  "document_types": [
    "card_statement"
  ],
  "sources": [
    "hdfc_credit_card",
    "axis_credit_card"
  ],
  "senders": [
    "estatement@examplebank.in"
  ],
  "start_date": "2026-08-01",
  "end_date": "2026-10-31"
}

Response

Messages found in the inbox

statusstring
countinteger
failuresinteger

Messages that could not be read. The rest are still returned.

truncatedboolean

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.

Example response

{
  "status": "success",
  "messages": [
    {
      "message_id": "18d4a2b3c4d5e6f7",
      "message_date": "2026-10-12",
      "sender_email": "emailstatements.cards@hdfcbank.net",
      "sender_verified": true,
      "subject": "Your HDFC Bank Credit Card Statement for October 2026",
      "source": "hdfc_credit_card",
      "category": "credit",
      "document_type": "card_statement",
      "institution": "HDFC Bank",
      "attachments": [
        {
          "filename": "hdfc_credit_card_20261012_a1b2c3d4e5f6.pdf",
          "original_filename": "Infinia_Statement_Oct2026.pdf",
          "content_type": "application/pdf",
          "size": 245000
        }
      ]
    }
  ],
  "count": 3
}

Changes