> ## Documentation Index
> Fetch the complete documentation index at: https://casparser.in/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Verify a SEBI-registered intermediary

> Verify any SEBI-registered intermediary. Provide a `registration_number`
and the category is auto-detected from its sequence (e.g. `INA…` →
Investment Adviser, `INP…` → Portfolio Manager, `INZ…` → Stock Broker).
Alternatively, provide a `name` together with a `type` slug. `type` can
also override detection, and is required for fund/FPI registration
numbers that do not encode a category.

`verified` is `true` only when a current registration is found and its
status is `ACTIVE`. A missing registration returns HTTP 200 with
`verified: false` and `registration_status: NOT_FOUND`.

**Credits:** 0.25 per successful verification.




## OpenAPI

````yaml /api-reference/openapi.yaml post /v1/verify/sebi
openapi: 3.1.0
info:
  title: CAS Parser - Track Portfolios from CDSL, NSDL, CAMS, KFintech
  description: >-
    API for parsing and analyzing CAS (Consolidated Account Statement) PDF files
    from NSDL, CDSL, and CAMS/KFintech, with a unified response format
  version: 4.0.0
  contact:
    name: Sameer Kumar
    email: sameer@casparser.in
servers:
  - url: https://api.casparser.in
    description: Production server
  - url: https://portfolio-parser.api.casparser.in
    description: Legacy production server (still supported)
  - url: http://localhost:5000
    description: Local development server
security: []
tags:
  - name: CAS Parser
    description: Endpoints for parsing CAS PDF files from different sources.
  - name: CAS Generator
    description: >-
      Endpoints for generating new CAS documents via email mailback (KFintech
      and CAMS).
  - name: CAS Fetch
    description: |
      Endpoints for fetching CAS documents with instant download.
      Currently supports CDSL via OTP authentication.
  - name: Email Import
    description: >
      Endpoints for importing CAS files directly from user email inboxes.


      **Supported Providers:**


      - **Gmail** (`gmail`, default) — `@gmail.com` and Google Workspace domains

      - **Microsoft** (`outlook`) — personal Microsoft accounts: `@outlook.com`,
        `@hotmail.com`, `@live.com`, `@msn.com`, and localised variants such as
        `@hotmail.co.uk`, `@live.in`, `@hotmail.fr`. Any other address registered
        as a personal Microsoft account also works, including custom domains.
      - **Zoho Mail** (`zoho`) — Zoho-hosted mailboxes, including custom domains


      **How it works:**

      1. Call `POST /v4/inbox/connect` to get an OAuth URL

      2. Redirect user to the OAuth URL for consent

      3. User is redirected back to your `redirect_uri` with an encrypted
      `inbox_token`

      4. Use the token to list/fetch CAS files from their inbox
      (`/v4/inbox/cas`)

      5. Files are uploaded to temporary cloud storage (URLs expire in 24 hours)


      **Security:**

      - Read-only access (we cannot send emails)

      - Tokens are encrypted with server-side secret

      - User can revoke access anytime via `/v4/inbox/disconnect`
  - name: Inbound Email
    description: >
      Create dedicated inbound email addresses for investors to forward their
      CAS statements.


      **Use Case:** Your app wants to collect CAS statements from users without
      requiring OAuth or file upload.


      **How it works:**

      1. Call `POST /v4/inbound-email` to create a unique inbound email address

      2. Display this email to your user: "Forward your CAS statement to
      ie_xxx@import.casparser.in"

      3. When user forwards a CAS email, we verify sender authenticity
      (SPF/DKIM) and call your webhook

      4. Your webhook receives email metadata + attachment download URLs


      **Sender Validation:**

      - Only emails from verified CAS authorities are processed:
        - CDSL: `eCAS@cdslstatement.com`
        - NSDL: `NSDL-CAS@nsdl.co.in`
        - CAMS: `donotreply@camsonline.com`
        - KFintech: `samfS@kfintech.com`
      - Emails failing SPF/DKIM/DMARC are rejected

      - Forwarded emails must contain the original sender in headers


      **Billing:** 0.2 credits per successfully processed valid email
  - name: Contract Note Parser
    description: >-
      Endpoints for parsing Contract Note PDF files from various SEBI brokers
      like Zerodha, Groww, Upstox, ICICI etc.
  - name: Authorization
    description: |
      Endpoints for checking API quota and credits usage.
      These endpoints help you monitor your API usage and remaining quota.
  - name: Portfolio Connect
    description: >
      Endpoints for managing access tokens for the Portfolio Connect SDK.

      Use these to generate short-lived `at_` prefixed tokens that can be safely
      passed to frontend applications.

      Access tokens can be used in place of API keys on all v4 endpoints.
  - name: Agent Auth
    description: >
      Endpoints for coding agents to obtain API keys via a browser-based
      approval flow.


      **How it works:**

      1. Agent generates a random token locally (e.g. `openssl rand -hex 32`).
      No API call needed.

      2. Agent asks the user to open
      `https://app.casparser.in/agent-auth?token=<token>&client_name=<name>`

      3. User signs in via the browser and clicks Approve.

      4. Agent polls `GET /v1/agent-auth/token/{token}` every 5 seconds until
      the key is delivered.


      **Security:**

      - Token must be 16-128 characters (recommended: 64 hex chars / 256 bits)

      - Approved keys are delivered once (one-shot) and then deleted

      - Tokens expire after 10 minutes if not approved
  - name: KYC
    description: >
      Endpoints for verifying KYC (Know Your Customer) status of Indian
      investors.


      **Data source:** CVL KRA public inquiry portal (cvlkra.com), which
      aggregates

      records from all five SEBI-registered KRAs: CVL, NDML, CAMS, Karvy, and
      KFin.


      **Status normalization:** Raw CVL portal strings are normalized into clean
      enums.

      See the `kyc_status` property on `KycPanStatusResponse` for the full list.


      **Credits:** 0.25 per successful lookup. Failed lookups are not billed.
  - name: Verification
    description: |
      Verify the regulatory registration of a financial intermediary — a yes/no
      check rather than a directory search.

      - **`/v1/verify/sebi`** — any SEBI-registered intermediary (Investment
        Adviser, Research Analyst, Portfolio Manager, Stock Broker, Mutual Fund,
        AIF, and more). Send a `registration_number` and the category is
        auto-detected from its sequence; or send a `name` with an explicit `type`.
      - **`/v1/verify/mfd`** — AMFI mutual-fund distributors by ARN, including a
        screen against AMFI's suspended / terminated / terminated-EUIN lists.

      A "not found" result is a successful verification (HTTP 200,
      `verified: false`) and is billed. Upstream failures surface as 5xx and are
      not billed.

      **Credits:** 0.25 per successful verification.
