List Files Received
curl --request GET \
--url https://api.casparser.in/v4/inbound-email/{inbound_email_id}/files \
--header 'x-api-key: <api-key>'import requests
url = "https://api.casparser.in/v4/inbound-email/{inbound_email_id}/files"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.casparser.in/v4/inbound-email/{inbound_email_id}/files', 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/inbound-email/{inbound_email_id}/files",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.casparser.in/v4/inbound-email/{inbound_email_id}/files"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.casparser.in/v4/inbound-email/{inbound_email_id}/files")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.casparser.in/v4/inbound-email/{inbound_email_id}/files")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
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,
"received_at": "2025-02-21T10:45:12.000123+00:00"
}
],
"count": 1,
"cursor": "2025-02-21T10:45:12.000123+00:00"
}{
"status": "failed",
"msg": "Invalid PDF file or password."
}{
"status": "failed",
"msg": "Authentication failed: API key is missing. Please provide a valid API key in the x-api-key header."
}{
"status": "failed",
"msg": "Invalid PDF file or password."
}Inbound Email
List Files Received
Retrieve CAS files forwarded to this inbound email. Available for every
inbound email, regardless of whether a callback_url was set — use it
to avoid building a webhook consumer, to poll alongside a webhook, or
to replay missed webhook deliveries.
Pass the cursor from the previous response as since to receive only
new files.
GET
/
v4
/
inbound-email
/
{inbound_email_id}
/
files
List Files Received
curl --request GET \
--url https://api.casparser.in/v4/inbound-email/{inbound_email_id}/files \
--header 'x-api-key: <api-key>'import requests
url = "https://api.casparser.in/v4/inbound-email/{inbound_email_id}/files"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.casparser.in/v4/inbound-email/{inbound_email_id}/files', 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/inbound-email/{inbound_email_id}/files",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.casparser.in/v4/inbound-email/{inbound_email_id}/files"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.casparser.in/v4/inbound-email/{inbound_email_id}/files")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.casparser.in/v4/inbound-email/{inbound_email_id}/files")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
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,
"received_at": "2025-02-21T10:45:12.000123+00:00"
}
],
"count": 1,
"cursor": "2025-02-21T10:45:12.000123+00:00"
}{
"status": "failed",
"msg": "Invalid PDF file or password."
}{
"status": "failed",
"msg": "Authentication failed: API key is missing. Please provide a valid API key in the x-api-key header."
}{
"status": "failed",
"msg": "Invalid PDF file or password."
}Authorizations
Your API key for authentication.
Use sandbox-with-json-responses as Sandbox key.
Path Parameters
Inbound Email ID (e.g., ie_a1b2c3d4e5f6)
Query Parameters
ISO 8601 timestamp. Only files with received_at strictly greater
than this value are returned. Use the cursor value from the
previous response.
Maximum files to return.
Required range:
1 <= x <= 50Response
Files received at this inbound email since the cursor
Was this page helpful?

