Overview
Email Inbox Import lets users import CAS statements directly from their email — no file uploads or password sharing needed. Supports Gmail, Outlook, and Zoho Mail. Security features:- Read-only access (cannot send emails)
- OAuth-based consent flow
- User can revoke access anytime
- Tokens encrypted server-side
Supported providers
Passprovider in the connect request to choose the mail service. Defaults to gmail.
Any unrecognised value is treated as
gmail. The resolved provider is returned in the connect response and reported by /v4/inbox/status.
Integration flow
Step 1: Initiate OAuth
Step 2: User grants consent
The user is redirected to their provider’s OAuth consent screen. After granting access, they’re redirected back to yourredirect_uri with an inbox_token:
The
inbox_token is long-lived — it stores an encrypted refresh token. A single OAuth connect gives ongoing access to both historical and future CAS statements in the user’s inbox. Reuse the same token for every /v4/inbox/cas call until the user revokes access via /v4/inbox/disconnect or their provider’s account settings.Step 3: List CAS files from inbox
Step 4: Disconnect (optional)
API endpoints
Response format
Download URLs expire in 24 hours. The response contains URLs only — parse each file with
/v4/smart/parse.Credit usage
Using with Portfolio Connect SDK
The Portfolio Connect SDK has built-in inbox import across all supported providers:Next steps
CDSL OTP Fetch
Real-time holdings via OTP
Portfolio Connect SDK
Drop-in frontend widget

