List CAS Files from Email Inbox
curl --request POST \
--url https://api.casparser.in/v4/inbox/cas \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--header 'x-inbox-token: <x-inbox-token>' \
--data '
{
"start_date": "2025-12-01",
"end_date": "2025-12-31",
"cas_types": [
"cdsl",
"nsdl"
]
}
'import requests
url = "https://api.casparser.in/v4/inbox/cas"
payload = {
"start_date": "2025-12-01",
"end_date": "2025-12-31",
"cas_types": ["cdsl", "nsdl"]
}
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({start_date: '2025-12-01', end_date: '2025-12-31', cas_types: ['cdsl', 'nsdl']})
};
fetch('https://api.casparser.in/v4/inbox/cas', 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/cas",
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([
'start_date' => '2025-12-01',
'end_date' => '2025-12-31',
'cas_types' => [
'cdsl',
'nsdl'
]
]),
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/cas"
payload := strings.NewReader("{\n \"start_date\": \"2025-12-01\",\n \"end_date\": \"2025-12-31\",\n \"cas_types\": [\n \"cdsl\",\n \"nsdl\"\n ]\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/cas")
.header("x-inbox-token", "<x-inbox-token>")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"start_date\": \"2025-12-01\",\n \"end_date\": \"2025-12-31\",\n \"cas_types\": [\n \"cdsl\",\n \"nsdl\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.casparser.in/v4/inbox/cas")
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 \"start_date\": \"2025-12-01\",\n \"end_date\": \"2025-12-31\",\n \"cas_types\": [\n \"cdsl\",\n \"nsdl\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"files": [
{
"message_id": "18d4a2b3c4d5e6f7",
"filename": "cdsl_20250115_a1b2c3d4.pdf",
"original_filename": "CDSL_CAS_Statement.pdf",
"message_date": "2025-01-15",
"cas_type": "cdsl",
"sender_email": "eCAS@cdslstatement.com",
"size": 245000,
"url": "https://cdn.casparser.in/email-cas/user123/cdsl_20250115_a1b2c3d4.pdf",
"expires_in": 86400
}
],
"count": 5
}{
"status": "error",
"msg": "Email access revoked. Please reconnect.",
"requires_reconnect": true
}{
"status": "failed",
"msg": "Invalid PDF file or password."
}Email Import
List CAS Files from Email Inbox
Search the user’s email inbox for CAS files from known senders (CAMS, KFintech, CDSL, NSDL).
Files are uploaded to temporary cloud storage. URLs expire in 24 hours.
Optionally filter by CAS provider and date range.
Billing: 0.2 credits per request (charged regardless of success or number of files found).
POST
/
v4
/
inbox
/
cas
List CAS Files from Email Inbox
curl --request POST \
--url https://api.casparser.in/v4/inbox/cas \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--header 'x-inbox-token: <x-inbox-token>' \
--data '
{
"start_date": "2025-12-01",
"end_date": "2025-12-31",
"cas_types": [
"cdsl",
"nsdl"
]
}
'import requests
url = "https://api.casparser.in/v4/inbox/cas"
payload = {
"start_date": "2025-12-01",
"end_date": "2025-12-31",
"cas_types": ["cdsl", "nsdl"]
}
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({start_date: '2025-12-01', end_date: '2025-12-31', cas_types: ['cdsl', 'nsdl']})
};
fetch('https://api.casparser.in/v4/inbox/cas', 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/cas",
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([
'start_date' => '2025-12-01',
'end_date' => '2025-12-31',
'cas_types' => [
'cdsl',
'nsdl'
]
]),
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/cas"
payload := strings.NewReader("{\n \"start_date\": \"2025-12-01\",\n \"end_date\": \"2025-12-31\",\n \"cas_types\": [\n \"cdsl\",\n \"nsdl\"\n ]\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/cas")
.header("x-inbox-token", "<x-inbox-token>")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"start_date\": \"2025-12-01\",\n \"end_date\": \"2025-12-31\",\n \"cas_types\": [\n \"cdsl\",\n \"nsdl\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.casparser.in/v4/inbox/cas")
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 \"start_date\": \"2025-12-01\",\n \"end_date\": \"2025-12-31\",\n \"cas_types\": [\n \"cdsl\",\n \"nsdl\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"files": [
{
"message_id": "18d4a2b3c4d5e6f7",
"filename": "cdsl_20250115_a1b2c3d4.pdf",
"original_filename": "CDSL_CAS_Statement.pdf",
"message_date": "2025-01-15",
"cas_type": "cdsl",
"sender_email": "eCAS@cdslstatement.com",
"size": 245000,
"url": "https://cdn.casparser.in/email-cas/user123/cdsl_20250115_a1b2c3d4.pdf",
"expires_in": 86400
}
],
"count": 5
}{
"status": "error",
"msg": "Email access revoked. Please reconnect.",
"requires_reconnect": true
}{
"status": "failed",
"msg": "Invalid PDF file or password."
}Authorizations
Your API key for authentication.
Use sandbox-with-json-responses as Sandbox key.
Headers
The encrypted inbox token
Body
application/json
Start date in ISO format (YYYY-MM-DD). Defaults to 30 days ago.
Example:
"2025-12-01"
End date in ISO format (YYYY-MM-DD). Defaults to today.
Example:
"2025-12-31"
Filter by CAS provider(s):
cdsl→ eCAS@cdslstatement.comnsdl→ NSDL-CAS@nsdl.co.incams→ donotreply@camsonline.comkfintech→ samfS@kfintech.com
Available options:
cdsl, nsdl, cams, kfintech Example:
["cdsl", "nsdl"]
Was this page helpful?
⌘I

