curl --request POST \
--url https://api.casparser.in/v4/inbox/read \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--header 'x-inbox-token: <x-inbox-token>' \
--data '
{
"document_types": [
"card_statement"
],
"start_date": "2026-08-01",
"end_date": "2026-10-31"
}
'import requests
url = "https://api.casparser.in/v4/inbox/read"
payload = {
"document_types": ["card_statement"],
"start_date": "2026-08-01",
"end_date": "2026-10-31"
}
headers = {
"x-inbox-token": "<x-inbox-token>",
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-inbox-token': '<x-inbox-token>',
'x-api-key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
document_types: ['card_statement'],
start_date: '2026-08-01',
end_date: '2026-10-31'
})
};
fetch('https://api.casparser.in/v4/inbox/read', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.casparser.in/v4/inbox/read",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'document_types' => [
'card_statement'
],
'start_date' => '2026-08-01',
'end_date' => '2026-10-31'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>",
"x-inbox-token: <x-inbox-token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.casparser.in/v4/inbox/read"
payload := strings.NewReader("{\n \"document_types\": [\n \"card_statement\"\n ],\n \"start_date\": \"2026-08-01\",\n \"end_date\": \"2026-10-31\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-inbox-token", "<x-inbox-token>")
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.casparser.in/v4/inbox/read")
.header("x-inbox-token", "<x-inbox-token>")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"document_types\": [\n \"card_statement\"\n ],\n \"start_date\": \"2026-08-01\",\n \"end_date\": \"2026-10-31\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.casparser.in/v4/inbox/read")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-inbox-token"] = '<x-inbox-token>'
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"document_types\": [\n \"card_statement\"\n ],\n \"start_date\": \"2026-08-01\",\n \"end_date\": \"2026-10-31\"\n}"
response = http.request(request)
puts response.read_body{
"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,
"attachment_url": "<string>"
}
],
"body": {
"html": "<string>",
"text": "<string>"
}
}
],
"count": 3,
"failures": 0,
"truncated": false
}{
"status": "error",
"msg": "Unknown sources: hdfc"
}{
"status": "error",
"msg": "Access expired. Please reconnect.",
"requires_reconnect": true
}{
"status": "error",
"msg": "Failed to read inbox. Please try again or reconnect."
}List inbox statements
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_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.
curl --request POST \
--url https://api.casparser.in/v4/inbox/read \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--header 'x-inbox-token: <x-inbox-token>' \
--data '
{
"document_types": [
"card_statement"
],
"start_date": "2026-08-01",
"end_date": "2026-10-31"
}
'import requests
url = "https://api.casparser.in/v4/inbox/read"
payload = {
"document_types": ["card_statement"],
"start_date": "2026-08-01",
"end_date": "2026-10-31"
}
headers = {
"x-inbox-token": "<x-inbox-token>",
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-inbox-token': '<x-inbox-token>',
'x-api-key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
document_types: ['card_statement'],
start_date: '2026-08-01',
end_date: '2026-10-31'
})
};
fetch('https://api.casparser.in/v4/inbox/read', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.casparser.in/v4/inbox/read",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'document_types' => [
'card_statement'
],
'start_date' => '2026-08-01',
'end_date' => '2026-10-31'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>",
"x-inbox-token: <x-inbox-token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.casparser.in/v4/inbox/read"
payload := strings.NewReader("{\n \"document_types\": [\n \"card_statement\"\n ],\n \"start_date\": \"2026-08-01\",\n \"end_date\": \"2026-10-31\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-inbox-token", "<x-inbox-token>")
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.casparser.in/v4/inbox/read")
.header("x-inbox-token", "<x-inbox-token>")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"document_types\": [\n \"card_statement\"\n ],\n \"start_date\": \"2026-08-01\",\n \"end_date\": \"2026-10-31\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.casparser.in/v4/inbox/read")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-inbox-token"] = '<x-inbox-token>'
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"document_types\": [\n \"card_statement\"\n ],\n \"start_date\": \"2026-08-01\",\n \"end_date\": \"2026-10-31\"\n}"
response = http.request(request)
puts response.read_body{
"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,
"attachment_url": "<string>"
}
],
"body": {
"html": "<string>",
"text": "<string>"
}
}
],
"count": 3,
"failures": 0,
"truncated": false
}{
"status": "error",
"msg": "Unknown sources: hdfc"
}{
"status": "error",
"msg": "Access expired. Please reconnect.",
"requires_reconnect": true
}{
"status": "error",
"msg": "Failed to read inbox. Please try again or reconnect."
}Authorizations
Body
Read these sources.
cams, kfintech, cdsl, nsdl, zerodha_contract_note, zerodha_statement, kfintech_nps, protean_nps, 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, 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, policybazaar, icici_lombard, hdfc_life, income_tax, dividend_tds ["hdfc_credit_card", "axis_credit_card"]
Response
Messages found in the inbox
Was this page helpful?

