---
title: "CAS Generator (Email Mailback)"
method: POST
path: "/v4/generate"
tags: ["CAS Generator"]
---

# CAS Generator (Email Mailback)

`POST /v4/generate`

## Request

- Base URL: `https://api.casparser.in`
- URL: `https://api.casparser.in/v4/generate`
- Auth: API key in header `x-api-key`

Generate a mutual fund CAS statement via email mailback. The CAS PDF will be sent to the investor's email.

KFintech and CAMS have a mutual partnership for data sharing and consolidation,
so this endpoint retrieves mutual fund data from **both RTAs**, covering all
mutual funds in India.

This is an async operation - the investor receives the CAS via email within a few minutes.

By default, a **Detailed CAS** is generated, which includes the complete transaction history.
The parsing layer supports all statement types (Detailed, Summary, etc.), but generation
always requests the Detailed variant for maximum data coverage.

`cas_authority` picks which RTA sends the email. The portfolio data is the same either
way — only the PDF password policy differs. With `cams`, a PAN is a valid password.

## Request body

- object
  - `email` string, required: Email address to receive the CAS document
  - `pan_no` string: PAN number (optional)
  - `from_date` string, required: Start date (YYYY-MM-DD)
  - `to_date` string, required: End date (YYYY-MM-DD)
  - `password` string, required: Password protecting the emailed PDF. Must satisfy the chosen authority's policy — `cams` requires 6-20 characters with at least two digits, so a PAN works.
  - `cas_authority` 'kfintech' | 'cams': RTA that sends the mailback. Affects only the password policy, not the portfolio data returned.

## Response `200`

Request submitted successfully

- object
  - `status` string
  - `msg` string

## Other responses

- `400`: Bad request (Invalid PDF file, missing parameters, or invalid password)
- `401`: Unauthorized. This can happen if the `x-api-key` header is missing.
- `500`: Internal server error

## Changes

- **2026-10-18** `9d8f1445bad3`: 1 info
  - added the new optional request property `cas_authority`
- **2026-09-13** `cf1b57c0f2f7`: 2 warning
  - the optional response header `X-Request-ID` removed for the status `401`
  - the optional response header `X-Request-ID` removed for the status `500`
- **2026-07-28** `993ecfa3a31b`: 1 info
  - endpoint added
- **2026-07-28** `c98e41084fda`: 1 breaking
  - api path removed without deprecation
- **2026-07-26** `2dbfcec66317`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/casparser/apis/cas-parser-track-portfolios-from-cdsl-nsdl-cams-kfintech-2/changes/v4/generate/post.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)
