---
title: "Create Inbound Email"
method: POST
path: "/v4/inbound-email"
tags: ["Inbound Email"]
---

# Create Inbound Email

`POST /v4/inbound-email`

## Request

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

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.

## Request body

- object
  - `alias` string: 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.
  - `reference` string: Your internal identifier (e.g., user_id, account_id). Returned in webhook payload for correlation.
  - `callback_url` string, 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_sources` string[]: Filter emails by CAS provider. If omitted, accepts all providers. - `cdsl` → eCAS@cdslstatement.com - `nsdl` → NSDL-CAS@nsdl.co.in - `cams` → donotreply@camsonline.com - `kfintech` → samfS@kfintech.com
  - `metadata` object: Optional key-value pairs (max 10) to include in webhook payload. Useful for passing context like plan_type, campaign_id, etc.

## Response `201`

Inbound email created successfully

- InboundEmail: An inbound email address for receiving forwarded CAS emails
  - `inbound_email_id` string: Unique inbound email identifier
  - `email` string, email: The inbound email address to forward CAS statements to
  - `reference` string, nullable: Your internal reference identifier
  - `callback_url` string, 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_sources` string[]: Accepted CAS providers (empty = all)
  - `status` 'active' | 'paused': Current inbound email lifecycle status
  - `metadata` object: Custom key-value metadata
  - `created_at` string, date-time: When the inbound email was created
  - `updated_at` string, date-time: When the inbound email was last updated

## Other responses

- `400`: Invalid request (malformed URL, invalid sources, etc.)
- `401`: Unauthorized. This can happen if the `x-api-key` header is missing.

## 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-05-02** `5ecdc4dbeaff`: 1 breaking
  - the request property `callback_url` became not nullable
- **2026-04-20** `78ef474b9e17`: 1 breaking, 2 info
  - the response property `callback_url` became nullable for the status `201`
  - the request property `callback_url` became nullable
  - the request property `callback_url` became optional
- **2026-02-23** `e6762e83ef7c`: 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/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)
