---
title: "CDSL CAS Fetch - Step 2 (Verify OTP & Get Files)"
method: POST
path: "/v4/cdsl/fetch/{session_id}/verify"
tags: ["CAS Fetch"]
---

# CDSL CAS Fetch - Step 2 (Verify OTP & Get Files)

`POST /v4/cdsl/fetch/{session_id}/verify`

## Request

- Base URL: `https://api.casparser.in`
- URL: `https://api.casparser.in/v4/cdsl/fetch/{session_id}/verify`
- Auth: API key in header `x-api-key`

**Step 2 of 2**: Verify OTP and retrieve CDSL CAS files.

After successful verification, CAS PDFs are fetched from CDSL portal,
uploaded to cloud storage, and returned as direct download URLs.

## Path parameters

- `session_id` string, required

## Request body

- object
  - `otp` string, required: OTP received on mobile
  - `num_periods` integer: Number of monthly statements to fetch (default 6)

## Response `200`

CAS files fetched successfully

- object
  - `status` string
  - `msg` string
  - `files` object[]
    - `filename` string
    - `url` string: Direct download URL (cloud storage)

## 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.
- `404`: Session not found or expired
- `500`: Internal server error

## Changes

- **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-12** `c74b9ecd5b53`: 1 warning
  - added the new `failed` enum value to the `status` response property for the response status `401`
- **2026-02-14** `7e6397bddc22`: 1 info
  - endpoint added

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