v13

latestOpenAPI 3.1.0raw.githubusercontent.com2026-08-022830130.4 KB
Inbound Email

Create Inbound Email

Create a dedicated inbound email address for collecting CAS statements via email forwarding. When an investor forwards a CAS email to this address, we verify the sender and make the file available to you.

callback_url is optional:

  • Set it — we POST each parsed email to your webhook as it arrives.
  • Omit it — retrieve files via GET /v4/inbound-email/{id}/files without building a webhook consumer.
post/v4/inbound-email

Request body

aliasstring

Optional custom email prefix (e.g. john-portfolio@import.casparser.in). 3-32 chars, alphanumeric + hyphens, must start/end with a letter or number. If omitted, a random ID is generated.

referencestring

Your internal identifier (e.g., user_id, account_id). Returned in webhook payload for correlation.

callback_urlstring uri nullable

Optional webhook URL where we POST parsed emails. Must be HTTPS in production (HTTP allowed for localhost). If omitted, retrieve files via GET /v4/inbound-email/{id}/files.

allowed_sourcesstring[]

Filter emails by CAS provider. If omitted, accepts all providers.

  • cdsleCAS@cdslstatement.com
  • nsdlNSDL-CAS@nsdl.co.in
  • camsdonotreply@camsonline.com
  • kfintechsamfS@kfintech.com
metadataobject

Optional key-value pairs (max 10) to include in webhook payload. Useful for passing context like plan_type, campaign_id, etc.

Example request

{
  "alias": "john-portfolio",
  "reference": "user_12345",
  "callback_url": "https://api.yourapp.com/webhooks/cas-email",
  "allowed_sources": [
    "cdsl",
    "nsdl"
  ],
  "metadata": {
    "plan": "premium",
    "source": "onboarding"
  }
}

Response

Inbound email created successfully

inbound_email_idstring

Unique inbound email identifier

emailstring email

The inbound email address to forward CAS statements to

referencestring nullable

Your internal reference identifier

callback_urlstring uri

Webhook URL for email notifications. If set, we POST each parsed email here. If omitted, files are only retrievable via GET /v4/inbound-email/{id}/files.

allowed_sourcesstring[]

Accepted CAS providers (empty = all)

status'active' | 'paused'

Current inbound email lifecycle status

metadataobject

Custom key-value metadata

created_atstring date-time

When the inbound email was created

updated_atstring date-time

When the inbound email was last updated

Example response

{
  "inbound_email_id": "ie_a1b2c3d4e5f6",
  "email": "ie_a1b2c3d4e5f6@import.casparser.in",
  "reference": "user_12345",
  "callback_url": "https://api.yourapp.com/webhooks/cas-email",
  "allowed_sources": [
    "cdsl",
    "nsdl"
  ],
  "status": "active",
  "metadata": {
    "plan": "premium"
  },
  "created_at": "2025-02-21T10:30:00Z",
  "updated_at": "2025-02-21T10:30:00Z"
}