---
title: "List Files Received"
method: GET
path: "/v4/inbound-email/{inbound_email_id}/files"
tags: ["Inbound Email"]
---

# List Files Received

`GET /v4/inbound-email/{inbound_email_id}/files`

## Request

- Base URL: `https://api.casparser.in`
- URL: `https://api.casparser.in/v4/inbound-email/{inbound_email_id}/files`
- Auth: API key in header `x-api-key`

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.

## Path parameters

- `inbound_email_id` string, required

## Query parameters

- `since` string, date-time
- `limit` integer

## Response `200`

Files received at this inbound email since the cursor

- object
  - `status` string
  - `files` ReceivedEmailCASFile[]: Files received (sorted oldest-first)
    - `message_id` string: Unique identifier for the email message (use for subsequent API calls)
    - `filename` string: Standardized filename (provider_YYYYMMDD_uniqueid.pdf)
    - `original_filename` string: Original attachment filename from the email
    - `message_date` string, date: Date the email was received
    - `cas_type` 'cdsl' | 'nsdl' | 'cams' | 'kfintech': Detected CAS provider based on sender email
    - `sender_email` string, email: Email address of the CAS authority (CDSL, NSDL, CAMS, or KFintech) who originally sent this statement
    - `size` integer: File size in bytes
    - `url` string, uri: Direct download URL (presigned, expires based on expires_in)
    - `expires_in` integer: URL expiration time in seconds. Defaults vary by source: - Email Inbox Import (Gmail, Outlook, Zoho): 86400 (24h) - Inbound Email with `callback_url` set: 172800 (48h) - Inbound Email without `callback_url`: aligned with the session TTL (~30 min)
    - `received_at` string, date-time: ISO 8601 timestamp (microsecond precision) when the file was persisted. Use as the `since` cursor on subsequent polls.
  - `count` integer
  - `cursor` string, date-time, nullable: Pass as `since` on the next poll. `null` if no files and no prior cursor.

## Other responses

- `400`: Malformed query parameters
- `401`: Unauthorized. This can happen if the `x-api-key` header is missing.
- `404`: Inbound email not found or expired

## Changes

- **2026-09-13** `cf1b57c0f2f7`: 1 warning
  - the optional response header `X-Request-ID` removed for the status `401`
- **2026-07-12** `c74b9ecd5b53`: 1 warning
  - added the new `failed` enum value to the `status` response property for the response status `401`
- **2026-04-20** `78ef474b9e17`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/casparser/apis/cas-parser-track-portfolios-from-cdsl-nsdl-cams-kfintech-2/changes/v4/inbound-email/:inbound_email_id/files/get.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/9d8f1445bad3?raw)