paths:
  /v1/verify/sebi:
    post:
      tags:
        - Verification
      summary: Verify a SEBI-registered intermediary
      description: |
        Verify any SEBI-registered intermediary. Provide a `registration_number`
        and the category is auto-detected from its sequence (e.g. `INA…` →
        Investment Adviser, `INP…` → Portfolio Manager, `INZ…` → Stock Broker).
        Alternatively, provide a `name` together with a `type` slug. `type` can
        also override detection, and is required for fund/FPI registration
        numbers that do not encode a category.

        `verified` is `true` only when a current registration is found and its
        status is `ACTIVE`. A missing registration returns HTTP 200 with
        `verified: false` and `registration_status: NOT_FOUND`.

        **Credits:** 0.25 per successful verification.
      operationId: verifySebiIntermediary
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              anyOf:
                - required:
                    - registration_number
                - required:
                    - name
                    - type
              properties:
                registration_number:
                  type: string
                  description: >-
                    SEBI registration number. When provided, the category is
                    auto-detected from its sequence (INA…→investment-adviser,
                    INH…→research-analyst, INP…→portfolio-manager,
                    INM…→merchant-banker, INR…→registrar-transfer-agent,
                    INZ…→stock-broker). This is the authoritative input — any
                    `name` sent alongside it is ignored.
                  example: INP000000670
                name:
                  type: string
                  description: >-
                    Entity/trade name to search by. Used only when
                    `registration_number` is absent, and then `type` is
                    required.
                  example: Motilal Oswal
                type:
                  type: string
                  description: >-
                    Category slug. Overrides auto-detection; required for a name
                    search and for fund/FPI registration numbers that don't
                    encode a category. Short aliases are also accepted (ria, ra,
                    pms, broker, rta, mf, aif, cra, vcf, fvci, fpi, kra, invit,
                    reit).
                  enum:
                    - investment-adviser
                    - research-analyst
                    - portfolio-manager
                    - stock-broker
                    - merchant-banker
                    - registrar-transfer-agent
                    - mutual-fund
                    - alternative-investment-fund
                    - credit-rating-agency
                    - custodian
                    - debenture-trustee
                    - venture-capital-fund
                    - foreign-venture-capital-investor
                    - foreign-portfolio-investor
                    - kyc-registration-agency
                    - infrastructure-investment-trust
                    - real-estate-investment-trust
                    - esg-rating-provider
                    - vault-manager
                  example: portfolio-manager
      responses:
        '200':
          description: Verification completed (found or not found)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SebiVerifyResponse'
              examples:
                found:
                  summary: Active registration found
                  value:
                    status: success
                    verified: true
                    authority: SEBI
                    category: portfolio-manager
                    category_label: Portfolio Manager (PMS)
                    registration_number: INP000000670
                    name: MOTILAL OSWAL ASSET MANAGEMENT COMPANY LIMITED
                    registration_status: ACTIVE
                    valid_from: '2014-09-16'
                    valid_till: null
                    is_perpetual: true
                    address: >-
                      10th Floor, Motilal Oswal Tower, Prabhadevi, MUMBAI,
                      MAHARASHTRA, 400025
                    email: null
                    telephone: null
                    contact_person: null
                    detected_by: registration_number
                not_found:
                  summary: No current registration in this category
                  value:
                    status: success
                    verified: false
                    authority: SEBI
                    category: investment-adviser
                    category_label: Investment Adviser (RIA)
                    registration_number: INA999999999
                    name: null
                    registration_status: NOT_FOUND
                    valid_from: null
                    valid_till: null
                    is_perpetual: false
                    address: null
                    email: null
                    telephone: null
                    contact_person: null
                    detected_by: registration_number
        '400':
          description: >-
            Invalid request — provide either `registration_number`, or `name`
            together with `type`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '422':
          description: >-
            Category could not be detected from the registration number; pass a
            `type`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          $ref: '#/components/responses/InternalError'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    SebiVerifyResponse:
      type: object
      description: >-
        Result of a SEBI intermediary verification. Every listed property is
        always present on a 200 response (fields are null when not applicable);
        `verified` is the boolean gate to act on.
      required:
        - status
        - verified
        - authority
        - category
        - registration_status
        - detected_by
      properties:
        status:
          type: string
          enum:
            - success
        verified:
          type: boolean
          description: True only when a current registration is found and ACTIVE.
        authority:
          type: string
          enum:
            - SEBI
        category:
          type: string
          description: Detected/selected category slug.
          enum:
            - investment-adviser
            - research-analyst
            - portfolio-manager
            - stock-broker
            - merchant-banker
            - registrar-transfer-agent
            - mutual-fund
            - alternative-investment-fund
            - credit-rating-agency
            - custodian
            - debenture-trustee
            - venture-capital-fund
            - foreign-venture-capital-investor
            - foreign-portfolio-investor
            - kyc-registration-agency
            - infrastructure-investment-trust
            - real-estate-investment-trust
            - esg-rating-provider
            - vault-manager
          example: portfolio-manager
        category_label:
          type: string
          example: Portfolio Manager (PMS)
        registration_number:
          type: string
          nullable: true
          example: INP000000670
        name:
          type: string
          nullable: true
        registration_status:
          type: string
          description: >-
            ACTIVE = currently registered; EXPIRED = validity end date passed;
            NOT_FOUND = no current registration in this category.
          enum:
            - ACTIVE
            - EXPIRED
            - NOT_FOUND
        valid_from:
          type: string
          format: date
          nullable: true
        valid_till:
          type: string
          format: date
          nullable: true
          description: Null when the registration is perpetual.
        is_perpetual:
          type: boolean
        address:
          type: string
          nullable: true
        email:
          type: string
          nullable: true
        telephone:
          type: string
          nullable: true
        contact_person:
          type: string
          nullable: true
        detected_by:
          type: string
          enum:
            - registration_number
            - type
          description: How the category was resolved.
      example:
        status: success
        verified: true
        authority: SEBI
        category: investment-adviser
        category_label: Investment Adviser (RIA)
        registration_number: INA000000888
        name: 360 ONE Investment Adviser and Trustee Services Limited
        registration_status: ACTIVE
        valid_from: '2014-01-22'
        valid_till: null
        is_perpetual: true
        address: IIFL Centre, Kamala Mills, Lower Parel, MUMBAI, MAHARASHTRA, 400013
        email: advcompliance@360.one
        telephone: '0918268532456'
        contact_person: Deepika Ghagare
        detected_by: registration_number
    ErrorResponse:
      type: object
      required:
        - status
        - msg
      properties:
        status:
          type: string
          description: The status of the error.
          enum:
            - failed
          example: failed
        msg:
          type: string
          description: A descriptive message explaining the error.
          example: Invalid PDF file or password.
    AuthErrorResponse:
      type: object
      required:
        - status
        - msg
      properties:
        status:
          type: string
          description: The status of the error.
          enum:
            - failed
          example: failed
        msg:
          type: string
          description: A descriptive message explaining the error.
          example: 'Authentication failed: API key is missing.'
  responses:
    Unauthorized:
      description: Unauthorized. This can happen if the `x-api-key` header is missing.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/AuthErrorResponse'
          example:
            status: failed
            msg: >-
              Authentication failed: API key is missing. Please provide a valid
              API key in the x-api-key header.
    Forbidden:
      description: >-
        Forbidden. This can happen if the API key is invalid or the quota has
        been exceeded.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/AuthErrorResponse'
          example:
            status: failed
            msg: >-
              Authentication failed: API quota exceeded or invalid API key.
              Please check your API key or quota limits.
    InternalError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: |
        Your API key for authentication.
        Use `sandbox-with-json-responses` as Sandbox key.

````