@@ -8,7 +8,14 @@ import { RequestOptions } from '../internal/request-options';
88/**
99 * Endpoints for importing CAS files directly from user email inboxes.
1010 *
11- * **Supported Providers:** Gmail (more coming soon)
11+ * **Supported Providers:**
12+ *
13+ * - **Gmail** (`gmail`, default) — `@gmail.com` and Google Workspace domains
14+ * - **Microsoft** (`outlook`) — personal Microsoft accounts: `@outlook.com`,
15+ * `@hotmail.com`, `@live.com`, `@msn.com`, and localised variants such as
16+ * `@hotmail.co.uk`, `@live.in`, `@hotmail.fr`. Any other address registered
17+ * as a personal Microsoft account also works, including custom domains.
18+ * - **Zoho Mail** (`zoho`) — Zoho-hosted mailboxes, including custom domains
1219 *
1320 * **How it works:**
1421 * 1. Call `POST /v4/inbox/connect` to get an OAuth URL
@@ -66,7 +73,10 @@ export class Inbox extends APIResource {
6673 * - `state` - Your original state parameter
6774 *
6875 * **Store the `inbox_token` client-side** and use it for all subsequent inbox API
69- * calls.
76+ * calls. The token is long-lived (it stores an encrypted refresh token), so a
77+ * single OAuth connect gives ongoing access to both historical and future CAS
78+ * statements in the user's inbox. Reuse the same token until the user revokes
79+ * access via `/v4/inbox/disconnect` or their provider's account settings.
7080 *
7181 * @example
7282 * ```ts
@@ -166,6 +176,11 @@ export interface InboxConnectEmailResponse {
166176 */
167177 oauth_url ?: string ;
168178
179+ /**
180+ * The provider this OAuth URL was generated for
181+ */
182+ provider ?: 'gmail' | 'outlook' | 'zoho' ;
183+
169184 status ?: string ;
170185}
171186
@@ -199,7 +214,7 @@ export namespace InboxListCasFilesResponse {
199214 /**
200215 * URL expiration time in seconds. Defaults vary by source:
201216 *
202- * - Gmail Inbox Import: 86400 (24h)
217+ * - Email Inbox Import (Gmail, Outlook, Zoho) : 86400 (24h)
203218 * - Inbound Email with `callback_url` set: 172800 (48h)
204219 * - Inbound Email without `callback_url`: aligned with the session TTL (~30 min)
205220 */
@@ -256,6 +271,21 @@ export interface InboxConnectEmailParams {
256271 */
257272 redirect_uri : string ;
258273
274+ /**
275+ * Mail provider to connect. Defaults to `gmail`.
276+ *
277+ * - `gmail` - Google accounts: `@gmail.com` and Google Workspace domains.
278+ * - `outlook` - personal Microsoft accounts: `@outlook.com`, `@hotmail.com`,
279+ * `@live.com`, `@msn.com` and localised variants (`@hotmail.co.uk`, `@live.in`,
280+ * `@hotmail.fr`). Any other address registered as a personal Microsoft account
281+ * also works, including custom domains.
282+ * - `zoho` - Zoho Mail accounts, including custom domains hosted on Zoho.
283+ *
284+ * Any unrecognised value is treated as `gmail`. The resolved provider is returned
285+ * in the response.
286+ */
287+ provider ?: 'gmail' | 'outlook' | 'zoho' ;
288+
259289 /**
260290 * State parameter for CSRF protection (returned in redirect)
261291 */
0 commit comments