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

# API

> API reference for InboxKit: every `inboxkit.api.*` operation with input and output types.

Every `inboxkit.api.*` operation is listed below with parameter shapes and return types from the plugin Zod schemas.

> [!NOTE]
>
> **New to Corsair?** See [API access](https://docs.corsair.dev/concepts/api.md), [authentication](https://docs.corsair.dev/concepts/auth.md), and [error handling](https://docs.corsair.dev/concepts/error-handling).

## Account

### get

`account.get`

The team's wallet balance, mailbox slots, current plan, auto top-up settings and price per mailbox.

**Risk:** `read`

```ts theme={null}
await corsair.inboxkit.api.account.get({});
```

**Input:** *empty object*

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `uid` | `string \| null` | No | Team unique identifier |
| `team` | `string \| null` | No | Team name |
| `admin_email` | `string \| null` | No | Admin user email address |
| `total_credits` | `number \| null` | No | Total wallet balance available |
| `credits_used` | `number \| null` | No | Wallet balance consumed |
| `credits_remaining` | `number \| null` | No | Remaining wallet balance available |
| `credits_per_google_mailbox` | `number \| null` | No | Price set for each Google mailbox per month, in USD. |
| `credits_per_ms_outlook_mailbox` | `number \| null` | No | Price set for each Microsoft Outlook mailbox per month, in USD. |
| `credits_per_azure_domain` | `number \| null` | No | Your current price for each new Azure domain, per month, in USD. Azure is charged per domain, not per mailbox. |
| `mailbox_renewal_cycle` | `string \| null` | No | How often your mailboxes and Azure domains are billed. A purchase is charged for one full cycle up front: 1 month for monthly, 3 for quarterly, 12 for yearly. |
| `subscription_mailbox_slots_google` | `number \| null` | No | Google mailbox slots granted by the subscription plan. |
| `subscription_mailbox_slots_google_used` | `number \| null` | No | Google slots currently occupied. Counted from live mailboxes, so it includes mailboxes scheduled for cancellation until their renewal date passes. |
| `subscription_mailbox_slots_google_remaining` | `number \| null` | No | Google slots still free. This is how many more Google mailboxes a Google-only order can place on slots without drawing on the wallet balance, provided… |
| `subscription_mailbox_slots_ms_outlook` | `number \| null` | No | Microsoft Outlook mailbox slots granted by the subscription plan. |
| `subscription_mailbox_slots_ms_outlook_used` | `number \| null` | No | Microsoft Outlook slots currently occupied. Counted from live mailboxes, so it includes mailboxes scheduled for cancellation until their renewal date passes. |
| `subscription_mailbox_slots_ms_outlook_remaining` | `number \| null` | No | Microsoft Outlook slots still free. This is how many more Outlook mailboxes an Outlook-only order can place on slots, provided… |
| `subscription_mailbox_slots_total` | `number \| null` | No | Total slots across both platforms (Google + Microsoft Outlook). Azure is not included: it is priced per domain and has no slot pool. |
| `subscription_mailbox_slots_used` | `number \| null` | No | Total slots occupied across both platforms. |
| `subscription_mailbox_slots_remaining` | `number \| null` | No | Total slots still free across both platforms. IMPORTANT: this is the sum of the two per-platform remaining values, NOT total minus used. |
| `subscription_mailbox_slots_purchasable` | `boolean \| null` | No | Whether slots can be spent right now. False when the team's subscription is past\_due, unpaid, cancelled, incomplete or payment\_failed, in which case every slot… |
| `current_plan` | `object \| null` | No | Current subscription plan details |
| `auto_topup_enabled` | `boolean \| null` | No | Whether automatic amount top-up is enabled |
| `auto_topup_config` | `object \| null` | No | Auto top-up configuration settings |
| `webhook_url` | `string \| null` | No | Webhook URL set for your account, or null when none is set. |

> [accordion] current\_plan full type
>
> ```ts theme={null}
> {
>   name?: string | null,
>   uid?: string | null,
>   cycle?: string | null,
>   pricing?: number | null,
>   renews_on?: string | null,
>   purchased_on?: string | null
> } | null
> ```

> [accordion] auto\_topup\_config full type
>
> ```ts theme={null}
> {
>   mode?: string | null,
>   drops_below?: number | null,
>   add_credits?: number | null,
>   forecast_hours?: number | null
> } | null
> ```

***

## Billing

### addCredits

`billing.addCredits`

SPENDS MONEY. Buy wallet credits. With direct\_charge the saved card is charged at once; otherwise this returns a hosted checkout link.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.inboxkit.api.billing.addCredits({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `credits` | `number` | Yes | Amount in USD to add to the wallet. \$1 = 1 credit. |
| `direct_charge` | `boolean` | No | When `true`, charges the team's default payment method immediately (off-session) and applies credits synchronously. Returns Stripe decline details with HTTP 402 on failure. |
| `guest_mode` | `boolean` | No | When `true`, returns a white-label Checkout link suitable for sharing with an end user. The team's email is hidden on the Checkout page and the payer's card is not saved. Requires `success_url`. Default false. |
| `success_url` | `string` | No | Required when `guest_mode` is `true`. Full URL the payer is redirected to after successful payment. Ignored in other modes. |
| `cancel_url` | `string` | No | Full URL the payer is redirected to if they cancel the Checkout. Defaults to `success_url` when omitted. Only used in `guest_mode`. |
| `redirect_url` | `string` | No | Internal redirect path appended to the default hosted-checkout return URL. Hosted-checkout mode only; ignored in `guest_mode` and `direct_charge`. |

Spends money. With `direct_charge: true` the saved card is charged at once and the credits are there when this returns. Otherwise it returns a hosted checkout link; follow it with `billing.getPaymentStatus`.

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | Always `false` on success. |
| `message` | `string \| null` | No | — |
| `payment_link` | `string \| null` | No | Stripe Checkout URL. Valid for 24 hours. |
| `session_id` | `string \| null` | No | Stripe Checkout session ID. Pass to `GET /v1/api/billing/wallet/status` to poll payment status. |

***

### cancelSubscription

`billing.cancelSubscription`

Cancel the active subscription.

**Risk:** `destructive`

```ts theme={null}
await corsair.inboxkit.api.billing.cancelSubscription({});
```

**Input:** *empty object*

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | — |
| `message` | `string \| null` | No | — |
| `subscriptions` | `(Record<string, any> \| null)[] \| null` | No | Remaining active subscriptions |

***

### changeSubscription

`billing.changeSubscription`

SPENDS MONEY. Switch to another plan or start one. May charge the saved card at once or return a payment link.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.inboxkit.api.billing.changeSubscription({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `uid` | `string` | Yes | Pricing plan unique identifier |

Spends money. It may charge the saved card at once or return a payment link.

**Output:** *empty object*

***

### getPaymentStatus

`billing.getPaymentStatus`

Whether a hosted-checkout or guest-mode payment has finished and its credits were applied.

**Risk:** `read`

```ts theme={null}
await corsair.inboxkit.api.billing.getPaymentStatus({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `session_id` | `string` | Yes | Stripe Checkout session ID returned from `POST /v1/api/billing/wallet` (hosted-checkout or guest mode). |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | — |
| `session_id` | `string \| null` | No | Stripe Checkout session ID (echoed). |
| `payment_status` | `string \| null` | No | `paid` — payment completed, credits may still be landing. `unpaid` — Checkout link not yet paid. |
| `amount` | `number \| null` | No | Payment amount in USD. `null` before payment completes. |
| `currency` | `string \| null` | No | Payment currency (always `usd`). |
| `credits_applied` | `boolean \| null` | No | `true` once the Stripe webhook has run and credits have landed in the wallet. Can briefly lag `payment_status: paid` by a few seconds. |

***

### getPortalLink

`billing.getPortalLink`

A Stripe billing portal link for this team. Whoever holds the link can manage payment methods and invoices, so keep it private.

**Risk:** `destructive`

```ts theme={null}
await corsair.inboxkit.api.billing.getPortalLink({});
```

**Input:** *empty object*

Whoever holds this link can manage the team's payment methods and invoices. Don't paste it anywhere shared.

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | — |
| `message` | `string \| null` | No | — |
| `url` | `string \| null` | No | Stripe billing portal URL |

***

### getPricingPlans

`billing.getPricingPlans`

Available pricing plans, with upgrade and downgrade options from the current plan.

**Risk:** `read`

```ts theme={null}
await corsair.inboxkit.api.billing.getPricingPlans({});
```

**Input:** *empty object*

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `plans` | `object[] \| null` | No | List of available pricing plans |
| `activePlan` | `object \| null` | No | Currently active plan details |

> [accordion] plans full type
>
> ```ts theme={null}
> {
>   uid?: string | null,
>   name?: string | null,
>   cycle?: string | null,
>   pricing?: number | null,
>   features?: (string | null)[] | null,
>   active?: boolean | null,
>   current?: boolean | null,
>   upgrade?: boolean | null,
>   downgrade?: boolean | null,
>   mailbox_slots_azure?: number | null,
>   cost_per_add_on_azure_mailbox?: number | null
> }[] | null
> ```

> [accordion] activePlan full type
>
> ```ts theme={null}
> {
>   uid?: string | null,
>   name?: string | null,
>   cycle?: string | null,
>   pricing?: number | null
> } | null
> ```

***

### getSubscription

`billing.getSubscription`

The current subscription and the available plans.

**Risk:** `read`

```ts theme={null}
await corsair.inboxkit.api.billing.getSubscription({});
```

**Input:** *empty object*

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `team` | `string \| null` | No | Team name |
| `email` | `string \| null` | No | Admin email address |
| `current_subscription` | `object \| null` | No | Current active subscription |
| `purchased_on` | `string \| null` | No | Subscription purchase date |
| `renews_on` | `string \| null` | No | Next renewal date |
| `pricing_plans` | `object[] \| null` | No | All available pricing plans |

> [accordion] current\_subscription full type
>
> ```ts theme={null}
> {
>   _id?: string | null,
>   uid?: string | null,
>   name?: string | null,
>   cycle?: string | null,
>   pricing?: number | null,
>   features?: (string | null)[] | null,
>   mailbox_slots_azure?: number | null,
>   cost_per_add_on_azure_mailbox?: number | null
> } | null
> ```

> [accordion] pricing\_plans full type
>
> ```ts theme={null}
> {
>   mailbox_slots_azure?: number | null,
>   cost_per_add_on_azure_mailbox?: number | null
> }[] | null
> ```

***

### getWallet

`billing.getWallet`

Wallet balance, credits used and auto top-up settings.

**Risk:** `read`

```ts theme={null}
await corsair.inboxkit.api.billing.getWallet({});
```

**Input:** *empty object*

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | — |
| `message` | `string \| null` | No | — |
| `total_credits` | `number \| null` | No | Total credits available |
| `credits_used` | `number \| null` | No | Credits consumed |
| `credits_remaining` | `number \| null` | No | Remaining credits |
| `auto_topup_enabled` | `boolean \| null` | No | Whether auto top-up is enabled |
| `auto_topup_trigger_drops_below` | `number \| null` | No | Credit threshold for auto top-up |
| `auto_topup_add_credits` | `number \| null` | No | Credits to add during auto top-up |
| `auto_topup_mode` | `string \| null` | No | — |

***

### getWalletLogs

`billing.getWalletLogs`

Wallet activity log, with filters by type, kind, status, workspace and date.

**Risk:** `read`

```ts theme={null}
await corsair.inboxkit.api.billing.getWalletLogs({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `page` | `number` | No | Page number |
| `limit` | `number` | No | Results per page (max 200) |
| `type` | `string` | No | Filter by transaction type: credit, debit, refund, adjustment, reserve, release |
| `kind` | `string` | No | Filter by transaction kind: renewal, purchase, overage, adjustment |
| `status` | `string` | No | Filter by status: pending, completed, failed, cancelled |
| `related_model` | `string` | No | Filter by related resource type: mailbox, payment, subscription, domain |
| `uid` | `string` | No | Filter by related resource UID. Use with related\_model. |
| `workspace` | `string` | No | Filter by workspace ID |
| `start_date` | `string` | No | Return transactions created on or after this date (ISO 8601) |
| `end_date` | `string` | No | Return transactions created on or before this date (ISO 8601) |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | — |
| `page` | `number \| null` | No | Current page number |
| `pageSize` | `number \| null` | No | Results per page |
| `totalPages` | `number \| null` | No | Total number of pages |
| `totalDocs` | `number \| null` | No | Total matching transactions |
| `totals` | `object \| null` | No | Aggregated totals for the current filter |
| `logs` | `object[] \| null` | No | Array of wallet log entries |

> [accordion] totals full type
>
> ```ts theme={null}
> {
>   total_debit?: number | null,
>   total_credit?: number | null,
>   count?: number | null
> } | null
> ```

> [accordion] logs full type
>
> ```ts theme={null}
> {
>   uid?: string | null,
>   type?: string | null,
>   kind?: string | null,
>   amount?: number | null,
>   currency?: string | null,
>   balance_before?: number | null,
>   balance_after?: number | null,
>   description?: string | null,
>   status?: string | null,
>   references?: {
>     model?: string | null,
>     uids?: any[] | null
>   }[] | null,
>   created_at?: string | null
> }[] | null
> ```

***

### listTransactions

`billing.listTransactions`

Wallet transactions, newest first, with the balance after each one. Send next\_cursor back as cursor for the next page.

**Risk:** `read`

```ts theme={null}
await corsair.inboxkit.api.billing.listTransactions({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `limit` | `number` | No | Transactions per page, 1 to 100. Default 50 |
| `cursor` | `string` | No | The next\_cursor from the previous page |
| `start_date` | `string` | No | Only transactions on or after this time (ISO 8601). Times are in UTC. Include Z or an offset. |
| `end_date` | `string` | No | Only transactions before this time (ISO 8601). The time itself is not included. Times are in UTC. Include Z or an offset. |
| `type` | `string` | No | One or more types, comma separated: refund, credit\_grant, adjustment, card\_payment, top\_up, placement\_test, warmup, renewal, purchase, other |
| `direction` | `string` | No | debit or credit |
| `workspace_uid` | `string` | No | Only transactions recorded for this workspace. The balance stays your whole wallet |
| `resource_uid` | `string` | No | Only transactions for this mailbox, domain, test, subscription or order ID |
| `status` | `string` | No | completed (default) or pending. pending lists top ups waiting for their payment |
| `include_zero_amount` | `boolean` | No | Also list free transactions. Default false |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | Always false on success |
| `balance` | `object \| null` | No | Your wallet right now |
| `data` | `object[] \| null` | No | Transactions, newest first |
| `pagination` | `object \| null` | No | — |

> [accordion] balance full type
>
> ```ts theme={null}
> {
>   available?: number | null,
>   currency?: string | null,
>   as_of?: string | null
> } | null
> ```

> [accordion] data full type
>
> ```ts theme={null}
> {
>   uid?: string | null,
>   created_at?: string | null,
>   type?: string | null,
>   product?: string | null,
>   direction?: string | null,
>   amount?: number | null,
>   signed_amount?: number | null,
>   currency?: string | null,
>   balance_after?: number | null,
>   status?: string | null,
>   description?: string | null,
>   workspace_uid?: string | null,
>   related?: {
>     mailbox_uids?: (string | null)[] | null,
>     domain_uids?: (string | null)[] | null,
>     domain_names?: (string | null)[] | null,
>     placement_test_codes?: (string | null)[] | null,
>     subscription_uids?: (string | null)[] | null,
>     order_uids?: (string | null)[] | null,
>     payment_uid?: string | null
>   } | null
> }[] | null
> ```

> [accordion] pagination full type
>
> ```ts theme={null}
> {
>   limit?: number | null,
>   has_more?: boolean | null,
>   next_cursor?: string | null
> } | null
> ```

***

### updateAutoTopup

`billing.updateAutoTopup`

CAN SPEND MONEY. Turn automatic wallet top-ups on or off and set the threshold and amount. While on, InboxKit charges the saved card with no further call.

**Risk:** `destructive`

```ts theme={null}
await corsair.inboxkit.api.billing.updateAutoTopup({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `auto_topup_enabled` | `boolean` | Yes | Enable or disable auto top-up |
| `auto_topup_trigger_drops_below` | `number` | Yes | Credit threshold to trigger auto top-up |
| `auto_topup_add_credits` | `number` | Yes | Number of credits to add during auto top-up |

While this is on, InboxKit charges the saved card with no further call. This route takes a threshold and an amount. The dashboard also has a forecast mode that only covers the next 48 hours of renewals, which this route's docs don't mention, so read `auto_topup_mode` with `billing.getWallet` afterwards.

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | — |
| `message` | `string \| null` | No | — |

***

## Client Id Requests

### getStatus

`clientIdRequests.getStatus`

Current status of a client ID request. Microsoft stays processing for minutes, so poll.

**Risk:** `read`

```ts theme={null}
await corsair.inboxkit.api.clientIdRequests.getStatus({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `requestId` | `string` | Yes | Unique identifier of the client ID request |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | — |
| `message` | `string \| null` | No | — |
| `data` | `object \| null` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   uid?: string | null,
>   status?: string | null,
>   domain_name?: string | null,
>   client_id?: string | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   completed_at?: string | null,
>   error_message?: string | null,
>   delegated?: boolean | null,
>   scopes?: (string | null)[] | null,
>   platform?: string | null,
>   app_roles?: (string | null)[] | null
> } | null
> ```

***

### initiate

`clientIdRequests.initiate`

Authorize an app's client ID on a domain, as a trusted app or with domain-wide delegation on Google, or tenant-wide consent on Microsoft. This can give the app access to every mailbox on the domain. The domain needs an admin mailbox.

**Risk:** `destructive`

```ts theme={null}
await corsair.inboxkit.api.clientIdRequests.initiate({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `domain` | `string` | Yes | Domain name the client ID is authorized on. Must exist in your workspace and have an admin mailbox. |
| `client_id` | `string` | Yes | The app to authorize. On GOOGLE, the OAuth 2.0 client ID (numeric, or ending in .apps.googleusercontent.com). On MICROSOFT/AZURE, the Entra application id, which is a GUID. |
| `request_data` | `Record<string, any>` | No | Optional metadata or additional data for the request |
| `delegated` | `boolean` | No | GOOGLE only. When false (default) the client ID is marked as a trusted app in Google Admin; when true it is registered under domain-wide delegation with the scopes given. |
| `scopes` | `string[]` | No | Delegated OAuth scopes to grant - permissions that apply when a signed-in user acts through the app. |
| `platform` | `GOOGLE \| MICROSOFT \| AZURE` | No | Which platform this client ID is for. Only needed when the domain has admin mailboxes on more than one platform - otherwise the platform is read from the domain's admin mailbox and a value that contradicts it is… |
| `app_roles` | `string[]` | No | MICROSOFT/AZURE only. Application permissions to grant, assigned as appRoleAssignments so the app can act as itself with a client-credentials (app-only) token. |

A Microsoft application role such as `Mail.Read` can reach every mailbox in the tenant. Check the client ID, scopes and roles before you call this.

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | Indicates if there was an error |
| `message` | `string \| null` | No | Success message |
| `data` | `object \| null` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   uid?: string | null,
>   status?: string | null,
>   domain_name?: string | null,
>   client_id?: string | null,
>   created_at?: string | null,
>   delegated?: boolean | null,
>   scopes?: (string | null)[] | null,
>   platform?: string | null,
>   app_roles?: (string | null)[] | null
> } | null
> ```

***

### list

`clientIdRequests.list`

Client ID requests, filtered by status or domain.

**Risk:** `read`

```ts theme={null}
await corsair.inboxkit.api.clientIdRequests.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `page` | `number` | No | Page number for pagination (default: 1) |
| `limit` | `number` | No | Number of items per page (default: 10, max: 100) |
| `status` | `queued \| pending \| processing \| completed \| failed \| errored \| cancelled` | No | Filter by request status |
| `domain_name` | `string` | No | Filter by domain name |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | — |
| `message` | `string \| null` | No | — |
| `data` | `object[] \| null` | No | Array of client ID requests |
| `pagination` | `object \| null` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   uid?: string | null,
>   status?: string | null,
>   domain_name?: string | null,
>   client_id?: string | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   completed_at?: string | null,
>   error_message?: string | null,
>   delegated?: boolean | null,
>   scopes?: (string | null)[] | null,
>   platform?: string | null,
>   app_roles?: (string | null)[] | null
> }[] | null
> ```

> [accordion] pagination full type
>
> ```ts theme={null}
> {
>   current_page?: number | null,
>   total_pages?: number | null,
>   total_items?: number | null,
>   limit?: number | null
> } | null
> ```

***

## Cloudflare

### connect

`cloudflare.connect`

Connect domains from a Cloudflare account, using an API token or global API key. Limited to 10 requests per 5 minutes.

**Risk:** `write`

```ts theme={null}
await corsair.inboxkit.api.cloudflare.connect({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `auth_type` | `api_token \| global_api_key` | Yes | Authentication method to use with Cloudflare |
| `api_token` | `string` | No | Cloudflare API token. Required when `auth_type` is `api_token`. Must have Zone:Read and DNS:Edit permissions. |
| `email` | `string` | No | Cloudflare account email. Required when `auth_type` is `global_api_key`. |
| `global_api_key` | `string` | No | Cloudflare Global API Key. Required when `auth_type` is `global_api_key`. |
| `label` | `string` | No | Optional human-readable label for the credentials |
| `connect_all` | `boolean` | No | Connect all active zones accessible with the credentials. Mutually exclusive with `domains`. Default false. |
| `domains` | `string[]` | No | Specific domain names to connect. Mutually exclusive with `connect_all`. |
| `validateDNS` | `boolean` | No | When `true`, each domain's existing DNS is checked before connecting. Default false. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | Indicates if an error occurred |
| `message` | `string \| null` | No | Summary of the operation result |
| `connected_count` | `number \| null` | No | Total number of successfully connected domains (including reconnected) |
| `reconnected_count` | `number \| null` | No | Number of previously disconnected domains that were reconnected |
| `failed_count` | `number \| null` | No | Number of domains that failed to connect |
| `skipped_count` | `number \| null` | No | Number of domains that were skipped (already connected) |
| `total_zones` | `number \| null` | No | Total number of zones accessible with the provided credentials |
| `domains` | `object[] \| null` | No | List of successfully connected domains |
| `results` | `object[] \| null` | No | Detailed per-zone results including failures |
| `skipped` | `object[] \| null` | No | Domains that were skipped because they are already connected |

> [accordion] domains full type
>
> ```ts theme={null}
> {
>   uid?: string | null,
>   name?: string | null,
>   status?: string | null,
>   reconnected?: boolean | null
> }[] | null
> ```

> [accordion] results full type
>
> ```ts theme={null}
> {
>   zone_name?: string | null,
>   success?: boolean | null,
>   uid?: string | null,
>   error?: string | null,
>   reconnected?: boolean | null,
>   dns_conflict?: {
>     has_conflict?: boolean | null,
>     labels?: (string | null)[] | null,
>     records?: (Record<string, any> | null)[] | null,
>     message?: string | null
>   } | null
> }[] | null
> ```

> [accordion] skipped full type
>
> ```ts theme={null}
> {
>   name?: string | null,
>   reason?: string | null,
>   domain_uid?: string | null
> }[] | null
> ```

***

### disconnect

`cloudflare.disconnect`

Disconnect Cloudflare domains from the workspace.

**Risk:** `destructive`

```ts theme={null}
await corsair.inboxkit.api.cloudflare.disconnect({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `uids` | `string[]` | No | Domain UIDs to disconnect |
| `domains` | `string[]` | No | Domain names to disconnect (case-insensitive) |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | Indicates if an error occurred |
| `message` | `string \| null` | No | Summary of the operation result |
| `disconnected` | `object[] \| null` | No | Domains that were successfully disconnected |
| `failed` | `object[] \| null` | No | Domains that could not be disconnected |

> [accordion] disconnected full type
>
> ```ts theme={null}
> {
>   uid?: string | null,
>   name?: string | null
> }[] | null
> ```

> [accordion] failed full type
>
> ```ts theme={null}
> {
>   uid?: string | null,
>   name?: string | null,
>   reason?: string | null
> }[] | null
> ```

***

### get

`cloudflare.get`

One Cloudflare-connected domain, by uid or name.

**Risk:** `read`

```ts theme={null}
await corsair.inboxkit.api.cloudflare.get({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `uid` | `string` | No | Unique domain identifier. Provide either `uid` or `domain`. |
| `domain` | `string` | No | Domain name (case-insensitive). Provide either `uid` or `domain`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | Indicates if an error occurred |
| `message` | `string \| null` | No | Human-readable response message |
| `domain` | `object \| null` | No | Detailed domain information |
| `credential` | `object \| null` | No | Non-sensitive metadata about the Cloudflare credentials used for this domain. Null if credentials not found. |

> [accordion] domain full type
>
> ```ts theme={null}
> {
>   uid?: string | null,
>   name?: string | null,
>   status?: string | null,
>   connection_mode?: string | null,
>   cf_zone_id?: string | null,
>   credential_status?: string | null,
>   last_credential_validation?: string | null,
>   assigned_mailboxes?: number | null,
>   available_mailboxes?: number | null,
>   nameservers?: (string | null)[] | null,
>   createdAt?: string | null
> } | null
> ```

> [accordion] credential full type
>
> ```ts theme={null}
> {
>   auth_type?: string | null,
>   status?: string | null,
>   label?: string | null,
>   last_validated?: string | null
> } | null
> ```

***

### list

`cloudflare.list`

Domains connected through Cloudflare.

**Risk:** `read`

```ts theme={null}
await corsair.inboxkit.api.cloudflare.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `page` | `number` | No | Page number for pagination |
| `limit` | `number` | No | Number of results per page |
| `keyword` | `string` | No | Search keyword to filter domains by name (case-insensitive partial match) |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | Indicates if an error occurred |
| `message` | `string \| null` | No | Human-readable response message |
| `domains` | `object[] \| null` | No | List of connected Cloudflare domains |
| `total` | `number \| null` | No | Total number of matching domains across all pages |
| `pages` | `number \| null` | No | Total number of pages |
| `current_page` | `number \| null` | No | Current page number |
| `limit` | `number \| null` | No | Number of results per page |

> [accordion] domains full type
>
> ```ts theme={null}
> {
>   uid?: string | null,
>   name?: string | null,
>   status?: string | null,
>   connection_mode?: string | null,
>   credential_status?: string | null,
>   assigned_mailboxes?: number | null,
>   available_mailboxes?: number | null,
>   nameservers?: (string | null)[] | null,
>   createdAt?: string | null
> }[] | null
> ```

***

### listZones

`cloudflare.listZones`

Zones in the connected Cloudflare account.

**Risk:** `read`

```ts theme={null}
await corsair.inboxkit.api.cloudflare.listZones({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `page` | `number` | No | Page number for pagination |
| `per_page` | `number` | No | Number of zones per page |
| `search` | `string` | No | Search zones by name |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | Indicates if an error occurred |
| `message` | `string \| null` | No | Human-readable response message |
| `zones` | `object[] \| null` | No | List of Cloudflare zones |
| `pagination` | `object \| null` | No | Pagination metadata |

> [accordion] zones full type
>
> ```ts theme={null}
> {
>   zone_id?: string | null,
>   zone_name?: string | null,
>   status?: string | null,
>   name_servers?: (string | null)[] | null,
>   already_connected?: boolean | null,
>   reconnectable?: boolean | null,
>   domain_uid?: string | null
> }[] | null
> ```

> [accordion] pagination full type
>
> ```ts theme={null}
> {
>   page?: number | null,
>   per_page?: number | null,
>   total_count?: number | null,
>   total_pages?: number | null
> } | null
> ```

***

## Consent Requests

### getStatus

`consentRequests.getStatus`

Current status of a consent request.

**Risk:** `read`

```ts theme={null}
await corsair.inboxkit.api.consentRequests.getStatus({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `requestId` | `string` | Yes | The unique identifier of the consent request |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | — |
| `data` | `object \| null` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   uid?: string | null,
>   status?: string | null,
>   status_text?: string | null,
>   status_reason?: string | null,
>   retry_count?: number | null,
>   mailbox?: {
>     uid?: string | null,
>     email?: string | null
>   } | null,
>   created_at?: string | null,
>   completed_at?: string | null,
>   last_attempt_at?: string | null,
>   next_retry_at?: string | null
> } | null
> ```

***

### initiate

`consentRequests.initiate`

Process an OAuth consent URL for a mailbox, by uid or username and domain, which can give that app access to the mailbox.

**Risk:** `destructive`

```ts theme={null}
await corsair.inboxkit.api.consentRequests.initiate({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `mailbox_uid` | `string` | No | Unique identifier of the mailbox (optional if using username+domain) |
| `username` | `string` | No | Username of the mailbox (required with domain if not using mailbox\_uid) |
| `domain` | `string` | No | Domain of the mailbox (required with username if not using mailbox\_uid) |
| `consent_url` | `string` | Yes | The consent URL to be processed |
| `request_data` | `Record<string, any>` | No | Additional data for the consent request |

Can give the app behind `consent_url` access to the mailbox, so check that URL before you call this.

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | — |
| `message` | `string \| null` | No | — |
| `data` | `object \| null` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   uid?: string | null,
>   status?: string | null,
>   mailbox_email?: string | null,
>   created_at?: string | null
> } | null
> ```

***

### list

`consentRequests.list`

Consent requests, filtered by mailbox or status.

**Risk:** `read`

```ts theme={null}
await corsair.inboxkit.api.consentRequests.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `mailbox_uid` | `string` | No | Filter by mailbox UID |
| `status` | `queued \| pending \| processing \| completed \| failed \| errored \| cancelled` | No | Filter by status |
| `limit` | `number` | No | Number of records to return (1-100) |
| `offset` | `number` | No | Number of records to skip |
| `sortBy` | `createdAt \| status` | No | Field to sort by |
| `sortOrder` | `asc \| desc` | No | Sort order |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | — |
| `data` | `object[] \| null` | No | — |
| `pagination` | `object \| null` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   uid?: string | null,
>   status?: string | null,
>   status_text?: string | null,
>   retry_count?: number | null,
>   mailbox?: {
>     uid?: string | null,
>     email?: string | null
>   } | null,
>   created_at?: string | null,
>   completed_at?: string | null,
>   last_attempt_at?: string | null
> }[] | null
> ```

> [accordion] pagination full type
>
> ```ts theme={null}
> {
>   total?: number | null,
>   limit?: number | null,
>   offset?: number | null,
>   hasMore?: boolean | null
> } | null
> ```

***

## Dns

### add

`dns.add`

Add DNS records to a domain.

**Risk:** `write`

```ts theme={null}
await corsair.inboxkit.api.dns.add({ domain: 'example.com', records: [{ host: 'www', type: 'CNAME', value: 'example.net', ttl: 3600 }] });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `records` | `object[]` | Yes | Array of DNS records to add |
| `domain` | `string` | No | Domain name (required if uid not provided) |
| `uid` | `string` | No | Domain UID (required if domain not provided) |

> [accordion] records full type
>
> ```ts theme={null}
> {
>   host: string,
>   type: string,
>   value: string,
>   ttl?: number,
>   priority?: number,
>   proxied?: boolean
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | — |
| `message` | `string \| null` | No | — |
| `added_records` | `number \| null` | No | — |
| `dns_record` | `object \| null` | No | Complete DNS record document |

> [accordion] dns\_record full type
>
> ```ts theme={null}
> {
>   uid?: string | null
> } | null
> ```

***

### deleteRecords

`dns.deleteRecords`

Delete DNS records from a domain, by id or all of them. Removing MX, SPF, DKIM or DMARC records stops mail from working.

**Risk:** `destructive`

```ts theme={null}
await corsair.inboxkit.api.dns.deleteRecords({ domain: 'example.com', record_ids: ['<record _id from dns.list>'] });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `domain` | `string` | No | Domain name (required if uid not provided) |
| `uid` | `string` | No | Domain UID (required if domain not provided) |
| `record_ids` | `string[]` | No | Array of DNS record IDs to delete (required if delete\_all is false) |
| `delete_all` | `boolean` | No | Delete all DNS records for the domain. Default false. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | — |
| `message` | `string \| null` | No | — |
| `deleted_count` | `number \| null` | No | Number of records deleted |
| `deleted_records` | `object[] \| null` | No | Array of deleted records |
| `remaining_records` | `number \| null` | No | Number of remaining records (only for specific deletes) |
| `dns_record` | `object \| null` | No | Updated DNS record document |
| `records` | `object[] \| null` | No | — |

> [accordion] deleted\_records full type
>
> ```ts theme={null}
> {
>   host?: string | null,
>   value?: string | null,
>   type?: string | null
> }[] | null
> ```

> [accordion] dns\_record full type
>
> ```ts theme={null}
> {
>   uid?: string | null
> } | null
> ```

> [accordion] records full type
>
> ```ts theme={null}
> {
>   host?: string | null,
>   type?: string | null,
>   value?: string | null
> }[] | null
> ```

***

### list

`dns.list`

DNS records of one domain, by name or uid.

**Risk:** `read`

```ts theme={null}
await corsair.inboxkit.api.dns.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `domain` | `string` | No | Domain name (required if uid not provided) |
| `uid` | `string` | No | Domain UID (required if domain not provided) |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | — |
| `message` | `string \| null` | No | — |
| `dns_record` | `object \| null` | No | — |

> [accordion] dns\_record full type
>
> ```ts theme={null}
> {
>   records?: {
>     host?: string | null,
>     type?: string | null,
>     value?: string | null,
>     ttl?: number | null,
>     status?: string | null,
>     priority?: number | null,
>     proxied?: boolean | null
>   }[] | null,
>   uid?: string | null
> } | null
> ```

***

### repair

`dns.repair`

Fix missing or broken email DNS records on one or more domains. Run dns.verify first to see what would change.

**Risk:** `destructive`

```ts theme={null}
await corsair.inboxkit.api.dns.repair({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `domain` | `string` | No | Domain name to repair. Use this when fixing a single domain. |
| `uid` | `string` | No | Domain UID to repair. Use this when fixing a single domain by its UID. |
| `domains` | `string[]` | No | Array of domain names to repair in bulk. You can include up to 50 domains per request. |
| `uids` | `string[]` | No | Array of domain UIDs to repair in bulk. You can include up to 50 UIDs per request. |

Changes the domain's email DNS records. Run `dns.verify` first to see what's wrong.

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | false when the request was processed successfully. true only when the entire request fails. |
| `message` | `string \| null` | No | A summary of the repair results. |
| `summary` | `object \| null` | No | Aggregated counts across all domains in this request. |
| `results` | `object[] \| null` | No | Per-domain repair results. Each item shows what was fixed for one domain. |

> [accordion] summary full type
>
> ```ts theme={null}
> {
>   total_requested?: number | null,
>   total_repaired?: number | null,
>   total_failed?: number | null,
>   total_actions?: number | null,
>   total_added?: number | null,
>   total_reset?: number | null,
>   total_updated?: number | null,
>   total_imported?: number | null,
>   total_reconciled?: number | null,
>   total_duplicates_removed?: number | null,
>   total_skipped?: number | null
> } | null
> ```

> [accordion] results full type
>
> ```ts theme={null}
> {
>   domain?: string | null,
>   domain_uid?: string | null,
>   status?: string | null,
>   error_message?: string | null,
>   platform?: string | null,
>   cloudflare_checked?: boolean | null,
>   actions_taken?: {
>     label?: string | null,
>     action?: string | null,
>     type?: string | null,
>     host?: string | null,
>     value?: string | null
>   }[] | null,
>   skipped?: {
>     label?: string | null,
>     reason?: string | null
>   }[] | null,
>   message?: string | null,
>   dns_record?: {
>     records?: (Record<string, any> | null)[] | null
>   } | null,
>   repair_summary?: {
>     added?: number | null,
>     reset?: number | null,
>     updated?: number | null,
>     imported?: number | null,
>     reconciled?: number | null,
>     duplicates_removed?: number | null,
>     skipped?: number | null,
>     total_actions?: number | null
>   } | null
> }[] | null
> ```

***

### update

`dns.update`

Update DNS records on a domain.

**Risk:** `write`

```ts theme={null}
await corsair.inboxkit.api.dns.update({ domain: 'example.com', records: [{ record_id: '<record _id from dns.list>', host: 'www', type: 'CNAME', value: 'example.org', ttl: 3600 }] });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `records` | `object[]` | Yes | Array of DNS records to update |
| `domain` | `string` | No | Domain name (required if uid not provided) |
| `uid` | `string` | No | Domain UID (required if domain not provided) |

> [accordion] records full type
>
> ```ts theme={null}
> {
>   record_id: string,
>   host: string,
>   type: string,
>   value: string,
>   ttl?: number,
>   priority?: number,
>   proxied?: boolean
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | — |
| `message` | `string \| null` | No | — |
| `dns_record` | `Record<string, any> \| null` | No | Complete DNS record document |
| `updated_records` | `(Record<string, any> \| null)[] \| null` | No | Array of updated records |
| `updated_count` | `number \| null` | No | Number of records updated |

***

### verify

`dns.verify`

Check the health of the email DNS records of one or more domains. Nothing changes.

**Risk:** `read`

```ts theme={null}
await corsair.inboxkit.api.dns.verify({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `domain` | `string` | No | Domain name to verify. Use this when checking a single domain. |
| `uid` | `string` | No | Domain UID to verify. Use this when checking a single domain by its UID. |
| `domains` | `string[]` | No | Array of domain names to verify in bulk. You can include up to 50 domains per request. |
| `uids` | `string[]` | No | Array of domain UIDs to verify in bulk. You can include up to 50 UIDs per request. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | false when the request was processed successfully (even if some domains have issues). true only when the entire request fails. |
| `message` | `string \| null` | No | A summary of the verification results. |
| `summary` | `object \| null` | No | Aggregated counts across all domains in this request. |
| `results` | `object[] \| null` | No | Per-domain verification results. Each item contains the full health report for one domain. |

> [accordion] summary full type
>
> ```ts theme={null}
> {
>   total_requested?: number | null,
>   total_verified?: number | null,
>   total_failed?: number | null,
>   healthy?: number | null,
>   critical?: number | null,
>   issues_found?: number | null,
>   needs_repair?: number | null
> } | null
> ```

> [accordion] results full type
>
> ```ts theme={null}
> {
>   domain?: string | null,
>   domain_uid?: string | null,
>   status?: string | null,
>   error_message?: string | null,
>   platform?: string | null,
>   cloudflare_checked?: boolean | null,
>   overall_health?: string | null,
>   needs_repair?: boolean | null,
>   message?: string | null,
>   cloudflare_check_reason?: string | null,
>   records?: {
>     label?: string | null,
>     type?: string | null,
>     host?: string | null,
>     status?: string | null,
>     current_value?: string | null,
>     expected_value?: string | null,
>     issue?: string | null,
>     fix_description?: string | null
>   }[] | null,
>   record_summary?: {
>     total_checked?: number | null,
>     ok?: number | null,
>     missing?: number | null,
>     misconfigured?: number | null,
>     errored?: number | null,
>     pending?: number | null,
>     not_applicable?: number | null,
>     out_of_sync?: number | null
>   } | null
> }[] | null
> ```

***

## Domains

### checkAvailability

`domains.checkAvailability`

Whether one domain can be registered, with its price and ban status. Takes no workspace.

**Risk:** `read`

```ts theme={null}
await corsair.inboxkit.api.domains.checkAvailability({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `domain` | `string` | Yes | Domain name to check |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | — |
| `message` | `string \| null` | No | — |
| `available` | `boolean \| null` | No | Whether domain is available |
| `banned` | `boolean \| null` | No | Whether domain is banned |
| `registration_price` | `number \| null` | No | Registration price if available |
| `renewal_price` | `number \| null` | No | Renewal price if available |

***

### checkBanned

`domains.checkBanned`

Whether one domain is banned from registration. Takes no workspace.

**Risk:** `read`

```ts theme={null}
await corsair.inboxkit.api.domains.checkBanned({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `domain` | `string` | Yes | Domain name to check |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | — |
| `message` | `string \| null` | No | — |
| `banned` | `boolean \| null` | No | Whether domain is banned |

***

### checkPropagation

`domains.checkPropagation`

Whether the nameservers of these domains have propagated.

**Risk:** `read`

```ts theme={null}
await corsair.inboxkit.api.domains.checkPropagation({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `domains` | `string[]` | Yes | List of domains to check |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | Indicates if there was an error in the request |
| `message` | `string \| null` | No | A message describing the result of the request |
| `result` | `object[] \| null` | No | Array of domain propagation results |

> [accordion] result full type
>
> ```ts theme={null}
> {
>   _id?: string | null,
>   uid?: string | null,
>   name?: string | null,
>   status?: string | null,
>   createdAt?: string | null,
>   updatedAt?: string | null,
>   propagated?: boolean | null
> }[] | null
> ```

***

### checkWorkspaceAvailability

`domains.checkWorkspaceAvailability`

Whether domains can be used with Google Workspace or Microsoft 365.

**Risk:** `read`

```ts theme={null}
await corsair.inboxkit.api.domains.checkWorkspaceAvailability({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `domains` | `string[]` | Yes | List of domain names to check workspace availability |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `ok` | `boolean \| null` | No | Indicates if the request was successful |
| `result` | `object[] \| null` | No | Array of workspace availability results for each domain |

> [accordion] result full type
>
> ```ts theme={null}
> {
>   domain?: string | null,
>   google_workspace_available?: boolean | null,
>   ms365_workspace_available?: boolean | null
> }[] | null
> ```

***

### connect

`domains.connect`

Connect domains you already own to the workspace and get the nameservers to set at your registrar.

**Risk:** `write`

```ts theme={null}
await corsair.inboxkit.api.domains.connect({ domains: ['example.com'] });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `domains` | `string[]` | Yes | Domain names to connect, for example `example.com`. |
| `mask_forwarding` | `boolean` | No | Deprecated and ignored. Connected domains are not masked by this call. Turn masking on for the domain after it is connected. |

Connects a domain you already own and returns the nameservers to set at your registrar. Until you do, its status stays `not_connected`.

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | `false` when the request worked. |
| `message` | `string \| null` | No | Result of the request. |
| `result` | `object[] \| null` | No | One entry for each connected domain. |

> [accordion] result full type
>
> ```ts theme={null}
> {
>   domain?: string | null,
>   nameservers?: (string | null)[] | null,
>   uid?: string | null
> }[] | null
> ```

***

### getMoveStatus

`domains.getMoveStatus`

Whether a move started with domains.moveWorkspace has finished.

**Risk:** `read`

```ts theme={null}
await corsair.inboxkit.api.domains.getMoveStatus({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `move_id` | `string` | Yes | The `move_id` returned by Move domains to another workspace. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | `false` when the move was found. |
| `result` | `object \| null` | No | — |

> [accordion] result full type
>
> ```ts theme={null}
> {
>   move_id?: string | null,
>   status?: string | null,
>   domain_count?: number | null,
>   mailbox_count?: number | null,
>   started_at?: string | null,
>   completed_at?: string | null
> } | null
> ```

***

### getRenewalStatus

`domains.getRenewalStatus`

Renewal status of purchased domains, filtered by name, uid or status.

**Risk:** `read`

```ts theme={null}
await corsair.inboxkit.api.domains.getRenewalStatus({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `domains` | `string` | No | Comma-separated list of domain names to filter (e.g., example.com,mydomain.io). |
| `uids` | `string` | No | Comma-separated list of domain UIDs to filter. |
| `status` | `string` | No | Filter by renewal status. Allowed values: not\_eligible, due\_soon, overdue, expired, processing, completed, failed. |
| `page` | `number` | No | Page number (default: 1). |
| `limit` | `number` | No | Items per page (default: 50, max: 200). |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | — |
| `data` | `object \| null` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   renewals?: {
>     uid?: string | null,
>     domain_name?: string | null,
>     tld?: string | null,
>     renewal_status?: string | null,
>     renewal_date?: string | null,
>     days_until_renewal?: number | null,
>     grace_period_days_remaining?: number | null,
>     is_eligible_for_renewal?: boolean | null,
>     eligibility_reason?: string | null,
>     renewal_requested?: boolean | null,
>     renewal_requested_at?: string | null,
>     renewal_price?: number | null,
>     active_mailboxes?: number | null,
>     total_mailboxes?: number | null,
>     registration_date?: string | null,
>     connection_type?: string | null
>   }[] | null,
>   pagination?: {
>     page?: number | null,
>     limit?: number | null,
>     total?: number | null,
>     totalPages?: number | null
>   } | null,
>   summary?: {
>     total?: number | null,
>     total_eligible?: number | null,
>     total_due_soon?: number | null,
>     total_overdue?: number | null,
>     total_already_requested?: number | null
>   } | null
> } | null
> ```

***

### getRotationStatus

`domains.getRotationStatus`

Progress of a rotation. Poll every 30 to 60 seconds until completed, partially\_completed or failed.

**Risk:** `read`

```ts theme={null}
await corsair.inboxkit.api.domains.getRotationStatus({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `rotation_id` | `string` | Yes | The `rotation_id` returned by Start a domain rotation. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | `false` when the rotation was found. |
| `result` | `object \| null` | No | — |

> [accordion] result full type
>
> ```ts theme={null}
> {
>   rotation_id?: string | null,
>   status?: string | null,
>   domain?: {
>     uid?: string | null,
>     name?: string | null
>   } | null,
>   target_domain?: {
>     uid?: string | null,
>     name?: string | null
>   } | null,
>   provider?: string | null,
>   mailbox_count?: number | null,
>   mailboxes_renamed?: number | null,
>   mailboxes_failed?: number | null,
>   mailboxes?: {
>     uid?: string | null,
>     old_email?: string | null,
>     new_email?: string | null,
>     status?: string | null
>   }[] | null,
>   failure_reason?: string | null,
>   started_at?: string | null,
>   updated_at?: string | null,
>   completed_at?: string | null
> } | null
> ```

***

### list

`domains.list`

The workspace's domains with status, nameservers and DNS records. Paginated, with filters by keyword, status and uid.

**Risk:** `read`

```ts theme={null}
await corsair.inboxkit.api.domains.list({ limit: 20, status: ['active'] });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `page` | `number` | No | Default 1. |
| `limit` | `number` | No | Default 10. |
| `uids` | `string[]` | No | — |
| `keywords` | `string` | No | — |
| `status` | `string[]` | No | Filter by domain status (e.g., \['active', 'pending']) |
| `nameserver_match_status` | `(matched \| moved \| pending \| unknown)[]` | No | Filter by nameserver match status. Use \['moved'] to find domains that need nameserver regeneration |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | — |
| `message` | `string \| null` | No | — |
| `domains` | `object[] \| null` | No | — |
| `total` | `number \| null` | No | Total number of domains |
| `pages` | `number \| null` | No | Total number of pages |
| `current_page` | `number \| null` | No | Current page number |
| `limit` | `number \| null` | No | Items per page |
| `status_counts` | `object \| null` | No | Count of domains grouped by their status. Use this to display status distribution in your UI. |
| `nameserver_status_counts` | `object \| null` | No | Count of domains by nameserver match status. Use this to show users how many domains need attention and to display alerts for 'moved' domains. |

> [accordion] domains full type
>
> ```ts theme={null}
> {
>   name?: string | null,
>   status?: string | null,
>   registration_years?: number | null,
>   created_at?: string | null,
>   uid?: string | null,
>   tld?: string | null,
>   price?: number | string | null,
>   renewal_date?: string | null,
>   whois_privacy?: boolean | null,
>   forwarding_url?: string | null,
>   forwarding_email?: string | null,
>   enable_mask_forwarding?: boolean | null,
>   captcha_enabled?: boolean | null,
>   dmarc_email?: string | null,
>   catch_all_email?: string | null,
>   nameservers?: (string | null)[] | null,
>   assigned_mailboxes?: number | string | null,
>   available_mailboxes?: string | null,
>   cf_zone_id?: string | null,
>   tags?: (string | null)[] | null,
>   payment_type?: string | null,
>   connection_type?: string | null,
>   nameserver_match_status?: string | null,
>   actual_nameservers?: (string | null)[] | null,
>   last_nameserver_check?: string | null,
>   createdAt?: string | null,
>   updatedAt?: string | null,
>   registration_date?: string | null,
>   dns_propagation_status?: string | null,
>   renewal_cycle?: string | null,
>   renewal_status?: string | null,
>   dns?: {
>     records?: (Record<string, any> | null)[] | null
>   } | null
> }[] | null
> ```

> [accordion] status\_counts full type
>
> ```ts theme={null}
> {
>   active?: number | null,
>   pending?: number | null,
>   not_connected?: number | null,
>   expired_propagation?: number | null,
>   waiting_for_dns_propagation?: number | null,
>   cancelled?: number | null,
>   inactive?: number | null
> } | null
> ```

> [accordion] nameserver\_status\_counts full type
>
> ```ts theme={null}
> {
>   matched?: number | null,
>   moved?: number | null,
>   pending?: number | null,
>   unknown?: number | null
> } | null
> ```

***

### listAssignable

`domains.listAssignable`

Domains that can take more mailboxes.

**Risk:** `read`

```ts theme={null}
await corsair.inboxkit.api.domains.listAssignable({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `page` | `number` | No | Page number for pagination |
| `limit` | `number` | No | Number of items per page |
| `keyword` | `string` | No | Search keyword for filtering domains |
| `min_mailboxes` | `number` | No | Minimum number of available mailboxes |
| `uids` | `string[]` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | — |
| `message` | `string \| null` | No | — |
| `domains` | `object[] \| null` | No | — |
| `total` | `number \| null` | No | Total number of domains |
| `pages` | `number \| null` | No | Total number of pages |
| `current_page` | `number \| string \| null` | No | Current page number |
| `limit` | `number \| string \| null` | No | Items per page |

> [accordion] domains full type
>
> ```ts theme={null}
> {
>   _id?: string | null,
>   name?: string | null,
>   assigned_mailboxes?: number | null,
>   uid?: string | null,
>   tld?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### moveWorkspace

`domains.moveWorkspace`

Move domains to another workspace in the team, with their mailboxes and DNS records. Run domains.previewMove first.

**Risk:** `write`

```ts theme={null}
await corsair.inboxkit.api.domains.moveWorkspace({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `uids` | `string[]` | No | UIDs of the domains to move. Get them from List domains. Send `uids`, `domains`, or both. |
| `domains` | `string[]` | No | Names of the domains to move, for example `example-outreach.com`. Send `uids`, `domains`, or both. |
| `target_workspace_uid` | `string` | Yes | UID of the workspace to move the domains into. It must be another active workspace in your team. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | `false` when the domains are in the target workspace. |
| `message` | `string \| null` | No | Result of the request. |
| `result` | `object \| null` | No | — |

> [accordion] result full type
>
> ```ts theme={null}
> {
>   move_id?: string | null,
>   status?: string | null,
>   source_workspace?: {
>     uid?: string | null,
>     name?: string | null
>   } | null,
>   target_workspace?: {
>     uid?: string | null,
>     name?: string | null
>   } | null,
>   summary?: {
>     total?: number | null,
>     moved?: number | null,
>     already_in_target?: number | null,
>     mailboxes?: number | null
>   } | null,
>   domains?: {
>     domain?: string | null,
>     uid?: string | null,
>     result?: string | null,
>     mailbox_count?: number | null
>   }[] | null
> } | null
> ```

***

### previewMove

`domains.previewMove`

What moving domains to another workspace would do, and why any cannot move. Nothing changes.

**Risk:** `read`

```ts theme={null}
await corsair.inboxkit.api.domains.previewMove({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `uids` | `string[]` | No | UIDs of the domains to check. Get them from List domains. Send `uids`, `domains`, or both. |
| `domains` | `string[]` | No | Names of the domains to check, for example `example-outreach.com`. Send `uids`, `domains`, or both. |
| `target_workspace_uid` | `string` | Yes | UID of the workspace to move the domains into. It must be another active workspace in your team. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | `false` when the check ran. |
| `message` | `string \| null` | No | How many of the domains you sent can be moved. |
| `result` | `object \| null` | No | — |

> [accordion] result full type
>
> ```ts theme={null}
> {
>   can_move?: boolean | null,
>   source_workspace?: {
>     uid?: string | null,
>     name?: string | null
>   } | null,
>   target_workspace?: {
>     uid?: string | null,
>     name?: string | null
>   } | null,
>   summary?: {
>     total?: number | null,
>     movable?: number | null,
>     blocked?: number | null,
>     already_in_target?: number | null,
>     mailboxes?: number | null
>   } | null,
>   domains?: {
>     domain?: string | null,
>     uid?: string | null,
>     mailbox_count?: number | null,
>     can_move?: boolean | null,
>     already_in_target?: boolean | null,
>     error_category?: string | null,
>     message?: string | null
>   }[] | null,
>   sequencers?: {
>     name?: string | null,
>     platform?: string | null,
>     action?: string | null
>   }[] | null
> } | null
> ```

***

### previewRotation

`domains.previewRotation`

Whether a domain can rotate onto a replacement, which mailboxes would move and their new addresses. Nothing changes.

**Risk:** `read`

```ts theme={null}
await corsair.inboxkit.api.domains.previewRotation({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `domain_uid` | `string` | No | UID of the domain whose mailboxes move. Get it from List domains. Send this or `domain`. |
| `domain` | `string` | No | Name of the domain whose mailboxes move, for example `example-outreach.com`. Send this or `domain_uid`. |
| `target_domain_uid` | `string` | No | UID of the replacement domain. Send this or `target_domain`. |
| `target_domain` | `string` | No | Name of the replacement domain. It must be an active domain in the same workspace with no mailboxes. Send this or `target_domain_uid`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | `false` when the check ran. |
| `message` | `string \| null` | No | Whether the rotation can start now. |
| `result` | `object \| null` | No | — |

> [accordion] result full type
>
> ```ts theme={null}
> {
>   can_rotate?: boolean | null,
>   domain?: {
>     uid?: string | null,
>     name?: string | null
>   } | null,
>   target_domain?: {
>     uid?: string | null,
>     name?: string | null
>   } | null,
>   provider?: string | null,
>   mailbox_count?: number | null,
>   mailboxes?: {
>     uid?: string | null,
>     from_email?: string | null,
>     to_email?: string | null
>   }[] | null,
>   blockers?: {
>     code?: string | null,
>     domain?: string | null,
>     message?: string | null
>   }[] | null
> } | null
> ```

***

### regenerateNameservers

`domains.regenerateNameservers`

Create new Cloudflare zones and nameservers for domains that need reconfiguring. The registrar then has to be pointed at the new nameservers.

**Risk:** `destructive`

```ts theme={null}
await corsair.inboxkit.api.domains.regenerateNameservers({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `uids` | `string[]` | No | Array of domain UIDs to regenerate nameservers for. Maximum 50 items. Either 'uids' or 'domains' must be provided. |
| `domains` | `string[]` | No | Array of domain names to regenerate nameservers for. Maximum 50 items. Either 'uids' or 'domains' must be provided. |

Only for domains with status `expired_propagation`, or connected domains whose nameserver status is `moved` or `unknown`. Anything else answers 404.

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | Indicates if an error occurred |
| `message` | `string \| null` | No | Human-readable response message |
| `count` | `number \| null` | No | Total number of domains successfully processed |
| `expired_propagation_count` | `number \| null` | No | Number of domains regenerated due to expired\_propagation status |
| `moved_nameservers_count` | `number \| null` | No | Number of domains regenerated due to moved nameservers (nameserver\_match\_status='moved') |
| `result` | `object[] \| null` | No | Array of updated domain objects with new Cloudflare nameservers |

> [accordion] result full type
>
> ```ts theme={null}
> {
>   name?: string | null,
>   uid?: string | null,
>   status?: string | null,
>   nameservers?: (string | null)[] | null,
>   cf_zone_id?: string | null,
>   dns_propagation_status?: string | null,
>   nameservers_propagation_status?: string | null,
>   nameserver_match_status?: string | null
> }[] | null
> ```

***

### register

`domains.register`

SPENDS MONEY. Register domains with contact details and configuration, paid from the wallet or a checkout. Never repeat after a timeout without checking domains.list first.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.inboxkit.api.domains.register({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `domains` | `object[]` | Yes | List of domains to register |
| `domain_forwarding_url` | `string` | No | URL for domain forwarding |
| `dmarc_email` | `string` | No | Email for DMARC policy |
| `enable_mask_forwarding` | `boolean` | No | Enable masked forwarding. Default false. |
| `captcha_enabled` | `boolean` | No | Show visitors a captcha before they are redirected to domain\_forwarding\_url. Requires domain\_forwarding\_url. Cannot be used together with enable\_mask\_forwarding. Default false. |
| `catch_all_email` | `string` | No | Catch-all email address |
| `use_wallet_balance` | `boolean` | No | Use wallet balance for payment instead of Stripe. Default false. |
| `contact_details` | `object` | Yes | Contact details for domain registration |

Spends money. Limited by your wallet or checkout. Never repeat after a timeout without checking `domains.list`.

> [accordion] domains full type
>
> ```ts theme={null}
> {
>   name: string,
>   registration_years: number
> }[]
> ```

> [accordion] contact\_details full type
>
> ```ts theme={null}
> {
>   first_name: string,
>   last_name: string,
>   email: string,
>   phone?: string,
>   organization?: string,
>   address_line1: string,
>   address_line2?: string,
>   city: string,
>   state: string,
>   country: string,
>   postal_code: string
> }
> ```

**Output:** *empty object*

***

### remove

`domains.remove`

Remove domains from the workspace.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.inboxkit.api.domains.remove({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `domains` | `string[]` | Yes | Array of domain names to schedule for deletion. Domain names are converted to lowercase internally. |
| `uids` | `string[]` | No | Array of domain UIDs to schedule for deletion. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | Indicates if an error occurred |
| `message` | `string \| null` | No | Response message |
| `result` | `object \| null` | No | — |

> [accordion] result full type
>
> ```ts theme={null}
> {
>   updated?: {
>     name?: string | null,
>     uid?: string | null,
>     previous_status?: string | null,
>     new_status?: string | null
>   }[] | null,
>   deleted?: {
>     name?: string | null,
>     uid?: string | null,
>     previous_status?: string | null,
>     new_status?: string | null
>   }[] | null
> } | null
> ```

***

### removeCatchAll

`domains.removeCatchAll`

Remove the catch-all address from these domains.

**Risk:** `write`

```ts theme={null}
await corsair.inboxkit.api.domains.removeCatchAll({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `uids` | `string[]` | Yes | List of domain UIDs |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | — |
| `message` | `string \| null` | No | — |

***

### removeDmarc

`domains.removeDmarc`

Reset these domains to the default DMARC record.

**Risk:** `write`

```ts theme={null}
await corsair.inboxkit.api.domains.removeDmarc({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `uids` | `string[]` | No | Array of domain UIDs to reset to default DMARC (PREFERRED). Either 'uids' or 'domains' must be provided. |
| `domains` | `string[]` | No | Array of domain names (e.g., \['example.com', 'test.org']). Use 'uids' instead when possible for better performance. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | Indicates if there was an error |
| `message` | `string \| null` | No | Human-readable response message |
| `domains` | `object[] \| null` | No | Array of updated domain objects |

> [accordion] domains full type
>
> ```ts theme={null}
> {
>   uid?: string | null,
>   name?: string | null,
>   tld?: string | null,
>   status?: string | null,
>   dmarc_email?: string | null,
>   dns_propagation_status?: string | null,
>   createdAt?: string | null,
>   updatedAt?: string | null
> }[] | null
> ```

***

### requestRenewal

`domains.requestRenewal`

SPENDS MONEY. Renew purchased domains from the wallet, up to 50 at once. If the wallet cannot cover the whole batch, none are queued.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.inboxkit.api.domains.requestRenewal({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `domains` | `string[]` | No | Array of domain names to request renewal for. At least one of 'domains' or 'uids' must be provided. Max 50 items. Automatically lowercased. |
| `uids` | `string[]` | No | Array of domain UIDs to request renewal for. At least one of 'domains' or 'uids' must be provided. Max 50 items. |

Spends money. If the wallet can't cover the whole batch, InboxKit answers 402 and queues none of them. Up to 50 at once.

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | — |
| `message` | `string \| null` | No | — |
| `data` | `object \| null` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   results?: {
>     domain_name?: string | null,
>     success?: boolean | null,
>     reason?: string | null
>   }[] | null,
>   total_requested?: number | null,
>   total_failed?: number | null
> } | null
> ```

***

### rotate

`domains.rotate`

Start moving every mailbox on a domain to a replacement domain in the same workspace. Mailbox addresses change. Run domains.previewRotation first.

**Risk:** `destructive`

```ts theme={null}
await corsair.inboxkit.api.domains.rotate({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `domain_uid` | `string` | No | UID of the domain whose mailboxes move. Get it from List domains. Send this or `domain`. |
| `domain` | `string` | No | Name of the domain whose mailboxes move, for example `example-outreach.com`. Send this or `domain_uid`. |
| `target_domain_uid` | `string` | No | UID of the replacement domain. Send this or `target_domain`. |
| `target_domain` | `string` | No | Name of the replacement domain. It must be an active domain in the same workspace with no mailboxes. Send this or `target_domain_uid`. |

Mailbox addresses change. Each mailbox keeps its password, billing and renewal date. Run `domains.previewRotation` first, and follow it with `domains.getRotationStatus`.

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | `false` when the rotation has started. |
| `message` | `string \| null` | No | Result of the request. |
| `result` | `object \| null` | No | — |

> [accordion] result full type
>
> ```ts theme={null}
> {
>   rotation_id?: string | null,
>   status?: string | null,
>   already_started?: boolean | null,
>   domain?: {
>     uid?: string | null,
>     name?: string | null
>   } | null,
>   target_domain?: {
>     uid?: string | null,
>     name?: string | null
>   } | null,
>   mailbox_count?: number | null
> } | null
> ```

***

### search

`domains.search`

Search for domains to register by keyword or name, with prices and Google or Microsoft availability. Limited to 50 requests a minute.

**Risk:** `read`

```ts theme={null}
await corsair.inboxkit.api.domains.search({ page: 1, num: 10, keyword: 'acme', tlds: ['com'] });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `page` | `number` | No | Page number for pagination. Default 1. |
| `num` | `number` | Yes | Number of domains to return |
| `keyword` | `string` | No | Search keyword (required if domain not provided) |
| `domain` | `string` | No | Specific domain to search (required if keyword not provided) |
| `show_unavailable` | `boolean` | No | Include unavailable domains in results. Default false. |
| `check_banned` | `boolean` | No | Check if domains are banned from registration. Default true. |
| `check_google_workspace_availability` | `boolean` | No | Check Google Workspace availability. Default true. |
| `check_ms365_workspace_availability` | `boolean` | No | Check Microsoft 365 availability. Default true. |
| `registration_years` | `number` | No | Number of years for registration. Default 1. |
| `tlds` | `string[]` | No | Specific TLDs to search |

Needs at least one of `keyword` or `domain`. InboxKit's docs mark `keyword` and `page` as required, but the API doesn't.

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | — |
| `message` | `string \| null` | No | — |
| `domains` | `object[] \| null` | No | — |

> [accordion] domains full type
>
> ```ts theme={null}
> {
>   name?: string | null,
>   price?: number | null,
>   available?: boolean | null,
>   is_premium?: boolean | null,
>   banned?: boolean | null,
>   google_workspace_available?: boolean | null,
>   ms365_workspace_available?: boolean | null
> }[] | null
> ```

***

### setCatchAll

`domains.setCatchAll`

Send mail for unknown addresses on these domains to one email address.

**Risk:** `destructive`

```ts theme={null}
await corsair.inboxkit.api.domains.setCatchAll({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `uids` | `string[]` | Yes | List of domain UIDs |
| `email` | `string` | Yes | Catch-all email address |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | — |
| `message` | `string \| null` | No | — |

***

### setDmarc

`domains.setDmarc`

Set a custom DMARC record on these domains.

**Risk:** `write`

```ts theme={null}
await corsair.inboxkit.api.domains.setDmarc({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `uids` | `string[]` | No | Array of domain UIDs to update (PREFERRED). Either 'uids' or 'domains' must be provided. |
| `domains` | `string[]` | No | Array of domain names (e.g., \['example.com', 'test.org']). Use 'uids' instead when possible for better performance. |
| `reportingEmail` | `string` | Yes | Email for aggregate reports (rua) - REQUIRED. This is where DMARC aggregate reports will be sent. |
| `policy` | `none \| quarantine \| reject` | No | DMARC policy - REQUIRED. Specifies how to handle emails that fail DMARC checks. Defaults to 'reject'. |
| `email` | `string` | No | Alternative field for reportingEmail. If both provided, reportingEmail takes precedence. |
| `subdomainPolicy` | `none \| quarantine \| reject` | No | DMARC subdomain policy (optional). If not provided, subdomains inherit the main policy. |
| `percentage` | `number` | No | Percentage of messages to apply DMARC policy to (optional, 0-100). Useful for gradual rollout. |
| `forensicEmail` | `string` | No | Email for forensic/failure reports (ruf) (optional). Receives detailed reports of individual message failures. |
| `reportingInterval` | `number` | No | Reporting interval in seconds (optional). How often aggregate reports are sent (default: 604800 = 7 days). |
| `forensicOptions` | `string` | No | Forensic reporting options (fo tag) (optional). 0=default, 1=any failure, d=DKIM failure, s=SPF failure |
| `spfAlignment` | `r \| s` | No | SPF alignment mode (optional). 'r'=relaxed (subdomains allowed), 's'=strict (exact match required). |
| `dkimAlignment` | `r \| s` | No | DKIM alignment mode (optional). 'r'=relaxed (subdomains allowed), 's'=strict (exact match required). |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | Indicates if there was an error |
| `message` | `string \| null` | No | Human-readable response message |
| `domains` | `object[] \| null` | No | Array of updated domain objects |
| `dmarcConfig` | `object \| null` | No | Applied DMARC configuration |

> [accordion] domains full type
>
> ```ts theme={null}
> {
>   uid?: string | null,
>   name?: string | null,
>   tld?: string | null,
>   status?: string | null,
>   dmarc_email?: string | null,
>   dns_propagation_status?: string | null,
>   createdAt?: string | null,
>   updatedAt?: string | null
> }[] | null
> ```

> [accordion] dmarcConfig full type
>
> ```ts theme={null}
> {
>   policy?: string | null,
>   subdomainPolicy?: string | null,
>   percentage?: number | null,
>   reportingEmail?: string | null,
>   forensicEmail?: string | null,
>   reportingInterval?: number | null,
>   spfAlignment?: string | null,
>   dkimAlignment?: string | null,
>   forensicOptions?: string | null
> } | null
> ```

***

### setForwarding

`domains.setForwarding`

Set or remove the website URL domains redirect to. An empty forwarding\_url removes it.

**Risk:** `write`

```ts theme={null}
await corsair.inboxkit.api.domains.setForwarding({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `uids` | `string[]` | Yes | List of domain UIDs |
| `forwarding_url` | `string` | No | Target URL for forwarding. Use empty string "" to remove existing forwarding. Removing forwarding also turns the captcha off. |
| `captcha_enabled` | `boolean` | No | Set to true to show visitors a captcha before they are redirected to forwarding\_url, or false to remove it. Leave it out to keep each domain's current setting. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | — |
| `message` | `string \| null` | No | — |
| `domains` | `object[] \| null` | No | — |

> [accordion] domains full type
>
> ```ts theme={null}
> {
>   _id?: string | null,
>   name?: string | null,
>   uid?: string | null,
>   captcha_enabled?: boolean | null
> }[] | null
> ```

***

### updateContacts

`domains.updateContacts`

Update the WHOIS contact details of a domain registered through InboxKit, for all four contact roles.

**Risk:** `write`

```ts theme={null}
await corsair.inboxkit.api.domains.updateContacts({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `uid` | `string` | Yes | Unique identifier of the domain to update. The domain must be active, registered through InboxKit and belong to the workspace in X-Workspace-Id. |
| `contact_details` | `object` | Yes | The contact details to apply. They are used for all four contact roles on the domain: registrant, administrative, technical and billing. An `email` field is not accepted — see the endpoint description. |

> [accordion] contact\_details full type
>
> ```ts theme={null}
> {
>   first_name: string,
>   last_name: string,
>   phone: string,
>   organization?: string,
>   address_line1: string,
>   address_line2?: string,
>   city: string,
>   state: string,
>   country: string,
>   postal_code: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | Always false on success. |
| `message` | `string \| null` | No | Human-readable outcome, suitable for showing to an end user. Reflects whether the change was applied, was already in place, or is awaiting approval. |
| `data` | `object \| null` | No | Outcome of the change. |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   domain?: string | null,
>   status?: string | null
> } | null
> ```

***

### updatePrivacy

`domains.updatePrivacy`

Turn WHOIS privacy on or off for a domain registered through InboxKit.

**Risk:** `write`

```ts theme={null}
await corsair.inboxkit.api.domains.updatePrivacy({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `uid` | `string` | Yes | Unique identifier of the domain to update. The domain must be active, registered through InboxKit and belong to the workspace in X-Workspace-Id. |
| `enable` | `boolean` | Yes | true to turn privacy protection on, false to turn it off. |
| `reason` | `string` | No | Optional note stored alongside the change in the domain's change history. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | Always false on success. |
| `message` | `string \| null` | No | Human-readable outcome, suitable for showing to an end user. |
| `data` | `object \| null` | No | Outcome of the change. |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   domain?: string | null,
>   whois_privacy?: boolean | null,
>   status?: string | null
> } | null
> ```

***

## Email Insights

### getCampaignReplyRate

`emailInsights.getCampaignReplyRate`

Reply rate for each campaign and sequence step.

**Risk:** `read`

```ts theme={null}
await corsair.inboxkit.api.emailInsights.getCampaignReplyRate({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `period` | `number` | No | Number of days to report on. Accepts 1 to 90. Defaults to 30. Larger values return the last 90 days. |
| `limit` | `number` | No | Maximum rows to return. Accepts 1 to 1000. Defaults to 50. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `boolean \| null` | No | True when the request succeeded. |
| `data` | `object \| null` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   rows?: {
>     campaign_id?: string | null,
>     sequence_step?: number | null,
>     sent?: number | null,
>     replied?: number | null,
>     reply_rate?: number | null,
>     replied_attribution?: string | null
>   }[] | null,
>   total?: number | null,
>   data_available_from?: string | null
> } | null
> ```

***

### getDailyStats

`emailInsights.getDailyStats`

Daily email volume across the workspace.

**Risk:** `read`

```ts theme={null}
await corsair.inboxkit.api.emailInsights.getDailyStats({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `days` | `number` | No | Number of days to report on. Accepts 1 to 90. Defaults to 30. Larger values return the last 90 days. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `boolean \| null` | No | True when the request succeeded. |
| `data` | `object \| null` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   days?: number | null,
>   daily?: {
>     date?: string | null,
>     sent?: number | null,
>     received?: number | null,
>     replies?: number | null,
>     bounces?: number | null,
>     total?: number | null
>   }[] | null
> } | null
> ```

***

### getHighBounceMailboxes

`emailInsights.getHighBounceMailboxes`

Mailboxes whose bounce rate is above a threshold.

**Risk:** `read`

```ts theme={null}
await corsair.inboxkit.api.emailInsights.getHighBounceMailboxes({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `threshold` | `number` | No | Bounce rate to filter on, as a percentage. Defaults to 7. |
| `limit` | `number` | No | Maximum rows to return. Accepts 1 to 1000. Defaults to 100. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `boolean \| null` | No | True when the request succeeded. |
| `data` | `object \| null` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   mailboxes?: {
>     mailbox_id?: string | null,
>     bounce_rate?: number | null,
>     total_sent?: number | null,
>     total_bounces?: number | null
>   }[] | null,
>   threshold?: number | null
> } | null
> ```

***

### getMailboxActivity

`emailInsights.getMailboxActivity`

Most recent email events for one mailbox, newest first.

**Risk:** `read`

```ts theme={null}
await corsair.inboxkit.api.emailInsights.getMailboxActivity({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `uid` | `string` | Yes | Mailbox UID. |
| `limit` | `number` | No | Maximum rows to return. Accepts 1 to 1000. Defaults to 50. |
| `offset` | `number` | No | Rows to skip before returning results. Accepts 0 to 100000. Defaults to 0. |
| `event_type` | `string` | No | Return only this event type. One of sent, received, reply, auto\_reply, bounce\_hard or bounce\_soft. Returns all types when omitted. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `boolean \| null` | No | True when the request succeeded. |
| `data` | `object[] \| null` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   event_id?: string | null,
>   mailbox_id?: string | null,
>   event_type?: string | null,
>   from?: string | null,
>   subject?: string | null,
>   received_at?: string | null
> }[] | null
> ```

***

### getMailboxAuthFailures

`emailInsights.getMailboxAuthFailures`

Inbound messages to one mailbox that did not pass SPF, DKIM or DMARC.

**Risk:** `read`

```ts theme={null}
await corsair.inboxkit.api.emailInsights.getMailboxAuthFailures({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `uid` | `string` | Yes | Mailbox UID. |
| `period` | `number` | No | Number of days to report on. Accepts 1 to 90. Defaults to 30. Larger values return the last 90 days. |
| `protocol` | `string` | No | Which check to report on. One of spf, dkim or dmarc. Defaults to dkim. |
| `warmup` | `string` | No | Set to true to report on warmup pool messages instead of regular mail. Defaults to false. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `boolean \| null` | No | True when the request succeeded. |
| `data` | `object \| null` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   protocol?: string | null,
>   period_days?: number | null,
>   total_received?: number | null,
>   total_failing?: number | null,
>   samples?: {
>     received_at?: string | null,
>     from?: string | null,
>     from_domain?: string | null,
>     subject?: string | null,
>     spf_verdict?: string | null,
>     dkim_verdict?: string | null,
>     dkim_signing_domain?: string | null,
>     dmarc_verdict?: string | null,
>     dmarc_action?: string | null,
>     auth_results_raw?: string | null,
>     provider_message_id?: string | null,
>     message_id?: string | null
>   }[] | null
> } | null
> ```

***

### getMailboxBodyTemplates

`emailInsights.getMailboxBodyTemplates`

Groups of outbound emails from one mailbox that share a body structure.

**Risk:** `read`

```ts theme={null}
await corsair.inboxkit.api.emailInsights.getMailboxBodyTemplates({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `uid` | `string` | Yes | Mailbox UID. |
| `period` | `number` | No | Number of days to report on. Accepts 1 to 90. Defaults to 30. Larger values return the last 90 days. |
| `limit` | `number` | No | Maximum rows to return. Accepts 1 to 1000. Defaults to 30. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `boolean \| null` | No | True when the request succeeded. |
| `data` | `object \| null` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   mailbox?: {
>     uid?: string | null,
>     email?: string | null,
>     provider?: string | null
>   } | null,
>   templates?: {
>     skeleton_hash?: string | null,
>     sends?: number | null,
>     warmup_sends?: number | null,
>     unique_recipients?: number | null,
>     sample_subject?: string | null,
>     sample_preview?: string | null,
>     avg_length?: number | null,
>     has_spin_tax?: number | null,
>     has_personalization?: number | null,
>     tight_variants?: number | null,
>     first_seen?: string | null,
>     last_seen?: string | null
>   }[] | null,
>   total_sent?: number | null
> } | null
> ```

***

### getMailboxBounceEvents

`emailInsights.getMailboxBounceEvents`

Delivery failures for one mailbox, with the reason the receiving server gave.

**Risk:** `read`

```ts theme={null}
await corsair.inboxkit.api.emailInsights.getMailboxBounceEvents({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `uid` | `string` | Yes | Mailbox UID. |
| `period` | `number` | No | Number of days to report on. Accepts 1 to 90. Defaults to 30. Larger values return the last 90 days. |
| `limit` | `number` | No | Maximum rows to return. Accepts 1 to 1000. Defaults to 100. |
| `offset` | `number` | No | Rows to skip before returning results. Accepts 0 to 100000. Defaults to 0. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `boolean \| null` | No | True when the request succeeded. |
| `data` | `object \| null` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   events?: {
>     message_id?: string | null,
>     subject?: string | null,
>     from?: string | null,
>     to?: string | null,
>     failed_recipients?: (string | null)[] | null,
>     received_at?: string | null,
>     event_type?: string | null,
>     bounce_cause?: string | null,
>     bounce_smtp_code?: number | null,
>     bounce_enhanced_code?: string | null,
>     bounce_reporting_mta?: string | null,
>     snippet?: string | null,
>     body_text?: string | null
>   }[] | null,
>   total?: number | null,
>   limit?: number | null,
>   offset?: number | null
> } | null
> ```

***

### getMailboxDeliverability

`emailInsights.getMailboxDeliverability`

Bounce and authentication detail for one mailbox.

**Risk:** `read`

```ts theme={null}
await corsair.inboxkit.api.emailInsights.getMailboxDeliverability({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `uid` | `string` | Yes | Mailbox UID. |
| `period` | `number` | No | Number of days to report on. Accepts 1 to 90. Defaults to 30. Larger values return the last 90 days. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `boolean \| null` | No | True when the request succeeded. |
| `data` | `object \| null` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   bounce_rate_percent?: number | null,
>   hard_bounces?: number | null,
>   soft_bounces?: number | null,
>   total_bounces?: number | null,
>   orphan_bounces?: number | null,
>   auto_reply_count?: number | null,
>   auto_reply_rate_percent?: number | null,
>   bounce_cause_breakdown?: {
>     cause?: string | null,
>     count?: number | null
>   }[] | null,
>   bounced_recipients?: {
>     recipient_email?: string | null,
>     bounce_count?: number | null,
>     hard_bounces?: number | null,
>     soft_bounces?: number | null,
>     last_bounce_timestamp?: string | null
>   }[] | null,
>   bounced_domains?: {
>     domain?: string | null,
>     total_bounces?: number | null,
>     hard_bounces?: number | null,
>     soft_bounces?: number | null
>   }[] | null,
>   spf_pass_rate?: number | null,
>   dkim_pass_rate?: number | null,
>   dmarc_pass_rate?: number | null
> } | null
> ```

***

### getMailboxesHealth

`emailInsights.getMailboxesHealth`

Seven-day activity summary for each mailbox in the workspace.

**Risk:** `read`

```ts theme={null}
await corsair.inboxkit.api.emailInsights.getMailboxesHealth({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `page` | `number` | No | Page of results to return, starting at 1. Defaults to 1. |
| `limit` | `number` | No | Maximum rows to return. Accepts 1 to 1000. Defaults to 100. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `boolean \| null` | No | True when the request succeeded. |
| `data` | `object[] \| null` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   mailbox_id?: string | null,
>   status?: string | null,
>   total_7d?: number | null,
>   sent_7d?: number | null,
>   received_7d?: number | null,
>   reply_7d?: number | null,
>   bounce_7d?: number | null,
>   reply_rate_percent?: number | null,
>   bounce_rate_percent?: number | null,
>   last_event_at?: string | null,
>   sent_non_warmup_7d?: number | null,
>   sent_with_reply_7d?: number | null,
>   attributed_reply_rate_percent?: number | null
> }[] | null
> ```

***

### getMailboxFirstTouchFunnel

`emailInsights.getMailboxFirstTouchFunnel`

Recipients one mailbox contacted for the first time, by day.

**Risk:** `read`

```ts theme={null}
await corsair.inboxkit.api.emailInsights.getMailboxFirstTouchFunnel({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `uid` | `string` | Yes | Mailbox UID. |
| `recent_days` | `number` | No | Also return individual recipients first contacted in this many days. Accepts 1 to 90. Omit to return daily counts only. |
| `limit` | `number` | No | Maximum rows to return. Accepts 1 to 1000. Defaults to 50. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `boolean \| null` | No | True when the request succeeded. |
| `data` | `object \| null` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   daily?: {
>     date?: string | null,
>     recipient_count?: number | null
>   }[] | null,
>   recent?: {
>     recipient?: string | null,
>     first_sent?: string | null
>   }[] | null,
>   data_from_parser_v4?: string | null
> } | null
> ```

***

### getMailboxHealth

`emailInsights.getMailboxHealth`

Activity status for one mailbox.

**Risk:** `read`

```ts theme={null}
await corsair.inboxkit.api.emailInsights.getMailboxHealth({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `uid` | `string` | Yes | Mailbox UID. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `boolean \| null` | No | True when the request succeeded. |
| `data` | `object \| null` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   mailbox_id?: string | null,
>   status?: string | null,
>   total_7d?: number | null,
>   total_30d?: number | null,
>   last_event_at?: string | null,
>   first_event_at?: string | null,
>   bounce_rate_30d?: number | null
> } | null
> ```

***

### getMailboxMessageBreakdown

`emailInsights.getMailboxMessageBreakdown`

Sent and received messages for one mailbox, by type and by day.

**Risk:** `read`

```ts theme={null}
await corsair.inboxkit.api.emailInsights.getMailboxMessageBreakdown({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `uid` | `string` | Yes | Mailbox UID. |
| `period` | `number` | No | Number of days to report on. Accepts 1 to 90. Defaults to 30. Larger values return the last 90 days. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `boolean \| null` | No | True when the request succeeded. |
| `data` | `object \| null` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   mailbox?: {
>     uid?: string | null,
>     email?: string | null,
>     provider?: string | null
>   } | null,
>   sent?: {
>     total_sent?: number | null,
>     new_emails?: number | null,
>     replies?: number | null
>   } | null,
>   received?: {
>     total_received?: number | null,
>     regular?: number | null,
>     auto_replies?: number | null,
>     bounces_hard?: number | null,
>     bounces_soft?: number | null
>   } | null,
>   by_day?: {
>     date?: string | null,
>     sent?: number | null,
>     received?: number | null,
>     replies?: number | null,
>     bounces?: number | null
>   }[] | null
> } | null
> ```

***

### getMailboxRecipientEspBreakdown

`emailInsights.getMailboxRecipientEspBreakdown`

Sending volume and reply rate for one mailbox, by the recipient's email provider.

**Risk:** `read`

```ts theme={null}
await corsair.inboxkit.api.emailInsights.getMailboxRecipientEspBreakdown({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `uid` | `string` | Yes | Mailbox UID. |
| `period` | `number` | No | Number of days to report on. Accepts 1 to 90. Defaults to 30. Larger values return the last 90 days. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `boolean \| null` | No | True when the request succeeded. |
| `data` | `object \| null` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   rows?: {
>     esp_provider?: string | null,
>     esp_category?: string | null,
>     domain_count?: number | null,
>     recipient_count?: number | null,
>     send_count?: number | null,
>     replied_count?: number | null,
>     auto_replied_count?: number | null,
>     reply_rate?: number | null,
>     send_share?: number | null,
>     sample_domain?: string | null
>   }[] | null,
>   total_sends?: number | null,
>   total_replied?: number | null,
>   total_auto_replied?: number | null,
>   total_reply_rate?: number | null,
>   total_domains?: number | null,
>   total_recipients?: number | null,
>   classified_pct?: number | null,
>   period_days?: number | null
> } | null
> ```

***

### getMailboxReplyRateByDomain

`emailInsights.getMailboxReplyRateByDomain`

Emails sent and replies received for one mailbox, by recipient domain.

**Risk:** `read`

```ts theme={null}
await corsair.inboxkit.api.emailInsights.getMailboxReplyRateByDomain({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `uid` | `string` | Yes | Mailbox UID. |
| `period` | `number` | No | Number of days to report on. Accepts 1 to 90. Defaults to 30. Larger values return the last 90 days. |
| `limit` | `number` | No | Maximum rows to return. Accepts 1 to 1000. Defaults to 50. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `boolean \| null` | No | True when the request succeeded. |
| `data` | `object \| null` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   rows?: {
>     domain?: string | null,
>     sent?: number | null,
>     replied?: number | null,
>     reply_rate?: number | null
>   }[] | null,
>   total_sent?: number | null,
>   total_replied?: number | null
> } | null
> ```

***

### getMailboxReplyTimeHeatmap

`emailInsights.getMailboxReplyTimeHeatmap`

How quickly replies arrive at one mailbox, by day of week and hour.

**Risk:** `read`

```ts theme={null}
await corsair.inboxkit.api.emailInsights.getMailboxReplyTimeHeatmap({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `uid` | `string` | Yes | Mailbox UID. |
| `period` | `number` | No | Number of days to report on. Accepts 1 to 90. Defaults to 30. Larger values return the last 90 days. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `boolean \| null` | No | True when the request succeeded. |
| `data` | `object \| null` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   cells?: {
>     dow?: number | null,
>     hour?: number | null,
>     p50_seconds?: number | null,
>     p95_seconds?: number | null,
>     count?: number | null
>   }[] | null,
>   total_replies?: number | null,
>   data_from_parser_v4?: string | null
> } | null
> ```

***

### getMailboxSendingIpBreakdown

`emailInsights.getMailboxSendingIpBreakdown`

Sending IPs one mailbox used, with Gmail placement and blacklist status.

**Risk:** `read`

```ts theme={null}
await corsair.inboxkit.api.emailInsights.getMailboxSendingIpBreakdown({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `uid` | `string` | Yes | Mailbox UID. |
| `period` | `number` | No | Number of days to report on. Accepts 1 to 90. Defaults to 30. Larger values return the last 90 days. |
| `limit` | `number` | No | Maximum rows to return. Accepts 1 to 1000. Defaults to 50. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `boolean \| null` | No | True when the request succeeded. |
| `data` | `object \| null` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   rows?: {
>     ip?: string | null,
>     sent?: number | null,
>     gmail_inbox_count?: number | null,
>     gmail_promotions_count?: number | null,
>     gmail_spam_count?: number | null,
>     gmail_unknown_count?: number | null,
>     inbox_rate?: number | null,
>     first_seen_at?: string | null,
>     last_seen_at?: string | null,
>     hostname?: string | null,
>     hostname_checked_at?: string | null,
>     blacklist_hits?: number | null,
>     blacklist_providers?: (string | null)[] | null,
>     blacklist_checked_at?: string | null
>   }[] | null,
>   total_sent?: number | null,
>   unique_ips?: number | null,
>   data_from_parser_v4?: string | null,
>   unknown_ip_excluded?: boolean | null,
>   notes?: {
>     bounce_attribution?: string | null,
>     placement_support?: string | null
>   } | null
> } | null
> ```

***

### getMailboxStats

`emailInsights.getMailboxStats`

Event totals and rates for one mailbox over a period.

**Risk:** `read`

```ts theme={null}
await corsair.inboxkit.api.emailInsights.getMailboxStats({ uid: '<mailbox uid>', period: 30 });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `uid` | `string` | Yes | Mailbox UID. |
| `period` | `number` | No | Number of days to report on. Accepts 1 to 90. Defaults to 30. Larger values return the last 90 days. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `boolean \| null` | No | True when the request succeeded. |
| `data` | `object \| null` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   total?: number | null,
>   sent?: number | null,
>   received?: number | null,
>   reply?: number | null,
>   auto_reply?: number | null,
>   bounce_hard?: number | null,
>   bounce_soft?: number | null,
>   warmup_sent?: number | null,
>   warmup_received?: number | null,
>   first_event_at?: string | null,
>   last_event_at?: string | null,
>   bounce_rate?: number | null,
>   response_rate?: number | null,
>   bounce_rate_percent?: number | null,
>   reply_rate_percent?: number | null
> } | null
> ```

***

### getMailboxSubjectAnalysis

`emailInsights.getMailboxSubjectAnalysis`

Most common subject line keywords for one mailbox, with length statistics.

**Risk:** `read`

```ts theme={null}
await corsair.inboxkit.api.emailInsights.getMailboxSubjectAnalysis({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `uid` | `string` | Yes | Mailbox UID. |
| `period` | `number` | No | Number of days to report on. Accepts 1 to 90. Defaults to 30. Larger values return the last 90 days. |
| `limit` | `number` | No | Maximum rows to return. Accepts 1 to 1000. Defaults to 20. |
| `direction` | `string` | No | Which messages to analyse. One of sent, received or all. Defaults to sent. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `boolean \| null` | No | True when the request succeeded. |
| `data` | `object \| null` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   period_days?: number | null,
>   common_keywords?: {
>     keyword?: string | null,
>     count?: number | null
>   }[] | null,
>   subject_length_stats?: {
>     avg_length?: number | null,
>     min_length?: number | null,
>     max_length?: number | null
>   } | null,
>   warmup_messages_filtered?: number | null
> } | null
> ```

***

### getMailboxTopRecipientDomains

`emailInsights.getMailboxTopRecipientDomains`

Domains one mailbox sent to most often.

**Risk:** `read`

```ts theme={null}
await corsair.inboxkit.api.emailInsights.getMailboxTopRecipientDomains({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `uid` | `string` | Yes | Mailbox UID. |
| `period` | `number` | No | Number of days to report on. Accepts 1 to 90. Defaults to 30. Larger values return the last 90 days. |
| `limit` | `number` | No | Maximum rows to return. Accepts 1 to 1000. Defaults to 10. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `boolean \| null` | No | True when the request succeeded. |
| `data` | `object \| null` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   mailbox?: {
>     uid?: string | null,
>     email?: string | null,
>     provider?: string | null
>   } | null,
>   domains?: {
>     domain?: string | null,
>     email_count?: number | null,
>     unique_recipients?: number | null,
>     last_sent?: string | null
>   }[] | null
> } | null
> ```

***

### getMailboxTopRecipients

`emailInsights.getMailboxTopRecipients`

Addresses one mailbox sent to most often.

**Risk:** `read`

```ts theme={null}
await corsair.inboxkit.api.emailInsights.getMailboxTopRecipients({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `uid` | `string` | Yes | Mailbox UID. |
| `period` | `number` | No | Number of days to report on. Accepts 1 to 90. Defaults to 30. Larger values return the last 90 days. |
| `limit` | `number` | No | Maximum rows to return. Accepts 1 to 1000. Defaults to 10. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `boolean \| null` | No | True when the request succeeded. |
| `data` | `object \| null` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   mailbox?: {
>     uid?: string | null,
>     email?: string | null,
>     provider?: string | null
>   } | null,
>   recipients?: {
>     email?: string | null,
>     email_count?: number | null,
>     last_sent?: string | null
>   }[] | null
> } | null
> ```

***

### getMailboxTrends

`emailInsights.getMailboxTrends`

Daily event counts for one mailbox, oldest first.

**Risk:** `read`

```ts theme={null}
await corsair.inboxkit.api.emailInsights.getMailboxTrends({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `uid` | `string` | Yes | Mailbox UID. |
| `period` | `number` | No | Number of days to report on. Accepts 1 to 90. Defaults to 30. Larger values return the last 90 days. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `boolean \| null` | No | True when the request succeeded. |
| `data` | `object[] \| null` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   bucket?: string | null,
>   total?: number | null,
>   sent?: number | null,
>   received?: number | null,
>   reply?: number | null,
>   auto_reply?: number | null,
>   bounce_hard?: number | null,
>   bounce_soft?: number | null,
>   warmup_sent?: number | null,
>   warmup_received?: number | null
> }[] | null
> ```

***

### getMailboxVelocityOverlay

`emailInsights.getMailboxVelocityOverlay`

Hourly sending and reply volume for one mailbox.

**Risk:** `read`

```ts theme={null}
await corsair.inboxkit.api.emailInsights.getMailboxVelocityOverlay({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `uid` | `string` | Yes | Mailbox UID. |
| `period` | `number` | No | Number of days to report on. Accepts 1 to 90. Defaults to 30. Larger values return the last 90 days. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `boolean \| null` | No | True when the request succeeded. |
| `data` | `object \| null` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   series?: {
>     hour?: string | null,
>     sent?: number | null,
>     replies?: number | null
>   }[] | null
> } | null
> ```

***

### getMailboxWarmupStats

`emailInsights.getMailboxWarmupStats`

Warmup volume for one mailbox compared with real sending, with SPF, DKIM and DMARC pass rates.

**Risk:** `read`

```ts theme={null}
await corsair.inboxkit.api.emailInsights.getMailboxWarmupStats({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `uid` | `string` | Yes | Mailbox UID. |
| `period` | `number` | No | Number of days to report on. Accepts 1 to 90. Defaults to 30. Larger values return the last 90 days. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `boolean \| null` | No | True when the request succeeded. |
| `data` | `object \| null` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   period_days?: number | null,
>   total_sent?: number | null,
>   warmup_sent?: number | null,
>   gross_sent?: number | null,
>   warmup_share_pct?: number | null,
>   daily?: {
>     date?: string | null,
>     warmup_sent?: number | null,
>     real_sent?: number | null
>   }[] | null,
>   reasons?: {
>     reason?: string | null,
>     count?: number | null
>   }[] | null,
>   top_peer_domains?: {
>     domain?: string | null,
>     count?: number | null
>   }[] | null,
>   sample_subjects?: (string | null)[] | null,
>   warmup_received?: number | null,
>   warmup_spf_pass_rate?: number | null,
>   warmup_dkim_pass_rate?: number | null,
>   warmup_dmarc_pass_rate?: number | null,
>   warmup_peer_senders?: {
>     domain?: string | null,
>     count?: number | null
>   }[] | null
> } | null
> ```

***

### getOverview

`emailInsights.getOverview`

Totals and rates across every mailbox in the workspace for a period.

**Risk:** `read`

```ts theme={null}
await corsair.inboxkit.api.emailInsights.getOverview({ period: 7 });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `period` | `number` | No | Number of days to report on. Accepts 1 to 90. Defaults to 30. Larger values return the last 90 days. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `boolean \| null` | No | True when the request succeeded. |
| `data` | `object \| null` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   total?: number | null,
>   sent?: number | null,
>   received?: number | null,
>   reply?: number | null,
>   auto_reply?: number | null,
>   bounce_hard?: number | null,
>   bounce_soft?: number | null,
>   active_mailboxes?: number | null,
>   bounce_rate?: number | null,
>   reply_rate?: number | null,
>   last_updated?: string | null
> } | null
> ```

***

### getWorkspaceActivity

`emailInsights.getWorkspaceActivity`

Most recent email events across the workspace, newest first.

**Risk:** `read`

```ts theme={null}
await corsair.inboxkit.api.emailInsights.getWorkspaceActivity({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `limit` | `number` | No | Maximum rows to return. Accepts 1 to 1000. Defaults to 50. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `boolean \| null` | No | True when the request succeeded. |
| `data` | `object[] \| null` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   event_id?: string | null,
>   mailbox_id?: string | null,
>   event_type?: string | null,
>   from?: string | null,
>   subject?: string | null,
>   received_at?: string | null
> }[] | null
> ```

***

## Forwarding

### deleteRule

`forwarding.deleteRule`

Delete a rule. Its mailboxes stop forwarding.

**Risk:** `destructive`

```ts theme={null}
await corsair.inboxkit.api.forwarding.deleteRule({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `uid` | `string` | Yes | Rule UID |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | Indicates if there was an error |
| `message` | `string \| null` | No | Human-readable response message |
| `rule` | `object \| null` | No | — |
| `mailboxes` | `object[] \| null` | No | — |

> [accordion] rule full type
>
> ```ts theme={null}
> {
>   uid?: string | null,
>   status?: string | null
> } | null
> ```

> [accordion] mailboxes full type
>
> ```ts theme={null}
> {
>   uid?: string | null,
>   mode?: string | null,
>   rule?: string | null,
>   status?: string | null,
>   replaces?: {
>     mode?: string | null,
>     forwarding_email?: string | null,
>     rule?: string | null
>   } | null
> }[] | null
> ```

***

### getCapabilities

`forwarding.getCapabilities`

What advanced forwarding can filter on for Google and Microsoft mailboxes, and the limits.

**Risk:** `read`

```ts theme={null}
await corsair.inboxkit.api.forwarding.getCapabilities({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | Indicates if there was an error |
| `message` | `string \| null` | No | Human-readable response message |
| `data` | `object \| null` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   modes?: (string | null)[] | null,
>   matches?: (string | null)[] | null,
>   limits?: {
>     max_mailboxes_per_request?: number | null
>   } | null,
>   platforms?: {
>     GOOGLE?: {
>       platforms?: (string | null)[] | null,
>       locations?: Record<string, any> | null,
>       notes?: Record<string, any> | null,
>       limits?: {
>         max_conditions?: number | null,
>         max_value_length?: number | null,
>         max_regex_length?: number | null,
>         max_rules_per_domain?: number | null
>       } | null
>     } | null,
>     MICROSOFT?: {
>       platforms?: (string | null)[] | null,
>       locations?: Record<string, any> | null,
>       notes?: Record<string, any> | null,
>       limits?: {
>         max_conditions?: number | null,
>         max_value_length?: number | null,
>         max_pattern_length?: number | null,
>         max_mailboxes_per_rule?: number | null,
>         max_rules_per_tenant?: number | null
>       } | null
>     } | null
>   } | null
> } | null
> ```

***

### getRule

`forwarding.getRule`

One advanced forwarding rule.

**Risk:** `read`

```ts theme={null}
await corsair.inboxkit.api.forwarding.getRule({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `uid` | `string` | Yes | Rule UID |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | Indicates if there was an error |
| `message` | `string \| null` | No | Human-readable response message |
| `rule` | `object \| null` | No | — |

> [accordion] rule full type
>
> ```ts theme={null}
> {
>   uid?: string | null,
>   platform?: string | null,
>   scope?: string | null,
>   match?: string | null,
>   conditions?: {
>     location?: string | null,
>     header_name?: string | null,
>     match?: string | null,
>     value?: string | null
>   }[] | null,
>   forwarding_email?: string | null,
>   mailboxes?: {
>     uid?: string | null,
>     email?: string | null
>   }[] | null,
>   status?: string | null,
>   last_error?: string | null,
>   applied_at?: string | null,
>   created_at?: string | null,
>   updated_at?: string | null
> } | null
> ```

***

### listJobs

`forwarding.listJobs`

Status of forwarding jobs.

**Risk:** `read`

```ts theme={null}
await corsair.inboxkit.api.forwarding.listJobs({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `page` | `number` | No | Page number (defaults to 1) |
| `limit` | `number` | No | Number of items per page (defaults to 10, max 100) |
| `mailbox_uid` | `string` | No | Filter jobs by a specific mailbox UID |
| `status` | `pending \| queued \| processing \| completed \| failed \| retrying \| cancelled \| switching` | No | Filter jobs by status. "switching" means the new setup is working and the old one is being removed. |
| `action` | `enable \| disable \| update` | No | Filter jobs by action type |
| `mode` | `off \| simple \| advanced` | No | Filter jobs by requested mode |
| `rule` | `string` | No | Filter jobs by rule UID |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | Indicates if there was an error |
| `message` | `string \| null` | No | Human-readable response message |
| `jobs` | `object[] \| null` | No | Array of forwarding job objects with full details |
| `pagination` | `object \| null` | No | Pagination details |

> [accordion] jobs full type
>
> ```ts theme={null}
> {
>   mailbox_uid?: string | null,
>   mailbox_email?: string | null,
>   forwarding_email?: string | null,
>   action?: string | null,
>   status?: string | null,
>   status_message?: string | null,
>   error_message?: string | null,
>   attempts?: number | null,
>   max_attempts?: number | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   completed_at?: string | null,
>   last_attempt_at?: string | null,
>   next_retry_at?: string | null,
>   mode?: string | null,
>   rule?: string | null,
>   cutover_after?: string | null
> }[] | null
> ```

> [accordion] pagination full type
>
> ```ts theme={null}
> {
>   page?: number | null,
>   limit?: number | null,
>   total?: number | null,
>   pages?: number | null
> } | null
> ```

***

### listRules

`forwarding.listRules`

Advanced forwarding rules, newest first, with conditions, mailboxes and status.

**Risk:** `read`

```ts theme={null}
await corsair.inboxkit.api.forwarding.listRules({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `page` | `number` | No | Page number (defaults to 1) |
| `limit` | `number` | No | Number of items per page (defaults to 25, max 100) |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | Indicates if there was an error |
| `message` | `string \| null` | No | Human-readable response message |
| `rules` | `object[] \| null` | No | — |
| `pagination` | `object \| null` | No | — |

> [accordion] rules full type
>
> ```ts theme={null}
> {
>   uid?: string | null,
>   platform?: string | null,
>   scope?: string | null,
>   match?: string | null,
>   conditions?: {
>     location?: string | null,
>     header_name?: string | null,
>     match?: string | null,
>     value?: string | null
>   }[] | null,
>   forwarding_email?: string | null,
>   mailboxes?: {
>     uid?: string | null,
>     email?: string | null
>   }[] | null,
>   status?: string | null,
>   last_error?: string | null,
>   applied_at?: string | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] pagination full type
>
> ```ts theme={null}
> {
>   page?: number | null,
>   limit?: number | null,
>   total?: number | null,
>   pages?: number | null
> } | null
> ```

***

### remove

`forwarding.remove`

Turn off forwarding for mailboxes.

**Risk:** `write`

```ts theme={null}
await corsair.inboxkit.api.forwarding.remove({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `uids` | `string[]` | Yes | Array of mailbox UIDs to remove forwarding from |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | Indicates if there was an error |
| `message` | `string \| null` | No | Human-readable response message |
| `jobs` | `object[] \| null` | No | Array of forwarding job objects |

> [accordion] jobs full type
>
> ```ts theme={null}
> {
>   mailbox_uid?: string | null,
>   action?: string | null,
>   status?: string | null,
>   mode?: string | null,
>   created_at?: string | null
> }[] | null
> ```

***

### setup

`forwarding.setup`

Forward all mail from these mailboxes to one address. Setup takes a few minutes; follow it with forwarding.listJobs.

**Risk:** `destructive`

```ts theme={null}
await corsair.inboxkit.api.forwarding.setup({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `uids` | `string[]` | Yes | Array of mailbox UIDs (Google, Microsoft or Azure) |
| `forwarding_email` | `string` | Yes | Email address to forward messages to |

Every message to these mailboxes goes to `forwarding_email` too. Setup takes a few minutes; follow it with `forwarding.listJobs`.

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | Indicates if there was an error |
| `message` | `string \| null` | No | Human-readable response message |
| `jobs` | `object[] \| null` | No | Array of forwarding job objects |

> [accordion] jobs full type
>
> ```ts theme={null}
> {
>   mailbox_uid?: string | null,
>   forwarding_email?: string | null,
>   action?: string | null,
>   status?: string | null,
>   mode?: string | null,
>   created_at?: string | null
> }[] | null
> ```

***

### setupAdvanced

`forwarding.setupAdvanced`

Forward only the messages that match your conditions. A rule is created per Google domain or Microsoft account, and replaces any forwarding the mailbox had.

**Risk:** `destructive`

```ts theme={null}
await corsair.inboxkit.api.forwarding.setupAdvanced({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `uids` | `string[]` | Yes | Array of mailbox UIDs (Google, Microsoft or Azure), up to 500 |
| `forwarding_email` | `string` | Yes | Email address to forward messages to |
| `mode` | `advanced` | Yes | Must be "advanced" |
| `match` | `all \| any` | No | Advanced only. all: every condition must match. any: at least one must match. Default "all". |
| `conditions` | `object[]` | Yes | What a message must match to be forwarded |

`mode` must be `advanced`. Replaces any forwarding the mailbox had.

> [accordion] conditions full type
>
> ```ts theme={null}
> {
>   location: subject | body | sender | recipients_header | envelope_sender | header | full_headers | message_type,
>   header_name?: string,
>   match: regex | not_regex | contains | not_contains | equals | not_equals,
>   value: string
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | Indicates if there was an error |
| `message` | `string \| null` | No | Human-readable response message |
| `jobs` | `object[] \| null` | No | Array of forwarding job objects |
| `mailboxes` | `object[] \| null` | No | One entry per mailbox, with the mode it was set to |
| `rules` | `object[] \| null` | No | Advanced only: the rules created. Mailboxes are grouped into one rule per Google domain or Microsoft account. |

> [accordion] jobs full type
>
> ```ts theme={null}
> {
>   mailbox_uid?: string | null,
>   forwarding_email?: string | null,
>   action?: string | null,
>   status?: string | null,
>   mode?: string | null,
>   rule?: string | null,
>   replaces?: {
>     mode?: string | null,
>     forwarding_email?: string | null,
>     rule?: string | null
>   } | null,
>   created_at?: string | null
> }[] | null
> ```

> [accordion] mailboxes full type
>
> ```ts theme={null}
> {
>   uid?: string | null,
>   mode?: string | null,
>   rule?: string | null,
>   status?: string | null,
>   replaces?: {
>     mode?: string | null,
>     forwarding_email?: string | null,
>     rule?: string | null
>   } | null
> }[] | null
> ```

> [accordion] rules full type
>
> ```ts theme={null}
> {
>   uid?: string | null,
>   platform?: string | null,
>   scope?: string | null,
>   match?: string | null,
>   conditions?: {
>     location?: string | null,
>     header_name?: string | null,
>     match?: string | null,
>     value?: string | null
>   }[] | null,
>   forwarding_email?: string | null,
>   mailboxes?: {
>     uid?: string | null,
>     email?: string | null
>   }[] | null,
>   status?: string | null,
>   last_error?: string | null,
>   applied_at?: string | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

***

### update

`forwarding.update`

Change the forwarding address of mailboxes that already forward.

**Risk:** `destructive`

```ts theme={null}
await corsair.inboxkit.api.forwarding.update({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `uids` | `string[]` | Yes | Array of mailbox UIDs (Google, Microsoft or Azure) |
| `forwarding_email` | `string` | Yes | New email address to forward messages to |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | Indicates if there was an error |
| `message` | `string \| null` | No | Human-readable response message |
| `jobs` | `object[] \| null` | No | Array of forwarding job objects |

> [accordion] jobs full type
>
> ```ts theme={null}
> {
>   mailbox_uid?: string | null,
>   forwarding_email?: string | null,
>   action?: string | null,
>   status?: string | null,
>   mode?: string | null,
>   created_at?: string | null
> }[] | null
> ```

***

### updateRule

`forwarding.updateRule`

Change a rule's conditions, match, forwarding address or mailboxes.

**Risk:** `destructive`

```ts theme={null}
await corsair.inboxkit.api.forwarding.updateRule({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `uid` | `string` | Yes | Rule UID |
| `forwarding_email` | `string` | No | New address to forward to |
| `match` | `all \| any` | No | all: every condition must match. any: at least one must match. |
| `conditions` | `object[]` | No | Replaces all the rule's conditions |
| `uids` | `string[]` | No | The full list of mailbox UIDs for this rule (same Google domain or Microsoft account) |

> [accordion] conditions full type
>
> ```ts theme={null}
> {
>   location: subject | body | sender | recipients_header | envelope_sender | header | full_headers | message_type,
>   header_name?: string,
>   match: regex | not_regex | contains | not_contains | equals | not_equals,
>   value: string
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | Indicates if there was an error |
| `message` | `string \| null` | No | Human-readable response message |
| `rule` | `object \| null` | No | — |
| `mailboxes` | `object[] \| null` | No | — |

> [accordion] rule full type
>
> ```ts theme={null}
> {
>   uid?: string | null,
>   platform?: string | null,
>   scope?: string | null,
>   match?: string | null,
>   conditions?: {
>     location?: string | null,
>     header_name?: string | null,
>     match?: string | null,
>     value?: string | null
>   }[] | null,
>   forwarding_email?: string | null,
>   mailboxes?: {
>     uid?: string | null,
>     email?: string | null
>   }[] | null,
>   status?: string | null,
>   last_error?: string | null,
>   applied_at?: string | null,
>   created_at?: string | null,
>   updated_at?: string | null
> } | null
> ```

> [accordion] mailboxes full type
>
> ```ts theme={null}
> {
>   uid?: string | null,
>   mode?: string | null,
>   rule?: string | null,
>   status?: string | null,
>   replaces?: {
>     mode?: string | null,
>     forwarding_email?: string | null,
>     rule?: string | null
>   } | null
> }[] | null
> ```

***

## Inbox Placement

### createTest

`inboxPlacement.createTest`

SPENDS MONEY. Run an inbox placement test from your mailboxes, once or on a schedule.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.inboxkit.api.inboxPlacement.createTest({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `sender_mailbox_ids` | `string[]` | Yes | Array of mailbox UIDs (UUID format, not MongoDB \_id) |
| `test_name` | `string` | Yes | Name for the test (required) |
| `frequency` | `once \| weekly \| biweekly \| monthly \| monday \| tuesday \| wednesday \| thursday \| friday \| saturday \| sunday` | No | Test frequency. Use 'once' for one-time test, or specify recurring schedule. Default "once". |
| `types` | `(personal_gmail \| personal_outlook \| business_gmail \| business_outlook)[]` | No | Receiver mailbox types to test against. If not specified, all types are used. |
| `custom_subject` | `string` | No | Custom email subject line (max 500 characters) |
| `custom_body` | `string` | No | Custom email body content (max 50000 characters) |
| `sending_interval` | `number` | No | Interval between sending emails in minutes (1-60). Default 1. |
| `payment_method` | `CREDITS \| INBOX_PLACEMENT_TOKENS` | No | Payment method to use. CREDITS uses wallet balance (\$0.05/mailbox), INBOX\_PLACEMENT\_TOKENS uses tokens (1 token/mailbox). Default "CREDITS". |

Spends money, from the wallet or credits. With a `frequency`, it repeats and is charged each time.

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `boolean \| null` | No | — |
| `test` | `object \| null` | No | — |
| `schedule` | `object \| null` | No | Only present if frequency is not 'once' |
| `billing` | `object \| null` | No | — |

> [accordion] test full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   test_code?: string | null,
>   test_name?: string | null,
>   status?: string | null,
>   sender_mailboxes?: {
>     email?: string | null,
>     platform?: string | null,
>     profile_picture?: string | null,
>     full_name?: string | null
>   }[] | null,
>   receiver_mailboxes?: {
>     email?: string | null,
>     type?: string | null
>   }[] | null,
>   created_at?: string | null,
>   expires_at?: string | null
> } | null
> ```

> [accordion] schedule full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   frequency?: string | null,
>   next_run_at?: string | null,
>   status?: string | null
> } | null
> ```

> [accordion] billing full type
>
> ```ts theme={null}
> {
>   amount_charged?: number | null,
>   currency?: string | null,
>   payment_method?: string | null,
>   balance_remaining?: number | null
> } | null
> ```

***

### deleteScheduled

`inboxPlacement.deleteScheduled`

Delete a scheduled inbox placement test.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.inboxkit.api.inboxPlacement.deleteScheduled({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | The scheduled test ID |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `boolean \| null` | No | — |
| `message` | `string \| null` | No | — |

***

### getScheduled

`inboxPlacement.getScheduled`

One scheduled inbox placement test.

**Risk:** `read`

```ts theme={null}
await corsair.inboxkit.api.inboxPlacement.getScheduled({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | The scheduled test ID |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `boolean \| null` | No | — |
| `schedule` | `object \| null` | No | — |

> [accordion] schedule full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   test_name?: string | null,
>   frequency?: string | null,
>   status?: string | null,
>   next_run_at?: string | null,
>   last_run_at?: string | null,
>   total_runs?: number | null,
>   sender_mailbox_ids?: (string | null)[] | null,
>   created_at?: string | null,
>   updated_at?: string | null
> } | null
> ```

***

### getTest

`inboxPlacement.getTest`

Results of one inbox placement test.

**Risk:** `read`

```ts theme={null}
await corsair.inboxkit.api.inboxPlacement.getTest({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `testCode` | `string` | Yes | The test code (e.g., IPT-ABC123XYZ) |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `boolean \| null` | No | — |
| `test` | `object \| null` | No | — |

> [accordion] test full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   test_code?: string | null,
>   test_name?: string | null,
>   status?: string | null,
>   sender_mailboxes?: {
>     email?: string | null,
>     platform?: string | null,
>     mailbox_id?: string | null,
>     profile_picture?: string | null,
>     full_name?: string | null
>   }[] | null,
>   receiver_mailboxes?: {
>     email?: string | null,
>     type?: string | null
>   }[] | null,
>   created_at?: string | null,
>   started_at?: string | null,
>   completed_at?: string | null,
>   expires_at?: string | null,
>   estimated_completion_at?: string | null,
>   summary?: {
>     totalFound?: number | null,
>     totalPrimary?: number | null,
>     totalSpam?: number | null,
>     totalPromotions?: number | null,
>     totalOther?: number | null,
>     totalNotFound?: number | null,
>     overallScore?: number | null,
>     byProvider?: Record<string, any> | null
>   } | null,
>   results?: {
>     receiverEmail?: string | null,
>     receiverType?: string | null,
>     senders?: (Record<string, any> | null)[] | null
>   }[] | null,
>   errors?: {
>     message?: string | null,
>     timestamp?: string | null
>   }[] | null,
>   emails_sent?: number | null
> } | null
> ```

***

### listScheduled

`inboxPlacement.listScheduled`

Scheduled inbox placement tests.

**Risk:** `read`

```ts theme={null}
await corsair.inboxkit.api.inboxPlacement.listScheduled({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `boolean \| null` | No | — |
| `schedules` | `object[] \| null` | No | — |
| `total` | `number \| null` | No | — |

> [accordion] schedules full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   test_name?: string | null,
>   frequency?: string | null,
>   status?: string | null,
>   next_run_at?: string | null,
>   last_run_at?: string | null,
>   total_runs?: number | null,
>   sender_mailbox_ids?: (string | null)[] | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

***

### listTests

`inboxPlacement.listTests`

Inbox placement tests.

**Risk:** `read`

```ts theme={null}
await corsair.inboxkit.api.inboxPlacement.listTests({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `page` | `number` | No | Page number for pagination |
| `limit` | `number` | No | Results per page (max 100) |
| `status` | `string` | No | Filter by status |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `boolean \| null` | No | — |
| `tests` | `object[] \| null` | No | — |
| `pagination` | `object \| null` | No | — |

> [accordion] tests full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   test_code?: string | null,
>   test_name?: string | null,
>   status?: string | null,
>   sender_mailboxes?: {
>     email?: string | null,
>     platform?: string | null,
>     profile_picture?: string | null,
>     full_name?: string | null
>   }[] | null,
>   receiver_mailboxes?: {
>     email?: string | null,
>     type?: string | null
>   }[] | null,
>   created_at?: string | null,
>   started_at?: string | null,
>   completed_at?: string | null,
>   summary?: {
>     totalFound?: number | null,
>     totalPrimary?: number | null,
>     totalSpam?: number | null,
>     totalPromotions?: number | null,
>     totalOther?: number | null,
>     totalNotFound?: number | null,
>     overallScore?: number | null,
>     byProvider?: Record<string, any> | null
>   } | null
> }[] | null
> ```

> [accordion] pagination full type
>
> ```ts theme={null}
> {
>   page?: number | null,
>   limit?: number | null,
>   total?: number | null
> } | null
> ```

***

### pauseScheduled

`inboxPlacement.pauseScheduled`

Pause a scheduled inbox placement test.

**Risk:** `write`

```ts theme={null}
await corsair.inboxkit.api.inboxPlacement.pauseScheduled({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | The scheduled test ID |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `boolean \| null` | No | — |
| `message` | `string \| null` | No | — |

***

### resumeScheduled

`inboxPlacement.resumeScheduled`

CAN SPEND MONEY. Resume a scheduled inbox placement test, so its later runs are charged.

**Risk:** `destructive`

```ts theme={null}
await corsair.inboxkit.api.inboxPlacement.resumeScheduled({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | The scheduled test ID |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `boolean \| null` | No | — |
| `message` | `string \| null` | No | — |
| `next_run_at` | `string \| null` | No | — |

***

## Infra Guard

### acknowledgeAlert

`infraGuard.acknowledgeAlert`

Mark an alert as acknowledged.

**Risk:** `write`

```ts theme={null}
await corsair.inboxkit.api.infraGuard.acknowledgeAlert({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `alert_uid` | `string` | Yes | Alert UID to acknowledge |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | — |
| `message` | `string \| null` | No | — |
| `data` | `object \| null` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   uid?: string | null,
>   status?: string | null,
>   acknowledged_at?: string | null
> } | null
> ```

***

### cancel

`infraGuard.cancel`

Stop InfraGuard monitoring and billing for domains.

**Risk:** `destructive`

```ts theme={null}
await corsair.inboxkit.api.infraGuard.cancel({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `domain_uids` | `string[]` | Yes | Domain UIDs to cancel InfraGuard for |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | — |
| `message` | `string \| null` | No | — |
| `results` | `object \| null` | No | — |
| `summary` | `object \| null` | No | — |

> [accordion] results full type
>
> ```ts theme={null}
> {
>   success?: {
>     domain_uid?: string | null,
>     subscription_uid?: string | null,
>     domain_name?: string | null,
>     action?: string | null
>   }[] | null,
>   failed?: {
>     domain_uid?: string | null,
>     reason?: string | null
>   }[] | null
> } | null
> ```

> [accordion] summary full type
>
> ```ts theme={null}
> {
>   total_requested?: number | null,
>   success_count?: number | null,
>   failed_count?: number | null
> } | null
> ```

***

### dismissActionItem

`infraGuard.dismissActionItem`

Dismiss an action item.

**Risk:** `write`

```ts theme={null}
await corsair.inboxkit.api.infraGuard.dismissActionItem({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `action_item_uid` | `string` | Yes | Action item UID to dismiss |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | — |
| `message` | `string \| null` | No | — |
| `data` | `object \| null` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   uid?: string | null,
>   status?: string | null,
>   dismissed_at?: string | null
> } | null
> ```

***

### enable

`infraGuard.enable`

SPENDS MONEY. Turn on InfraGuard monitoring for domains, billed per domain.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.inboxkit.api.infraGuard.enable({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `domain_uids` | `string[]` | Yes | Domain UIDs to enable InfraGuard for |

Spends money. Billed per domain; see `infraGuard.getPricing`.

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | — |
| `message` | `string \| null` | No | — |
| `results` | `object \| null` | No | — |
| `summary` | `object \| null` | No | — |

> [accordion] results full type
>
> ```ts theme={null}
> {
>   success?: {
>     domain_uid?: string | null,
>     subscription_uid?: string | null,
>     domain_name?: string | null,
>     action?: string | null
>   }[] | null,
>   failed?: {
>     domain_uid?: string | null,
>     reason?: string | null
>   }[] | null
> } | null
> ```

> [accordion] summary full type
>
> ```ts theme={null}
> {
>   total_requested?: number | null,
>   success_count?: number | null,
>   failed_count?: number | null,
>   total_cost?: number | null,
>   price_per_domain?: number | null
> } | null
> ```

***

### get

`infraGuard.get`

The InfraGuard subscription of one domain.

**Risk:** `read`

```ts theme={null}
await corsair.inboxkit.api.infraGuard.get({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `uid` | `string` | Yes | Domain UID |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | — |
| `message` | `string \| null` | No | — |
| `subscription` | `object \| null` | No | — |

> [accordion] subscription full type
>
> ```ts theme={null}
> {
>   uid?: string | null,
>   domain_uid?: string | null,
>   domain_name?: string | null,
>   status?: string | null,
>   blacklist_status?: string | null,
>   dns_watchdog_status?: string | null,
>   bounce_status?: string | null,
>   health_score?: number | null,
>   bounce_rate?: number | null,
>   bounce_trend?: string | null,
>   bounce_thresholds?: {
>     warning?: number | null,
>     critical?: number | null
>   } | null,
>   price_per_month?: number | null,
>   next_billing_date?: string | null,
>   started_at?: string | null,
>   cancelled_at?: string | null,
>   alert_preferences?: {
>     email_notifications?: boolean | null,
>     in_app_notifications?: boolean | null
>   } | null,
>   ipt_enabled?: boolean | null,
>   ipt_receiver_types?: (string | null)[] | null,
>   ipt_test_day?: string | null,
>   ipt_frequency?: string | null,
>   ipt_next_scheduled_run?: string | null,
>   ipt_last_run?: string | null,
>   ipt_total_tests_run?: number | null,
>   latest_blacklist_check?: {
>     uid?: string | null,
>     status?: string | null,
>     summary?: Record<string, any> | null,
>     checked_at?: string | null
>   } | null,
>   latest_dns_check?: {
>     uid?: string | null,
>     status?: string | null,
>     expected_ns?: (string | null)[] | null,
>     actual_ns?: (string | null)[] | null,
>     checked_at?: string | null
>   } | null,
>   latest_bounce_check?: {
>     bounce_rate?: number | null,
>     total_emails?: number | null,
>     bounced_emails?: number | null,
>     status?: string | null,
>     trend?: string | null,
>     checked_at?: string | null
>   } | null,
>   domain?: {
>     nameservers?: (string | null)[] | null
>   } | null,
>   created_at?: string | null
> } | null
> ```

***

### getActionItemStats

`infraGuard.getActionItemStats`

Action item counts for the workspace.

**Risk:** `read`

```ts theme={null}
await corsair.inboxkit.api.infraGuard.getActionItemStats({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | — |
| `message` | `string \| null` | No | — |
| `stats` | `object \| null` | No | — |

> [accordion] stats full type
>
> ```ts theme={null}
> {
>   total?: number | null,
>   critical?: number | null,
>   warning?: number | null,
>   advisory?: number | null,
>   pending?: number | null,
>   resolved?: number | null
> } | null
> ```

***

### getBlacklistHistory

`infraGuard.getBlacklistHistory`

Blacklist checks of one domain over time.

**Risk:** `read`

```ts theme={null}
await corsair.inboxkit.api.infraGuard.getBlacklistHistory({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `uid` | `string` | Yes | Domain UID |
| `page` | `number` | No | Page number |
| `limit` | `number` | No | Items per page |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | — |
| `message` | `string \| null` | No | — |
| `data` | `object[] \| null` | No | — |
| `total` | `number \| null` | No | — |
| `pages` | `number \| null` | No | — |
| `current_page` | `number \| null` | No | — |
| `limit` | `number \| null` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   uid?: string | null,
>   test_code?: string | null,
>   status?: string | null,
>   summary?: Record<string, any> | null,
>   results?: {
>     value?: string | null,
>     type?: string | null,
>     domain?: string | null,
>     overall_status?: string | null,
>     summary?: Record<string, any> | null,
>     findings?: any[] | null,
>     checked_at?: string | null
>   }[] | null,
>   checked_at?: string | null,
>   created_at?: string | null
> }[] | null
> ```

***

### getBounceHistory

`infraGuard.getBounceHistory`

Bounce checks of one domain over time.

**Risk:** `read`

```ts theme={null}
await corsair.inboxkit.api.infraGuard.getBounceHistory({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `uid` | `string` | Yes | Domain UID |
| `page` | `number` | No | Page number |
| `limit` | `number` | No | Items per page |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | — |
| `message` | `string \| null` | No | — |
| `data` | `object[] \| null` | No | — |
| `total` | `number \| null` | No | — |
| `pages` | `number \| null` | No | — |
| `current_page` | `number \| null` | No | — |
| `limit` | `number \| null` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   bounce_rate?: number | null,
>   total_emails?: number | null,
>   bounced_emails?: number | null,
>   hard_bounces?: number | null,
>   soft_bounces?: number | null,
>   status?: string | null,
>   trend?: string | null,
>   period_start?: string | null,
>   period_end?: string | null,
>   checked_at?: string | null,
>   created_at?: string | null
> }[] | null
> ```

***

### getBounceMetrics

`infraGuard.getBounceMetrics`

Current bounce metrics of one domain.

**Risk:** `read`

```ts theme={null}
await corsair.inboxkit.api.infraGuard.getBounceMetrics({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `uid` | `string` | Yes | Domain UID |
| `period_days` | `number` | No | Number of days to analyze |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | — |
| `message` | `string \| null` | No | — |
| `data` | `object \| null` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   bounceRate?: number | null,
>   totalEmails?: number | null,
>   bouncedEmails?: number | null,
>   hardBounces?: number | null,
>   softBounces?: number | null,
>   status?: string | null,
>   thresholds?: {
>     warning?: number | null,
>     critical?: number | null
>   } | null
> } | null
> ```

***

### getDnsHistory

`infraGuard.getDnsHistory`

DNS checks of one domain over time.

**Risk:** `read`

```ts theme={null}
await corsair.inboxkit.api.infraGuard.getDnsHistory({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `uid` | `string` | Yes | Domain UID |
| `page` | `number` | No | Page number |
| `limit` | `number` | No | Items per page |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | — |
| `message` | `string \| null` | No | — |
| `data` | `object[] \| null` | No | — |
| `total` | `number \| null` | No | — |
| `pages` | `number \| null` | No | — |
| `current_page` | `number \| null` | No | — |
| `limit` | `number \| null` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   uid?: string | null,
>   status?: string | null,
>   expected_ns?: (string | null)[] | null,
>   actual_ns?: (string | null)[] | null,
>   added_ns?: (string | null)[] | null,
>   removed_ns?: (string | null)[] | null,
>   error_message?: string | null,
>   checked_at?: string | null,
>   created_at?: string | null
> }[] | null
> ```

***

### getPricing

`infraGuard.getPricing`

InfraGuard pricing.

**Risk:** `read`

```ts theme={null}
await corsair.inboxkit.api.infraGuard.getPricing({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | — |
| `price_per_domain` | `number \| null` | No | Price per domain per month |
| `currency` | `string \| null` | No | — |
| `billing_cycle` | `string \| null` | No | — |
| `active_subscriptions` | `number \| null` | No | Number of active subscriptions |
| `pending_subscriptions` | `number \| null` | No | Number of pending subscriptions |
| `total_subscriptions` | `number \| null` | No | Total non-cancelled subscriptions |
| `monthly_cost` | `number \| null` | No | Current monthly cost for active subscriptions |

***

### getStats

`infraGuard.getStats`

InfraGuard statistics for the workspace.

**Risk:** `read`

```ts theme={null}
await corsair.inboxkit.api.infraGuard.getStats({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | — |
| `message` | `string \| null` | No | — |
| `stats` | `object \| null` | No | — |

> [accordion] stats full type
>
> ```ts theme={null}
> {
>   protected_count?: number | null,
>   active_count?: number | null,
>   past_due_count?: number | null,
>   monthly_total?: number | null,
>   healthy_count?: number | null,
>   warning_count?: number | null,
>   critical_count?: number | null,
>   ipt_enabled_count?: number | null,
>   total_ipt_tests?: number | null,
>   last_check_time?: string | null,
>   active_alerts?: number | null,
>   price_per_domain?: number | null
> } | null
> ```

***

### list

`infraGuard.list`

Domains protected by InfraGuard, with their health.

**Risk:** `read`

```ts theme={null}
await corsair.inboxkit.api.infraGuard.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `page` | `number` | No | Page number. Default 1. |
| `limit` | `number` | No | Items per page. Default 10. |
| `status` | `active \| pending_activation \| cancelled \| past_due \| paused` | No | Filter by subscription status |
| `include_cancelled` | `boolean` | No | Include cancelled subscriptions in results. Default false. |
| `search` | `string` | No | Search by domain name (partial match, case-insensitive) |
| `health` | `healthy \| warning \| critical \| unknown` | No | Filter by overall health status |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | — |
| `message` | `string \| null` | No | — |
| `subscriptions` | `object[] \| null` | No | — |
| `total` | `number \| null` | No | — |
| `pages` | `number \| null` | No | — |
| `current_page` | `number \| null` | No | — |
| `limit` | `number \| null` | No | — |

> [accordion] subscriptions full type
>
> ```ts theme={null}
> {
>   uid?: string | null,
>   domain_uid?: string | null,
>   domain_name?: string | null,
>   status?: string | null,
>   blacklist_status?: string | null,
>   dns_watchdog_status?: string | null,
>   bounce_status?: string | null,
>   health_score?: number | null,
>   bounce_rate?: number | null,
>   bounce_trend?: string | null,
>   price_per_month?: number | null,
>   started_at?: string | null,
>   next_billing_date?: string | null,
>   ipt_enabled?: boolean | null,
>   ipt_frequency?: string | null,
>   ipt_test_day?: string | null,
>   ipt_next_scheduled_run?: string | null,
>   ipt_total_tests_run?: number | null,
>   last_blacklist_check?: string | null,
>   last_dns_watchdog_check?: string | null,
>   last_bounce_check?: string | null,
>   created_at?: string | null
> }[] | null
> ```

***

### listActionItems

`infraGuard.listActionItems`

InfraGuard action items, filtered by domain, category, severity or status.

**Risk:** `read`

```ts theme={null}
await corsair.inboxkit.api.infraGuard.listActionItems({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `page` | `number` | No | Default 1. |
| `limit` | `number` | No | Default 20. |
| `domain_uid` | `string` | No | Filter by domain UID |
| `category` | `bounce_rate \| inbox_placement \| blacklist \| dns_health \| mailbox \| domain \| trend` | No | Filter by category |
| `severity` | `critical \| warning \| advisory` | No | Filter by severity |
| `status` | `pending \| in_progress \| resolved \| dismissed \| all` | No | Filter by status. 'pending' includes both pending and in\_progress. Default "pending". |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | — |
| `message` | `string \| null` | No | — |
| `action_items` | `object[] \| null` | No | — |
| `total` | `number \| null` | No | — |
| `pages` | `number \| null` | No | — |
| `current_page` | `number \| null` | No | — |
| `limit` | `number \| null` | No | — |

> [accordion] action\_items full type
>
> ```ts theme={null}
> {
>   uid?: string | null,
>   domain_name?: string | null,
>   category?: string | null,
>   severity?: string | null,
>   title?: string | null,
>   description?: string | null,
>   steps?: {
>     step?: number | null,
>     description?: string | null,
>     completed?: boolean | null
>   }[] | null,
>   status?: string | null,
>   trigger_rule?: string | null,
>   metadata?: Record<string, any> | null,
>   created_at?: string | null,
>   resolved_at?: string | null,
>   dismissed_at?: string | null
> }[] | null
> ```

***

### listAlerts

`infraGuard.listAlerts`

InfraGuard alerts, filtered by domain, status, severity or type.

**Risk:** `read`

```ts theme={null}
await corsair.inboxkit.api.infraGuard.listAlerts({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `page` | `number` | No | Default 1. |
| `limit` | `number` | No | Default 20. |
| `domain_uid` | `string` | No | Filter alerts by domain UID |
| `status` | `active \| acknowledged \| resolved \| dismissed \| all` | No | Filter by status. 'active' includes both active and acknowledged alerts. Default "active". |
| `severity` | `info \| warning \| critical` | No | Filter by severity |
| `alert_type` | `blacklist_detected \| dns_change_detected \| bounce_rate_warning \| bounce_rate_critical \| bounce_rate_recovered \| check_failed \| payment_failed \| ipt_failed \| ipt_low_score` | No | Filter by alert type |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | — |
| `message` | `string \| null` | No | — |
| `alerts` | `object[] \| null` | No | — |
| `total` | `number \| null` | No | — |
| `pages` | `number \| null` | No | — |
| `current_page` | `number \| null` | No | — |
| `limit` | `number \| null` | No | — |

> [accordion] alerts full type
>
> ```ts theme={null}
> {
>   uid?: string | null,
>   domain_name?: string | null,
>   alert_type?: string | null,
>   severity?: string | null,
>   title?: string | null,
>   message?: string | null,
>   status?: string | null,
>   metadata?: Record<string, any> | null,
>   created_at?: string | null,
>   acknowledged_at?: string | null,
>   resolved_at?: string | null,
>   resolution_note?: string | null
> }[] | null
> ```

***

### resolveActionItem

`infraGuard.resolveActionItem`

Mark an action item as resolved.

**Risk:** `write`

```ts theme={null}
await corsair.inboxkit.api.infraGuard.resolveActionItem({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `action_item_uid` | `string` | Yes | Action item UID to resolve |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | — |
| `message` | `string \| null` | No | — |
| `data` | `object \| null` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   uid?: string | null,
>   status?: string | null,
>   resolved_at?: string | null
> } | null
> ```

***

### resolveAlert

`infraGuard.resolveAlert`

Mark an alert as resolved, with an optional note.

**Risk:** `write`

```ts theme={null}
await corsair.inboxkit.api.infraGuard.resolveAlert({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `alert_uid` | `string` | Yes | Alert UID to resolve |
| `note` | `string` | No | Optional resolution note explaining what was done |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | — |
| `message` | `string \| null` | No | — |
| `data` | `object \| null` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   uid?: string | null,
>   status?: string | null,
>   resolved_at?: string | null,
>   resolution_note?: string | null
> } | null
> ```

***

### triggerCheck

`infraGuard.triggerCheck`

Run an InfraGuard check on a domain now.

**Risk:** `write`

```ts theme={null}
await corsair.inboxkit.api.infraGuard.triggerCheck({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `domain_uid` | `string` | Yes | Domain UID |
| `check_type` | `all \| blacklist \| dns \| bounce` | No | Type of check to trigger. Default "all". |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | — |
| `message` | `string \| null` | No | — |
| `data` | `object \| null` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   domain_uid?: string | null,
>   domain_name?: string | null,
>   check_type?: string | null
> } | null
> ```

***

### updateSettings

`infraGuard.updateSettings`

Change a domain's alert preferences, bounce thresholds and scheduled placement tests.

**Risk:** `write`

```ts theme={null}
await corsair.inboxkit.api.infraGuard.updateSettings({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `domain_uid` | `string` | Yes | Domain UID |
| `alert_preferences` | `object` | No | Notification settings |
| `bounce_thresholds` | `object` | No | Bounce rate alert thresholds (warning must be less than critical) |
| `ipt_enabled` | `boolean` | No | Enable or disable inbox placement testing |
| `ipt_receiver_types` | `(personal_gmail \| personal_outlook \| business_gmail \| business_outlook)[]` | No | Types of test inboxes to send to |
| `ipt_test_day` | `sunday \| monday \| tuesday \| wednesday \| thursday \| friday \| saturday` | No | Day of the week to run IPT tests |
| `ipt_frequency` | `weekly \| biweekly` | No | How often to run IPT tests |

> [accordion] alert\_preferences full type
>
> ```ts theme={null}
> {
>   email_notifications?: boolean,
>   in_app_notifications?: boolean
> }
> ```

> [accordion] bounce\_thresholds full type
>
> ```ts theme={null}
> {
>   warning?: number,
>   critical?: number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | — |
| `message` | `string \| null` | No | — |
| `data` | `object \| null` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   uid?: string | null,
>   domain_uid?: string | null,
>   alert_preferences?: {
>     email_notifications?: boolean | null,
>     in_app_notifications?: boolean | null
>   } | null,
>   bounce_thresholds?: {
>     warning?: number | null,
>     critical?: number | null
>   } | null,
>   ipt_enabled?: boolean | null,
>   ipt_receiver_types?: (string | null)[] | null,
>   ipt_test_day?: string | null,
>   ipt_frequency?: string | null,
>   ipt_next_scheduled_run?: string | null
> } | null
> ```

***

## Mailboxes

### addSignature

`mailboxes.addSignature`

Add or replace the signature on several mailboxes.

**Risk:** `write`

```ts theme={null}
await corsair.inboxkit.api.mailboxes.addSignature({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `mailbox_uids` | `string[]` | Yes | Array of mailbox UIDs to add/update signature for |
| `signature` | `string` | Yes | HTML signature string to apply to mailboxes |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | — |
| `message` | `string \| null` | No | — |
| `results` | `object \| null` | No | — |
| `summary` | `object \| null` | No | — |

> [accordion] results full type
>
> ```ts theme={null}
> {
>   updated?: (string | null)[] | null,
>   created?: (string | null)[] | null,
>   failed?: {
>     uid?: string | null,
>     reason?: string | null
>   }[] | null
> } | null
> ```

> [accordion] summary full type
>
> ```ts theme={null}
> {
>   total_requested?: number | null,
>   updated_count?: number | null,
>   created_count?: number | null,
>   failed_count?: number | null
> } | null
> ```

***

### buy

`mailboxes.buy`

SPENDS MONEY. Buy mailboxes on domains already in the workspace, from subscription slots, the wallet, or (Azure) always the wallet. Never repeat after a timeout without checking mailboxes.list first.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.inboxkit.api.mailboxes.buy({ mailboxes: [{ first_name: 'Jane', last_name: 'Doe', domain_name: 'example.com', username: 'jane', platform: 'GOOGLE' }] });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `mailboxes` | `object[]` | Yes | Mailbox configurations |
| `use_wallet_balance` | `boolean` | No | Controls the payment method for this purchase. When set to false (default), mailboxes are allocated from your subscription's available mailbox slots at no additional credit cost. |
| `warmup_addon_enabled` | `boolean` | No | Adds warmup to every mailbox in this request. Default false. |

Spends money, from subscription slots by default, or the wallet with `use_wallet_balance: true`. Azure always uses the wallet. Send all mailboxes in one call, and never repeat after a timeout without checking `mailboxes.list`.

> [accordion] mailboxes full type
>
> ```ts theme={null}
> {
>   first_name: string,
>   last_name: string,
>   profile_picture?: string | null,
>   username: string,
>   platform: GOOGLE | MICROSOFT | AZURE,
>   domain_name: string
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | Whether the request encountered an error. |
| `message` | `string \| null` | No | A human-readable message describing the result. |
| `mailboxes` | `object[] \| null` | No | List of mailboxes that have been scheduled for provisioning. |
| `warmup_addon` | `object \| null` | No | Warmup added with this purchase. Returned only when warmup\_addon\_enabled was true. |

> [accordion] mailboxes full type
>
> ```ts theme={null}
> {
>   uid?: string | null,
>   domain_name?: string | null,
>   first_name?: string | null,
>   last_name?: string | null,
>   username?: string | null,
>   platform?: string | null,
>   status?: string | null,
>   renewal_date?: string | null,
>   renewal_cycle?: string | null,
>   createdAt?: string | null,
>   updatedAt?: string | null
> }[] | null
> ```

> [accordion] warmup\_addon full type
>
> ```ts theme={null}
> {
>   enabled?: boolean | null,
>   status?: string | null,
>   subscriptions_created?: number | null,
>   skipped?: number | null,
>   price_per_mailbox?: number | null,
>   total_cost?: number | null,
>   message?: string | null
> } | null
> ```

***

### cancel

`mailboxes.cancel`

Schedule mailboxes for cancellation. Billing stops at the next renewal.

**Risk:** `destructive`

```ts theme={null}
await corsair.inboxkit.api.mailboxes.cancel({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `uids` | `string[]` | Yes | Mailbox UIDs to cancel |
| `domain_uids` | `string[]` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | — |
| `message` | `string \| null` | No | — |

***

### changePassword

`mailboxes.changePassword`

Change a mailbox's password. Anything signed in with the old password, such as a sequencer, stops working.

**Risk:** `destructive`

```ts theme={null}
await corsair.inboxkit.api.mailboxes.changePassword({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `uid` | `string` | No | Mailbox UID |
| `password` | `string` | No | New password |

Anything signed in with the old password, such as a sequencer, stops working until it gets the new one.

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | — |
| `message` | `string \| null` | No | — |

***

### changeUsername

`mailboxes.changeUsername`

Change a mailbox's username, which changes its email address.

**Risk:** `destructive`

```ts theme={null}
await corsair.inboxkit.api.mailboxes.changeUsername({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `uid` | `string` | No | Mailbox UID |
| `username` | `string` | No | New username |

Changes the mailbox's email address, which can disturb warmup and sequencers using it.

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | — |
| `message` | `string \| null` | No | — |

***

### checkAvailability

`mailboxes.checkAvailability`

Whether a username is free on a domain. Takes no workspace.

**Risk:** `read`

```ts theme={null}
await corsair.inboxkit.api.mailboxes.checkAvailability({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `username` | `string` | Yes | Username to check availability for |
| `domain` | `string` | Yes | Domain to check username availability for |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | — |
| `message` | `string \| null` | No | — |
| `available` | `boolean \| null` | No | Whether the username is available |

***

### deleteSignature

`mailboxes.deleteSignature`

Delete the signature from several mailboxes.

**Risk:** `write`

```ts theme={null}
await corsair.inboxkit.api.mailboxes.deleteSignature({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `mailbox_uids` | `string[]` | Yes | Array of mailbox UIDs to delete signatures for |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | — |
| `message` | `string \| null` | No | — |
| `results` | `object \| null` | No | — |
| `summary` | `object \| null` | No | — |

> [accordion] results full type
>
> ```ts theme={null}
> {
>   deleted?: (string | null)[] | null,
>   not_found_signature?: (string | null)[] | null,
>   failed?: {
>     uid?: string | null,
>     reason?: string | null
>   }[] | null
> } | null
> ```

> [accordion] summary full type
>
> ```ts theme={null}
> {
>   total_requested?: number | null,
>   deleted_count?: number | null,
>   not_found_signature_count?: number | null,
>   failed_count?: number | null
> } | null
> ```

***

### generateTotp

`mailboxes.generateTotp`

A current two-factor code for a mailbox. Keep the result out of logs and shared chats.

**Risk:** `destructive`

```ts theme={null}
await corsair.inboxkit.api.mailboxes.generateTotp({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `uid` | `string` | Yes | Mailbox UID |

Returns a working two-factor code.

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | — |
| `message` | `string \| null` | No | — |
| `totp` | `string \| null` | No | Generated TOTP code |
| `expires_at` | `number \| null` | No | Timestamp |

***

### get

`mailboxes.get`

One mailbox by uid.

**Risk:** `read`

```ts theme={null}
await corsair.inboxkit.api.mailboxes.get({ uid: '<mailbox uid>' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `uid` | `string` | Yes | Mailbox UID |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | — |
| `message` | `string \| null` | No | — |
| `mailbox` | `object \| null` | No | — |

> [accordion] mailbox full type
>
> ```ts theme={null}
> {
>   uid?: string | null,
>   first_name?: string | null,
>   last_name?: string | null,
>   username?: string | null,
>   platform?: string | null,
>   status?: string | null,
>   domain?: string | null,
>   profile_picture?: string | null,
>   sequencers?: {
>     name?: string | null,
>     status?: string | null
>   }[] | null,
>   signature?: string | null,
>   mailbox_reactivation_status?: string | null,
>   domain_name?: string | null,
>   forwarding_email?: string | null,
>   is_admin?: boolean | null,
>   tags?: (string | null)[] | null,
>   mailbox_update_status?: string | null,
>   sequencer_status?: string | null,
>   dns_propagation_status?: string | null,
>   renewal_date?: string | null,
>   renewal_cycle?: string | null,
>   renewal_status?: string | null,
>   createdAt?: string | null,
>   updatedAt?: string | null
> } | null
> ```

***

### getFailureReason

`mailboxes.getFailureReason`

Why a mailbox failed to set up.

**Risk:** `read`

```ts theme={null}
await corsair.inboxkit.api.mailboxes.getFailureReason({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `uid` | `string` | Yes | Unique identifier of the mailbox |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | Indicates if there was an error |
| `message` | `string \| null` | No | Human-readable response message |
| `data` | `object \| null` | No | Failure reason details |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   uid?: string | null,
>   email?: string | null,
>   status?: string | null,
>   is_failed?: boolean | null,
>   failure_message?: string | null,
>   failure_code?: string | null,
>   action_required?: boolean | null,
>   internal_status?: string | null,
>   original_reason?: string | null,
>   inherited_from_admin?: boolean | null
> } | null
> ```

***

### getResetupStatus

`mailboxes.getResetupStatus`

The most recent resetup job for a domain.

**Risk:** `read`

```ts theme={null}
await corsair.inboxkit.api.mailboxes.getResetupStatus({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `domain_uid` | `string` | No | Domain UID. Either `domain_uid` or `domain_name` is required. |
| `domain_name` | `string` | No | Domain name. Used when domain\_uid is not supplied. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | — |
| `resetup` | `object \| null` | No | Most recent resetup job for the domain. `null` when no resetup has ever been scheduled for it. Sensitive credential fields are stripped from the response. |

> [accordion] resetup full type
>
> ```ts theme={null}
> {
>   uid?: string | null,
>   domain?: string | null,
>   domain_name?: string | null,
>   team?: string | null,
>   workspace?: string | null,
>   status?: string | null,
>   createdAt?: string | null,
>   updatedAt?: string | null
> } | null
> ```

***

### getStatus

`mailboxes.getStatus`

Status of mailboxes by uid or domain.

**Risk:** `read`

```ts theme={null}
await corsair.inboxkit.api.mailboxes.getStatus({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `uids` | `string[]` | No | Mailbox UIDs to check status for |
| `domain_uids` | `string[]` | No | Check mailbox status by domain uids |
| `page` | `number` | No | — |
| `limit` | `number` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | — |
| `message` | `string \| null` | No | — |
| `mailboxes` | `object[] \| null` | No | Mailboxes with current status |
| `page` | `number \| null` | No | — |
| `limit` | `number \| null` | No | — |
| `total` | `number \| null` | No | — |

> [accordion] mailboxes full type
>
> ```ts theme={null}
> {
>   uid?: string | null,
>   status?: string | null,
>   first_name?: string | null,
>   last_name?: string | null,
>   username?: string | null,
>   platform?: string | null,
>   mailbox_reactivation_status?: string | null,
>   mailbox_update_status?: string | null,
>   sequencer_status?: string | null,
>   dns_propagation_status?: string | null
> }[] | null
> ```

***

### list

`mailboxes.list`

The workspace's mailboxes. Paginated, with filters by keyword, domain, platform, status and uid. Never includes passwords.

**Risk:** `read`

```ts theme={null}
await corsair.inboxkit.api.mailboxes.list({ limit: 50, status: 'active' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `page` | `number` | No | Default 1. |
| `limit` | `number` | No | Default 10. |
| `keyword` | `string` | No | — |
| `domain` | `string` | No | — |
| `domain_uid` | `string` | No | — |
| `platform` | `string` | No | — |
| `status` | `active \| inactive \| scheduled \| scheduled_for_cancellation \| cancelled \| pending \| processing \| waiting_for_dns_propagation \| failed \| deleted \| suspended \| archived \| waiting_for_activation_email \| activation_email_received \| configuring_workspace \| configuring_dns \| configuring_dkim \| configuring_auth \| finalizing_setup \| renewal_failed` | No | — |
| `uids` | `string[]` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | — |
| `message` | `string \| null` | No | — |
| `mailboxes` | `object[] \| null` | No | — |
| `total` | `number \| null` | No | Total number of mailboxes |
| `pages` | `number \| null` | No | Total number of pages |
| `current_page` | `number \| null` | No | Current page number |
| `limit` | `number \| null` | No | Items per page |

> [accordion] mailboxes full type
>
> ```ts theme={null}
> {
>   uid?: string | null,
>   domain_name?: string | null,
>   forwarding_email?: string | null,
>   first_name?: string | null,
>   last_name?: string | null,
>   profile_picture?: string | null,
>   username?: string | null,
>   platform?: string | null,
>   status?: string | null,
>   is_admin?: boolean | null,
>   tags?: (string | null)[] | null,
>   sequencers?: (Record<string, any> | null)[] | null,
>   createdAt?: string | null,
>   updatedAt?: string | null,
>   renewal_date?: string | null,
>   mailbox_update_status?: string | null,
>   sequencer_status?: string | null,
>   dns_propagation_status?: string | null,
>   renewal_cycle?: string | null,
>   renewal_status?: string | null,
>   mailbox_reactivation_status?: string | null,
>   prepaid_until?: string | null
> }[] | null
> ```

***

### reactivate

`mailboxes.reactivate`

CAN SPEND MONEY. Reactivate Microsoft 365 and Azure mailboxes scheduled for cancellation or whose renewal failed. With allow\_charge a re-purchase may be charged to the wallet.

**Risk:** `destructive`

```ts theme={null}
await corsair.inboxkit.api.mailboxes.reactivate({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `uids` | `string[]` | Yes | Mailbox UIDs to reactivate (max 1000) |
| `allow_charge` | `boolean` | No | Set to `true` to approve an automatic re-purchase when a mailbox's license has expired. Defaults to `false`: those mailboxes wait for your approval instead of being charged. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | — |
| `message` | `string \| null` | No | — |
| `batch_id` | `string \| null` | No | Identifier for this request |
| `results` | `object \| null` | No | — |
| `allow_charge` | `boolean \| null` | No | Whether automatic re-purchase was approved for this request |

> [accordion] results full type
>
> ```ts theme={null}
> {
>   success?: {
>     uid?: string | null,
>     action?: string | null
>   }[] | null,
>   failed?: {
>     uid?: string | null,
>     error?: string | null
>   }[] | null
> } | null
> ```

***

### reactivateRebuy

`mailboxes.reactivateRebuy`

SPENDS MONEY. Approve the charge for Microsoft 365 and Azure mailboxes paused at needs\_rebuy.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.inboxkit.api.mailboxes.reactivateRebuy({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `uids` | `string[]` | Yes | UIDs of mailboxes with `mailbox_reactivation_status: needs_rebuy` (max 1000) |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | — |
| `message` | `string \| null` | No | — |
| `charged` | `number \| null` | No | Credits charged to your wallet |
| `batch_id` | `string \| null` | No | Identifier for this request |
| `results` | `object \| null` | No | — |

> [accordion] results full type
>
> ```ts theme={null}
> {
>   success?: {
>     uid?: string | null,
>     action?: string | null
>   }[] | null,
>   failed?: {
>     uid?: string | null,
>     error?: string | null
>   }[] | null
> } | null
> ```

***

### resetup

`mailboxes.resetup`

Schedule a renewal-resetup for Google Workspace mailboxes. Mail delivery on the domain is paused for up to 24 hours while it runs.

**Risk:** `destructive`

```ts theme={null}
await corsair.inboxkit.api.mailboxes.resetup({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `mailbox_uids` | `string[]` | Yes | Mailbox UIDs to resetup (1-2000). The list may span multiple domains; the endpoint groups by domain and creates one resetup job per domain. |
| `domain_uid` | `string` | No | Optional. When supplied, the entire selection must belong to this domain — a multi-domain selection paired with domain\_uid is rejected with 400. |

Mail delivery on the domain is paused for up to 24 hours while this runs. It starts 5 days before the admin mailbox's renewal date, or right away if that's closer.

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | — |
| `message` | `string \| null` | No | Top-level status. One of: 'Resetup scheduled', 'Some resetups scheduled; some domains were skipped', 'No resetups could be scheduled'. |
| `results` | `object[] \| null` | No | Per-domain outcome. The request groups mailbox\_uids by domain and creates one resetup job per domain — each domain is validated independently, so the array can… |

> [accordion] results full type
>
> ```ts theme={null}
> {
>   error?: boolean | null,
>   domain_uid?: string | null,
>   domain_name?: string | null,
>   resetup_uid?: string | null,
>   mailbox_uids_to_reprovision?: (string | null)[] | null,
>   mailbox_uids_to_backup?: (string | null)[] | null,
>   scheduled_run_at?: string | null,
>   deferred?: boolean | null,
>   message?: string | null
> }[] | null
> ```

***

### showCredentials

`mailboxes.showCredentials`

A mailbox's plaintext password, secret and app password, by uid or email. Keep the result out of logs and shared chats.

**Risk:** `destructive`

```ts theme={null}
await corsair.inboxkit.api.mailboxes.showCredentials({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `uid` | `string` | No | Mailbox UID |
| `email` | `string` | No | — |

Returns the plaintext password, 2FA secret and app password. The call needs one of `uid` or `email`.

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | — |
| `message` | `string \| null` | No | — |
| `password` | `string \| null` | No | Mailbox password |
| `secret` | `string \| null` | No | Mailbox secret |
| `app_password` | `string \| null` | No | App-specific password |

***

### uncancel

`mailboxes.uncancel`

CAN SPEND MONEY. Undo a scheduled cancellation for Google Workspace mailboxes within the 10-day recovery window, so billing continues.

**Risk:** `destructive`

```ts theme={null}
await corsair.inboxkit.api.mailboxes.uncancel({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `uids` | `string[]` | Yes | Mailbox UIDs to uncancel (max 1000) |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | — |
| `message` | `string \| null` | No | — |
| `results` | `object \| null` | No | — |

> [accordion] results full type
>
> ```ts theme={null}
> {
>   success?: {
>     uid?: string | null,
>     action?: string | null
>   }[] | null,
>   failed?: {
>     uid?: string | null,
>     error?: string | null
>   }[] | null
> } | null
> ```

***

### update

`mailboxes.update`

Update a mailbox's first or last name, profile picture or tags. To change its address, use mailboxes.changeUsername.

**Risk:** `write`

```ts theme={null}
await corsair.inboxkit.api.mailboxes.update({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `uid` | `string` | Yes | Mailbox UID |
| `first_name` | `string` | No | First name |
| `last_name` | `string` | No | Last name |
| `profile_picture` | `string` | No | Profile picture URL |
| `tags` | `string[]` | No | Tags for the mailbox |

InboxKit's API also takes `user_name` here. The plugin leaves it out because it can change a live mailbox's address; use `mailboxes.changeUsername`.

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | — |
| `message` | `string \| null` | No | — |

***

### updateProfilePicture

`mailboxes.updateProfilePicture`

Set a mailbox's profile picture from a URL.

**Risk:** `write`

```ts theme={null}
await corsair.inboxkit.api.mailboxes.updateProfilePicture({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `uid` | `string` | Yes | Mailbox UID |
| `profile_picture` | `string` | Yes | Profile picture URL |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | — |
| `message` | `string \| null` | No | — |

***

## Orders

### place

`orders.place`

SPENDS MONEY. Order new domains and their mailboxes in one request, charged to the wallet. Never repeat after a timeout without checking domains.list first.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.inboxkit.api.orders.place({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `contact_details` | `object` | No | Top-level contact details for domain registration. If provided and valid, used for all domains unless overridden. |
| `domains` | `object[]` | Yes | List of domains to register and provision mailboxes for. |
| `warmup_addon_enabled` | `boolean` | No | Adds warmup to every mailbox in this order. The first month of warmup for each mailbox is charged to your wallet when the order is placed, at your warmup price (see Get Warmup Pricing). Default false. |

Spends money, charged to the wallet: the order and the first month of any warmup. If the wallet can't cover both, the order isn't placed. Never repeat after a timeout without checking `domains.list`.

> [accordion] contact\_details full type
>
> ```ts theme={null}
> {
>   first_name: string,
>   last_name: string,
>   email: string,
>   phone: string,
>   organization?: string,
>   address_line1: string,
>   address_line2?: string,
>   city: string,
>   state: string,
>   country: string,
>   postal_code: string
> }
> ```

> [accordion] domains full type
>
> ```ts theme={null}
> {
>   name: string,
>   redirect_url: string,
>   registration_years?: number,
>   contact_details?: {
>     first_name: string,
>     last_name: string,
>     email: string,
>     phone: string,
>     organization?: string,
>     address_line1: string,
>     address_line2?: string,
>     city: string,
>     state: string,
>     country: string,
>     postal_code: string
>   },
>   mailboxes: {
>     email: string,
>     first_name: string,
>     last_name: string,
>     platform?: GOOGLE | MICROSOFT | AZURE,
>     sequencer_uid?: string,
>     profile_pic_url?: string
>   }[],
>   consent_screen_url?: string
> }[]
> ```

**Output:** *empty object*

***

## Prewarm

### buy

`prewarm.buy`

SPENDS MONEY. Buy prewarmed domains with every active mailbox on them, charged to the wallet when the order is placed. Never repeat after a timeout without checking first.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.inboxkit.api.prewarm.buy({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `domains` | `object[]` | Yes | The domains to buy, at least one. |
| `sequencer_uid` | `string` | No | Connect the mailboxes to this sequencer after the handover. |
| `keep_warming` | `boolean` | No | Keep warming the mailboxes for up to 12 weeks after the handover. Defaults to `true`. |

Spends money. The price is charged to the wallet when the order is placed, and the handover runs in the background; follow it with `prewarm.getOrderStatus`. Never repeat after a timeout without checking.

> [accordion] domains full type
>
> ```ts theme={null}
> {
>   domain_id?: string,
>   domain_name?: string,
>   consent_screen_url?: string,
>   domain_redirect_url?: string,
>   mailboxes?: {
>     mailbox_id?: string,
>     username?: string,
>     email?: string,
>     new_username?: string,
>     first_name?: string,
>     new_first_name?: string,
>     last_name?: string,
>     new_last_name?: string,
>     profile_picture?: string,
>     new_profile_picture?: string
>   }[]
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | — |
| `message` | `string \| null` | No | What happened. |
| `data` | `object \| null` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   order_uid?: string | null,
>   order_id?: string | null,
>   status?: string | null,
>   total_domains?: number | null,
>   total_mailboxes?: number | null,
>   total_price?: number | null,
>   domains?: {
>     domain_id?: string | null,
>     domain_name?: string | null,
>     mailboxes_count?: number | null,
>     mailbox_ids?: (string | null)[] | null,
>     consent_screen_url?: string | null,
>     domain_redirect_url?: string | null
>   }[] | null,
>   sequencer_uid?: string | null,
>   buyer?: {
>     team_uid?: string | null,
>     workspace_uid?: string | null
>   } | null
> } | null
> ```

***

### checkAvailability

`prewarm.checkAvailability`

Whether prewarmed domains are still for sale.

**Risk:** `read`

```ts theme={null}
await corsair.inboxkit.api.prewarm.checkAvailability({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `domains` | `string[]` | Yes | Array of domain names to check availability |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | Always false for successful responses |
| `total` | `number \| null` | No | Total number of domains checked |
| `available` | `number \| null` | No | Number of domains available for purchase |
| `unavailable` | `number \| null` | No | Number of domains not available for purchase |
| `breakdown` | `object \| null` | No | Breakdown of unavailability reasons |
| `domains` | `object[] \| null` | No | Detailed availability status for each domain |

> [accordion] breakdown full type
>
> ```ts theme={null}
> {
>   not_in_inventory?: number | null,
>   already_ordered?: number | null
> } | null
> ```

> [accordion] domains full type
>
> ```ts theme={null}
> {
>   domain?: string | null,
>   available?: boolean | null,
>   reason?: string | null
> }[] | null
> ```

***

### getOrderStatus

`prewarm.getOrderStatus`

Status of a prewarmed domain order.

**Risk:** `read`

```ts theme={null}
await corsair.inboxkit.api.prewarm.getOrderStatus({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `order_uid` | `string` | Yes | order\_uid |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | Indicates if an error occurred |
| `message` | `string \| null` | No | Response message |
| `data` | `object \| null` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   order_uid?: string | null,
>   status?: string | null,
>   buyer?: {
>     team_uid?: string | null,
>     team_name?: string | null,
>     workspace_uid?: string | null,
>     workspace_name?: string | null
>   } | null,
>   domains?: {
>     domain_id?: string | null,
>     domain_name?: string | null,
>     mailboxes_count?: number | null,
>     dns_records_count?: number | null,
>     consent_screen_url?: string | null
>   }[] | null,
>   sequencer_uid?: string | null,
>   stats?: {
>     total_domains?: number | null,
>     total_mailboxes?: number | null,
>     total_dns_records?: number | null
>   } | null,
>   pricing?: {
>     price_per_mailbox?: number | null,
>     total_price?: number | null
>   } | null,
>   processing?: {
>     started_at?: string | null,
>     completed_at?: string | null,
>     error_message?: string | null
>   } | null,
>   createdAt?: string | null,
>   updatedAt?: string | null
> } | null
> ```

***

### searchDomains

`prewarm.searchDomains`

Search prewarmed domains for sale.

**Risk:** `read`

```ts theme={null}
await corsair.inboxkit.api.prewarm.searchDomains({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `page` | `number` | No | Page number for pagination. Default 1. |
| `limit` | `number` | No | Number of results per page. Default 10. |
| `keyword` | `string` | No | Keyword to search in domain names (fuzzy search) |
| `domain_name` | `string` | No | Specific domain name to search for |
| `domain_id` | `string` | No | Specific domain ID to search for |
| `domain_ids` | `string[]` | No | Array of domain IDs to search for |
| `tlds` | `string[]` | No | Filter by TLDs (e.g., \['com', 'net', '.org']) |
| `platform` | `GOOGLE \| MICROSOFT` | No | Filter domains by platform |
| `min_age_days` | `number \| null` | No | Minimum domain age in days |
| `max_age_days` | `number \| null` | No | Maximum domain age in days |
| `min_available_mailboxes` | `number` | No | Minimum number of available mailboxes. Default 0. |
| `status` | `active \| inactive` | No | Domain status. Default "active". |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | — |
| `message` | `string \| null` | No | — |
| `data` | `object \| null` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   domains?: {
>     _id?: string | null,
>     name?: string | null,
>     tld?: string | null,
>     status?: string | null,
>     platform?: string | null,
>     domain_age_days?: number | null,
>     available_mailboxes?: number | null,
>     price_per_mailbox?: number | null,
>     domain_price?: number | null,
>     total_price?: number | null,
>     mailboxes?: (Record<string, any> | null)[] | null,
>     createdAt?: string | null,
>     uid?: string | null,
>     price_per_tenant?: number | null
>   }[] | null,
>   pagination?: {
>     page?: number | null,
>     limit?: number | null,
>     total?: number | null,
>     pages?: number | null
>   } | null
> } | null
> ```

***

### searchMailboxes

`prewarm.searchMailboxes`

Search prewarmed mailboxes for sale.

**Risk:** `read`

```ts theme={null}
await corsair.inboxkit.api.prewarm.searchMailboxes({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `domain_id` | `string` | No | Domain ID |
| `domain_ids` | `string[]` | No | Domain IDs |
| `first_name` | `string` | No | Filter by first name |
| `last_name` | `string` | No | Filter by last name |
| `full_name` | `string` | No | Filter by full name (exact match) |
| `gender` | `male \| female` | No | Filter by gender |
| `domain` | `string` | No | Filter by domain name (third priority, after domain\_id/domain\_ids) |
| `domain_age_min` | `number` | No | Minimum domain age in days |
| `domain_age_max` | `number` | No | Maximum domain age in days |
| `platform` | `GOOGLE \| MICROSOFT` | No | Filter by platform |
| `page` | `number` | No | Default 1. |
| `limit` | `number` | No | Default 10. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | — |
| `message` | `string \| null` | No | — |
| `data` | `object \| null` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   mailboxes?: {
>     _id?: string | null,
>     email?: string | null,
>     username?: string | null,
>     first_name?: string | null,
>     last_name?: string | null,
>     full_name?: string | null,
>     gender?: string | null,
>     profile_picture?: string | null,
>     platform?: string | null,
>     status?: string | null,
>     is_admin?: boolean | null,
>     domain_id?: string | null,
>     domain_name?: string | null,
>     domain_age_days?: number | null,
>     createdAt?: string | null,
>     updatedAt?: string | null,
>     uid?: string | null,
>     price_per_mailbox?: number | null
>   }[] | null,
>   pagination?: {
>     page?: number | null,
>     limit?: number | null,
>     total?: number | null,
>     pages?: number | null
>   } | null
> } | null
> ```

***

## Sequencers

### add

`sequencers.add`

Connect a sequencer account such as Instantly, Smartlead or Lemlist, with the fields sequencers.listPlatforms names for that platform. Most take a login and password, and a few take only an API key. No mailboxes go to it until sequencers.exportMailboxes, unless Auto Export is on for it in the InboxKit dashboard.

**Risk:** `write`

```ts theme={null}
await corsair.inboxkit.api.sequencers.add({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `name` | `string` | Yes | Display name for the sequencer in your workspace. |
| `platform` | `string` | Yes | Sequencer platform identifier (for example: instantly, smartlead, lemlist, emailbison). Use List sequencer platforms to discover supported values. |
| `sequencer_login` | `string` | No | Username or email for the sequencer account. Some platforms use a different field name — check List sequencer platforms for the exact name. |
| `sequencer_password` | `string` | No | Password for the sequencer account. |
| `sequencer_workspace` | `string` | No | Workspace or organization name on the sequencer. Used by platforms with multiple workspaces (instantly, emailbison, lemlist, plusvibe, reachinbox, manyreach, hothawk, automailer). |
| `workspace_id` | `string` | No | Workspace identifier on the sequencer. Used by salesforge and warmforge (optional) and by masterinbox, where it is REQUIRED. |
| `app_url` | `string` | No | Application URL for self-hosted instances (e.g., your EmailBison subdomain). |
| `client_id` | `string` | No | OAuth client ID from your sequencer account (used by EmailBison to authenticate and link mailboxes). |
| `api_key` | `string` | No | API key for the sequencer account. Optional in general, but required to enable warmup configuration, tag assignment, and the auto\_reconnect\_mailboxes flag. Validated against the platform when supplied. |
| `tags` | `string[]` | No | Tag IDs to assign to this sequencer (use Get sequencer tags to retrieve available IDs). Requires a valid API key. |
| `enable_warmup` | `boolean` | No | Turn on the platform's built-in warmup for mailboxes connected to this sequencer. Requires a valid API key. |
| `warmup_enable_custom_tracking` | `boolean` | No | Use custom tracking domains during warmup. Requires a valid API key. |
| `warmup_limit` | `number` | No | Maximum number of warmup emails sent per mailbox per day. Requires a valid API key. |
| `warmup_replyrate` | `number` | No | Target reply rate for warmup emails, as a percentage (0–100). Requires a valid API key. |
| `warmup_increment` | `1 \| 2 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8 \| disable \| disabled` | No | How many additional warmup emails to add each day. For Smartlead the minimum is "5". For Instantly the maximum is "4". Requires a valid API key. |
| `auto_reconnect_mailboxes` | `boolean` | No | Automatically reconnect mailboxes to this sequencer if they get disconnected. Setting this to true requires an API key on the sequencer (the platform's API is used to perform the reconnect). |
| `sender_name` | `string` | No | Sender name for the mailboxes. MailToaster requires it. |

InboxKit's API also takes `auto_export_enabled`. The plugin leaves it out because it sends new mailboxes' credentials to the sequencer with no further call; turn it on in the dashboard if you want it. InboxKit's docs write `warmup_increment` with stray quotes and its MCP server says `disable` where the docs say `disabled`, so both spellings are accepted.

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | — |
| `message` | `string \| null` | No | — |
| `uid` | `string \| null` | No | Created sequencer unique identifier |

***

### delete

`sequencers.delete`

Remove sequencers from the workspace. Mailboxes can no longer be exported to them.

**Risk:** `destructive`

```ts theme={null}
await corsair.inboxkit.api.sequencers.delete({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `uids` | `string[]` | Yes | Array of sequencer UIDs to delete |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | — |
| `message` | `string \| null` | No | — |
| `data` | `object \| null` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   deletedCount?: number | null,
>   requestedCount?: number | null
> } | null
> ```

***

### exportMailboxes

`sequencers.exportMailboxes`

Send mailboxes into a sequencer, which receives their credentials. Runs in the background; follow it with sequencers.getExportStatus.

**Risk:** `destructive`

```ts theme={null}
await corsair.inboxkit.api.sequencers.exportMailboxes({ sequencer_uid: '<sequencer uid>', mailbox_uids: ['<mailbox uid>'] });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `sequencer_uid` | `string` | Yes | — |
| `mailbox_uids` | `string[]` | Yes | — |

The sequencer receives each mailbox's credentials. Mailboxes already connected to it are skipped, and weekly export limits apply per mailbox.

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | — |
| `message` | `string \| null` | No | — |
| `results` | `object \| null` | No | — |
| `exports` | `object \| null` | No | — |

> [accordion] results full type
>
> ```ts theme={null}
> {
>   total_mailboxes?: number | null,
>   new_exports_created?: number | null,
>   duplicate_exports_skipped?: number | null,
>   weekly_limit_reached?: number | null,
>   active_exports_to_this_sequencer?: number | null,
>   weekly_export_limit?: number | null
> } | null
> ```

> [accordion] exports full type
>
> ```ts theme={null}
> {
>   created?: {
>     uid?: string | null,
>     sequencer_uid?: string | null,
>     mailbox_uid?: string | null,
>     mailbox_email?: string | null,
>     status?: string | null,
>     client_id_processed?: boolean | null,
>     created_at?: string | null
>   }[] | null,
>   duplicates?: {
>     mailbox_uid?: string | null,
>     mailbox_email?: string | null,
>     status?: string | null,
>     existing_sequencer_uid?: string | null,
>     restriction_reason?: string | null,
>     next_available_at?: any,
>     last_export_date?: string | null,
>     weekly_exports_used?: number | null,
>     weekly_exports_limit?: number | null
>   }[] | null
> } | null
> ```

***

### getExportStatus

`sequencers.getExportStatus`

Status of mailbox exports, with the error if a connection failed.

**Risk:** `read`

```ts theme={null}
await corsair.inboxkit.api.sequencers.getExportStatus({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `uids` | `string[]` | No | Filter the response to a specific set of export job IDs. |
| `limit` | `number` | No | How many results to return per page (1–100, default 50). |
| `offset` | `number` | No | Number of results to skip for pagination. Default 0. |
| `status` | `queued \| pending \| processing \| completed \| errored \| failed \| cancelled` | No | Return only export jobs in this status. |
| `sequencer_uid` | `string` | No | Return only export jobs that targeted this sequencer. |
| `mailbox_uids` | `string[]` | No | Return only export jobs for these mailboxes. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | — |
| `message` | `string \| null` | No | — |
| `data` | `object[] \| null` | No | List of export jobs, each with the sequencer it targeted and the mailbox it tried to connect. |
| `pagination` | `object \| null` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   _id?: string | null,
>   uid?: string | null,
>   sequencer_uid?: string | null,
>   sequencer_platform?: string | null,
>   sequencer_name?: string | null,
>   sequencer_platform_name?: string | null,
>   sequencer_logo?: string | null,
>   mailbox_uid?: string | null,
>   mailbox_email?: string | null,
>   mailbox_count?: number | null,
>   status?: string | null,
>   error_message?: string | null,
>   attempts?: number | null,
>   completed_at?: string | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   failure_details?: Record<string, any> | null
> }[] | null
> ```

> [accordion] pagination full type
>
> ```ts theme={null}
> {
>   total?: number | null,
>   limit?: number | null,
>   offset?: number | null,
>   hasMore?: boolean | null
> } | null
> ```

***

### getTags

`sequencers.getTags`

Tags on a sequencer account, using its platform and API key. Only Instantly has them today.

**Risk:** `read`

```ts theme={null}
await corsair.inboxkit.api.sequencers.getTags({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `platform` | `string` | Yes | Sequencer platform identifier (for example: instantly, smartlead, lemlist, emailbison). |
| `api_key` | `string` | Yes | API key for the sequencer account. The key is validated against the platform before tags are returned. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | — |
| `tags` | `object[] \| null` | No | List of available tags |

> [accordion] tags full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   name?: string | null
> }[] | null
> ```

***

### list

`sequencers.list`

Sequencers connected to the workspace, filtered by platform, status, keyword or uid.

**Risk:** `read`

```ts theme={null}
await corsair.inboxkit.api.sequencers.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `limit` | `number` | No | — |
| `offset` | `number` | No | — |
| `sequencer_platforms` | `string[]` | No | — |
| `keyword` | `string` | No | — |
| `status` | `string` | No | — |
| `uids` | `string[]` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | — |
| `message` | `string \| null` | No | — |
| `data` | `object[] \| null` | No | — |
| `pagination` | `object \| null` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   _id?: string | null,
>   uid?: string | null,
>   name?: string | null,
>   platform?: string | null,
>   username?: string | null,
>   status?: string | null,
>   status_reason?: string | null,
>   workspace_name?: string | null,
>   consent_url?: string | null,
>   createdAt?: string | null,
>   updatedAt?: string | null,
>   platform_metadata?: {
>     platform_name?: string | null,
>     logo?: string | null,
>     client_id?: string | null,
>     cname?: string | null,
>     version?: string | null,
>     ui_config?: {
>       theme?: string | null,
>       layout?: string | null,
>       submit_button_text?: string | null,
>       loading_text?: string | null,
>       responsive?: boolean | null
>     } | null,
>     fields?: (Record<string, any> | null)[] | null
>   } | null,
>   status_reason_type?: string | null,
>   status_reason_updated_at?: string | null
> }[] | null
> ```

> [accordion] pagination full type
>
> ```ts theme={null}
> {
>   total?: number | null,
>   limit?: number | null,
>   offset?: number | null,
>   hasMore?: boolean | null
> } | null
> ```

***

### listPlatforms

`sequencers.listPlatforms`

Every sequencer platform InboxKit supports, with the fields each one needs to connect.

**Risk:** `read`

```ts theme={null}
await corsair.inboxkit.api.sequencers.listPlatforms({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | — |
| `message` | `string \| null` | No | — |
| `platforms` | `object[] \| null` | No | Sequencer platforms available in your workspace. |

> [accordion] platforms full type
>
> ```ts theme={null}
> {
>   platform?: string | null,
>   name?: string | null,
>   logo?: string | null,
>   fields?: {
>     name?: string | null,
>     type?: string | null,
>     required?: boolean | null
>   }[] | null
> }[] | null
> ```

***

### update

`sequencers.update`

Rename a sequencer, rotate its credentials or change its auto-reconnect setting.

**Risk:** `write`

```ts theme={null}
await corsair.inboxkit.api.sequencers.update({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `uid` | `string` | Yes | ID of the sequencer to update. |
| `name` | `string` | Yes | Display name for the sequencer in your workspace. |
| `platform` | `string` | Yes | Sequencer platform identifier (for example: instantly, smartlead, lemlist, emailbison). |
| `username` | `string` | No | Username or email for the sequencer account. Optional: leave it out to keep the current one. |
| `password` | `string` | No | Password for the sequencer account. Optional: leave it out to keep the current one. Not used by `sendkit`, `brandjet`, `supersend`, `ken`, `automailer`, `mailstrike`, and `outboundry`. |
| `api_key` | `string` | No | API key for the sequencer account. Validated against the platform when changed. |
| `workspace_name` | `string` | No | Workspace or organization name for platforms that have multiple workspaces. Pass an empty string to clear. |
| `auto_reconnect_mailboxes` | `boolean` | No | Automatically reconnect mailboxes to this sequencer if they get disconnected. Setting this to true requires the sequencer to have an API key (either already saved or supplied in this request). |

InboxKit's API also takes `auto_export_enabled`. The plugin leaves it out for the same reason as on `sequencers.add`.

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | — |
| `message` | `string \| null` | No | — |
| `uid` | `string \| null` | No | Updated sequencer unique identifier |

***

### verifyLemlistOtp

`sequencers.verifyLemlistOtp`

Resume a Lemlist connection paused with verification\_required, using the link and code from its email.

**Risk:** `write`

```ts theme={null}
await corsair.inboxkit.api.sequencers.verifyLemlistOtp({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `verification_id` | `string` | Yes | From the /v1/api/sequencers/add 202 response. |
| `verification_url` | `string` | Yes | The confirmation URL from the Lemlist verification email. Right-click the verify button in the email and choose Copy link address. |
| `otp` | `string` | Yes | 6-digit code from the verification email |
| `email` | `string` | Yes | Same email passed to /v1/api/sequencers/add. |
| `password` | `string` | Yes | Same password passed to /v1/api/sequencers/add. |
| `name` | `string` | No | Optional display name for the sequencer record (same as /v1/api/sequencers/add). |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | — |
| `status` | `string \| null` | No | — |
| `uid` | `string \| null` | No | — |
| `message` | `string \| null` | No | — |

***

## Tags

### assign

`tags.assign`

Add, remove or replace tags on domains or mailboxes in bulk.

**Risk:** `write`

```ts theme={null}
await corsair.inboxkit.api.tags.assign({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `entityType` | `domains \| mailboxes` | Yes | Type of entities to assign tags to |
| `entityUids` | `string[]` | Yes | Array of entity UIDs |
| `tagUids` | `string[]` | No | Array of tag UIDs to assign |
| `action` | `add \| remove \| set` | Yes | Action to perform - add tags to existing, remove specific tags, or set/replace all tags. Default "add". |
| `createMissingTags` | `boolean` | No | Whether to create tags if they don't exist. Default false. |
| `newTags` | `object[]` | No | New tags to create (if createMissingTags is true) |

> [accordion] newTags full type
>
> ```ts theme={null}
> {
>   name?: string,
>   hexColor?: string
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | — |
| `message` | `string \| null` | No | — |
| `data` | `object \| null` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   entitiesUpdated?: number | null,
>   totalEntities?: number | null,
>   tags?: (string | null)[] | null,
>   action?: string | null,
>   createdTags?: {
>     uid?: string | null,
>     name?: string | null,
>     hexColor?: string | null
>   }[] | null,
>   updatedEntities?: {
>     uid?: string | null,
>     tags?: (string | null)[] | null
>   }[] | null
> } | null
> ```

***

### create

`tags.create`

Create a tag in the workspace.

**Risk:** `write`

```ts theme={null}
await corsair.inboxkit.api.tags.create({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `name` | `string` | Yes | Tag name |
| `hexColor` | `string` | No | Hex color code. Default "#3B82F6". |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | — |
| `message` | `string \| null` | No | — |
| `tag` | `object \| null` | No | — |

> [accordion] tag full type
>
> ```ts theme={null}
> {
>   uid?: string | null,
>   name?: string | null,
>   hexColor?: string | null,
>   usageCount?: number | null,
>   usedBy?: {
>     domains?: number | null,
>     mailboxes?: number | null
>   } | null,
>   createdAt?: string | null,
>   updatedAt?: string | null
> } | null
> ```

***

### delete

`tags.delete`

Delete a tag and remove it from everything it is on.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.inboxkit.api.tags.delete({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `uid` | `string` | Yes | Tag UID to delete |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | — |
| `message` | `string \| null` | No | — |

***

### list

`tags.list`

All tags in the workspace.

**Risk:** `read`

```ts theme={null}
await corsair.inboxkit.api.tags.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | — |
| `message` | `string \| null` | No | — |
| `tags` | `object[] \| null` | No | — |
| `total` | `number \| null` | No | Total number of tags |

> [accordion] tags full type
>
> ```ts theme={null}
> {
>   uid?: string | null,
>   name?: string | null,
>   hexColor?: string | null,
>   usageCount?: number | null,
>   usedBy?: {
>     domains?: number | null,
>     mailboxes?: number | null
>   } | null,
>   createdAt?: string | null,
>   updatedAt?: string | null
> }[] | null
> ```

***

## Verified Domains

### add

`verifiedDomains.add`

Add a website to mask domains to. It must then be verified with a TXT record.

**Risk:** `write`

```ts theme={null}
await corsair.inboxkit.api.verifiedDomains.add({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `domain` | `string` | Yes | Domain or URL of your website. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `boolean \| null` | No | `true` when the request worked. |
| `data` | `object \| null` | No | The destination you added. |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   uid?: string | null,
>   domain?: string | null,
>   status?: string | null,
>   is_grandfathered?: boolean | null,
>   verified_at?: string | null,
>   last_checked_at?: string | null,
>   last_error?: string | null,
>   created_at?: string | null,
>   txt_record?: {
>     type?: string | null,
>     name?: string | null,
>     value?: string | null
>   } | null
> } | null
> ```

***

### list

`verifiedDomains.list`

Websites the team has added for URL masking, with each one's status and TXT record.

**Risk:** `read`

```ts theme={null}
await corsair.inboxkit.api.verifiedDomains.list({});
```

**Input:** *empty object*

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `boolean \| null` | No | `true` when the request worked. |
| `data` | `object[] \| null` | No | Your destinations. |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   uid?: string | null,
>   domain?: string | null,
>   status?: string | null,
>   is_grandfathered?: boolean | null,
>   verified_at?: string | null,
>   last_checked_at?: string | null,
>   last_error?: string | null,
>   created_at?: string | null,
>   txt_record?: {
>     type?: string | null,
>     name?: string | null,
>     value?: string | null
>   } | null
> }[] | null
> ```

***

### remove

`verifiedDomains.remove`

Remove a website from the verified destinations.

**Risk:** `destructive`

```ts theme={null}
await corsair.inboxkit.api.verifiedDomains.remove({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `uid` | `string` | Yes | `uid` of the destination, from List verified destinations or Add a destination to verify. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `boolean \| null` | No | `true` when the destination was removed. |

***

### verify

`verifiedDomains.verify`

Check whether the TXT record for a destination is published, and mark it verified if so.

**Risk:** `write`

```ts theme={null}
await corsair.inboxkit.api.verifiedDomains.verify({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `uid` | `string` | Yes | `uid` of the destination, from List verified destinations or Add a destination to verify. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `boolean \| null` | No | `true` when the check ran. |
| `verified` | `boolean \| null` | No | `true` when the TXT record was found. |
| `data` | `object \| null` | No | The destination, with its updated status. |
| `message` | `string \| null` | No | Result of the check. |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   uid?: string | null,
>   domain?: string | null,
>   status?: string | null,
>   is_grandfathered?: boolean | null,
>   verified_at?: string | null,
>   last_checked_at?: string | null,
>   last_error?: string | null,
>   created_at?: string | null,
>   txt_record?: {
>     type?: string | null,
>     name?: string | null,
>     value?: string | null
>   } | null
> } | null
> ```

***

## Warmup

### add

`warmup.add`

SPENDS MONEY. Add warmup to mailboxes, billed monthly. Mailboxes that are not ready start once they are; activate\_immediately charges the first month to the wallet now.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.inboxkit.api.warmup.add({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `mailbox_uids` | `string[]` | Yes | Array of mailbox UIDs to add warmup to (max 100) |
| `activate_immediately` | `boolean` | No | Whether to activate warmup immediately for active mailboxes (deducts credits). Default false. |

Spends money. Billed monthly per mailbox. Mailboxes that aren't ready wait as `pending_activation` and start on their own; `activate_immediately` charges the first month now for the active ones.

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | — |
| `message` | `string \| null` | No | — |
| `subscriptions` | `object[] \| null` | No | Array of created warmup subscription objects |
| `errors` | `object[] \| null` | No | Errors for mailboxes that failed (only present if errors occurred) |
| `skipped` | `number \| null` | No | Number of mailboxes skipped (already have warmup) |

> [accordion] subscriptions full type
>
> ```ts theme={null}
> {
>   uid?: string | null,
>   status?: string | null,
>   mailbox_email?: string | null,
>   price_per_month?: number | null,
>   started_at?: string | null,
>   next_billing_date?: string | null,
>   createdAt?: string | null
> }[] | null
> ```

> [accordion] errors full type
>
> ```ts theme={null}
> {
>   mailbox_uid?: string | null,
>   error?: string | null
> }[] | null
> ```

***

### addSmtpMailboxes

`warmup.addSmtpMailboxes`

SPENDS MONEY. Connect up to 10 SMTP mailboxes you own and start their warmup. The first month is charged to the wallet for each one that signs in.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.inboxkit.api.warmup.addSmtpMailboxes({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `mailboxes` | `object[]` | Yes | 1 to 10 mailboxes. |
| `update_existing` | `boolean` | No | Optional, default false. When true, a mailbox already connected in this workspace gets the new sign-in details. If its warmup is running, they are tested first and warmup restarts from day one. Never charged. |

Spends money. Your wallet must cover every new mailbox in the request or the whole request is refused. A mailbox that can't sign in is listed under `errors` and isn't charged.

> [accordion] mailboxes full type
>
> ```ts theme={null}
> {
>   email: string,
>   display_name?: string,
>   smtp_host: string,
>   smtp_port: number,
>   smtp_username?: string,
>   smtp_password: string,
>   smtp_secure?: boolean,
>   imap_host?: string,
>   imap_port?: number,
>   imap_username?: string,
>   imap_password?: string,
>   imap_secure?: boolean
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | false when the request was processed. |
| `message` | `string \| null` | No | Summary of the result. |
| `results` | `object[] \| null` | No | One result per mailbox, in request order. |
| `summary` | `object \| null` | No | — |

> [accordion] results full type
>
> ```ts theme={null}
> {
>   email?: string | null,
>   status?: string | null,
>   reason?: string | null,
>   message?: string | null,
>   external_mailbox_uid?: string | null,
>   subscription_uid?: string | null,
>   amount_charged?: number | null
> }[] | null
> ```

> [accordion] summary full type
>
> ```ts theme={null}
> {
>   started?: number | null,
>   updated?: number | null,
>   failed?: number | null,
>   skipped?: number | null,
>   total_charged?: number | null
> } | null
> ```

***

### cancel

`warmup.cancel`

Stop warmup and its billing for mailboxes. The mailboxes stay connected.

**Risk:** `destructive`

```ts theme={null}
await corsair.inboxkit.api.warmup.cancel({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `mailbox_uids` | `string[]` | Yes | Array of mailbox UIDs to cancel warmup for (max 100). Active warmups will be stopped before cancellation. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | — |
| `message` | `string \| null` | No | — |
| `results` | `object \| null` | No | — |
| `summary` | `object \| null` | No | — |

> [accordion] results full type
>
> ```ts theme={null}
> {
>   success?: {
>     mailbox_uid?: string | null,
>     subscription_uid?: string | null,
>     action?: string | null
>   }[] | null,
>   failed?: {
>     mailbox_uid?: string | null,
>     reason?: string | null
>   }[] | null
> } | null
> ```

> [accordion] summary full type
>
> ```ts theme={null}
> {
>   total_requested?: number | null,
>   success_count?: number | null,
>   failed_count?: number | null
> } | null
> ```

***

### createConnectLink

`warmup.createConnectLink`

CAN SPEND MONEY. A one-time sign-in link to connect a Google Workspace or Microsoft 365 mailbox you own. Anyone with the link can use it; with start\_warmup the first month is charged when it connects.

**Risk:** `destructive`

```ts theme={null}
await corsair.inboxkit.api.warmup.createConnectLink({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `platform` | `GOOGLE \| MICROSOFT` | Yes | GOOGLE for Google Workspace, MICROSOFT for Microsoft 365. |
| `email` | `string` | No | Optional. When set, only this mailbox can complete the sign-in. |
| `start_warmup` | `boolean` | No | Optional, default false. When true, warmup starts and the first month is charged as soon as the mailbox connects. |

`connect_url` is returned only once, works once and lasts 72 hours. Anyone with it can use it. With `start_warmup` the first month is charged when the mailbox connects.

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | false when the link was created. |
| `message` | `string \| null` | No | Summary. |
| `connection` | `object \| null` | No | — |
| `setup` | `object \| null` | No | One-time admin setup for the platform. |

> [accordion] connection full type
>
> ```ts theme={null}
> {
>   connection_id?: string | null,
>   platform?: string | null,
>   status?: string | null,
>   failure_reason?: string | null,
>   failure_message?: string | null,
>   email?: string | null,
>   start_warmup?: boolean | null,
>   external_mailbox_uid?: string | null,
>   subscription_uid?: string | null,
>   created_at?: string | null,
>   completed_at?: string | null,
>   expires_at?: string | null,
>   external_mailbox?: {
>     uid?: string | null,
>     email?: string | null,
>     display_name?: string | null,
>     platform?: string | null,
>     connection_type?: string | null,
>     status?: string | null,
>     status_reason?: string | null,
>     status_message?: string | null,
>     warmup?: {
>       subscription_uid?: string | null,
>       status?: string | null,
>       health_status?: string | null
>     } | null,
>     connected_at?: string | null,
>     disconnected_at?: string | null,
>     created_at?: string | null
>   } | null,
>   connect_url?: string | null
> } | null
> ```

> [accordion] setup full type
>
> ```ts theme={null}
> {
>   client_id?: string | null,
>   scopes?: (string | null)[] | null,
>   admin_console_url?: string | null,
>   admin_consent_url?: string | null
> } | null
> ```

***

### disconnectMailbox

`warmup.disconnectMailbox`

Disconnect a mailbox you connected yourself and cancel its warmup. Connecting it again charges a new first month.

**Risk:** `destructive`

```ts theme={null}
await corsair.inboxkit.api.warmup.disconnectMailbox({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `uid` | `string` | Yes | UID of the mailbox, starting with ext\_mbx\_. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | false when the mailbox is disconnected. |
| `message` | `string \| null` | No | Summary. |
| `mailbox` | `object \| null` | No | — |
| `warmup_cancelled` | `boolean \| null` | No | true when a running warmup was cancelled. |

> [accordion] mailbox full type
>
> ```ts theme={null}
> {
>   uid?: string | null,
>   email?: string | null,
>   display_name?: string | null,
>   platform?: string | null,
>   connection_type?: string | null,
>   status?: string | null,
>   status_reason?: string | null,
>   status_message?: string | null,
>   warmup?: {
>     subscription_uid?: string | null,
>     status?: string | null,
>     health_status?: string | null
>   } | null,
>   connected_at?: string | null,
>   disconnected_at?: string | null,
>   created_at?: string | null
> } | null
> ```

***

### get

`warmup.get`

The warmup subscription of one mailbox, with its current settings.

**Risk:** `read`

```ts theme={null}
await corsair.inboxkit.api.warmup.get({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `uid` | `string` | Yes | Mailbox UID to get warmup details for |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | — |
| `message` | `string \| null` | No | — |
| `subscription` | `object \| null` | No | Warmup subscription details |

> [accordion] subscription full type
>
> ```ts theme={null}
> {
>   uid?: string | null,
>   status?: string | null,
>   mailbox_email?: string | null,
>   price_per_month?: number | null,
>   health_status?: string | null,
>   started_at?: string | null,
>   paused_at?: string | null,
>   cancelled_at?: string | null,
>   next_billing_date?: string | null,
>   cached_stats?: {
>     emails_sent?: number | null,
>     emails_received?: number | null,
>     health_score?: number | null,
>     inbox_rate?: number | null,
>     current_volume?: number | null,
>     target_volume?: number | null,
>     warmup_day?: number | null,
>     config?: {
>       starting_volume?: number | null,
>       daily_increase?: number | null,
>       target_volume?: number | null,
>       reply_rates?: {
>         inbox?: Record<string, any> | null,
>         promotions?: Record<string, any> | null,
>         spam?: number | null
>       } | null
>     } | null
>   } | null,
>   mailbox?: {
>     uid?: string | null,
>     username?: string | null,
>     domain_name?: string | null,
>     first_name?: string | null,
>     last_name?: string | null,
>     platform?: string | null,
>     status?: string | null
>   } | null,
>   createdAt?: string | null
> } | null
> ```

***

### getConnectLink

`warmup.getConnectLink`

What happened to a link from warmup.createConnectLink.

**Risk:** `read`

```ts theme={null}
await corsair.inboxkit.api.warmup.getConnectLink({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `connection_id` | `string` | Yes | The connection\_id returned by Create a Connect Link. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | false when the link was found. |
| `message` | `string \| null` | No | Summary. |
| `connection` | `object \| null` | No | — |

> [accordion] connection full type
>
> ```ts theme={null}
> {
>   connection_id?: string | null,
>   platform?: string | null,
>   status?: string | null,
>   failure_reason?: string | null,
>   failure_message?: string | null,
>   email?: string | null,
>   start_warmup?: boolean | null,
>   external_mailbox_uid?: string | null,
>   subscription_uid?: string | null,
>   created_at?: string | null,
>   completed_at?: string | null,
>   expires_at?: string | null,
>   external_mailbox?: {
>     uid?: string | null,
>     email?: string | null,
>     display_name?: string | null,
>     platform?: string | null,
>     connection_type?: string | null,
>     status?: string | null,
>     status_reason?: string | null,
>     status_message?: string | null,
>     warmup?: {
>       subscription_uid?: string | null,
>       status?: string | null,
>       health_status?: string | null
>     } | null,
>     connected_at?: string | null,
>     disconnected_at?: string | null,
>     created_at?: string | null
>   } | null
> } | null
> ```

***

### getPricing

`warmup.getPricing`

The monthly warmup price per mailbox.

**Risk:** `read`

```ts theme={null}
await corsair.inboxkit.api.warmup.getPricing({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | — |
| `price_per_mailbox` | `number \| null` | No | Price per mailbox per month |
| `currency` | `string \| null` | No | Currency code |
| `billing_cycle` | `string \| null` | No | Billing cycle |
| `active_subscriptions` | `number \| null` | No | Number of active warmup subscriptions |
| `pending_subscriptions` | `number \| null` | No | Number of pending activation subscriptions |
| `total_subscriptions` | `number \| null` | No | Total non-cancelled subscriptions |
| `monthly_cost` | `number \| null` | No | Current monthly cost for active subscriptions |

***

### getStats

`warmup.getStats`

Warmup counts for the workspace.

**Risk:** `read`

```ts theme={null}
await corsair.inboxkit.api.warmup.getStats({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | — |
| `message` | `string \| null` | No | — |
| `stats` | `object \| null` | No | Aggregated warmup statistics for the workspace |

> [accordion] stats full type
>
> ```ts theme={null}
> {
>   totalCount?: number | null,
>   monthlyTotal?: number | null,
>   activeCount?: number | null,
>   pendingCount?: number | null,
>   pausedCount?: number | null,
>   pastDueCount?: number | null,
>   excellentHealthCount?: number | null,
>   goodHealthCount?: number | null,
>   warningHealthCount?: number | null,
>   criticalHealthCount?: number | null,
>   totalEmailsSent?: number | null,
>   totalEmailsReceived?: number | null,
>   avgHealthScore?: number | null
> } | null
> ```

***

### list

`warmup.list`

Warmup subscriptions in the workspace.

**Risk:** `read`

```ts theme={null}
await corsair.inboxkit.api.warmup.list({ status: 'active', limit: 25 });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `page` | `number` | No | Page number for pagination. Default 1. |
| `limit` | `number` | No | Number of items per page. Default 10. |
| `status` | `active \| paused \| pending_activation \| cancelled \| past_due` | No | Filter by warmup subscription status |
| `include_cancelled` | `boolean` | No | Include cancelled subscriptions in results. Default false. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | Indicates if there was an error |
| `message` | `string \| null` | No | Human-readable response message |
| `subscriptions` | `object[] \| null` | No | Array of warmup subscription objects |
| `total` | `number \| null` | No | Total number of subscriptions matching the query |
| `pages` | `number \| null` | No | Total number of pages |
| `current_page` | `number \| null` | No | Current page number |
| `limit` | `number \| null` | No | Items per page |

> [accordion] subscriptions full type
>
> ```ts theme={null}
> {
>   uid?: string | null,
>   status?: string | null,
>   mailbox_email?: string | null,
>   price_per_month?: number | null,
>   health_status?: string | null,
>   started_at?: string | null,
>   next_billing_date?: string | null,
>   cached_stats?: {
>     emails_sent?: number | null,
>     emails_received?: number | null,
>     health_score?: number | null,
>     inbox_rate?: number | null,
>     current_volume?: number | null,
>     target_volume?: number | null,
>     warmup_day?: number | null,
>     config?: {
>       starting_volume?: number | null,
>       daily_increase?: number | null,
>       target_volume?: number | null,
>       reply_rates?: Record<string, any> | null
>     } | null
>   } | null,
>   mailbox?: {
>     uid?: string | null,
>     username?: string | null,
>     domain_name?: string | null,
>     first_name?: string | null,
>     last_name?: string | null,
>     platform?: string | null,
>     status?: string | null
>   } | null,
>   createdAt?: string | null
> }[] | null
> ```

***

### listConnectedMailboxes

`warmup.listConnectedMailboxes`

Mailboxes you connected yourself, newest first.

**Risk:** `read`

```ts theme={null}
await corsair.inboxkit.api.warmup.listConnectedMailboxes({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `page` | `number` | No | Page number, default 1. |
| `limit` | `number` | No | Mailboxes per page, 1 to 100, default 10. |
| `status` | `string` | No | connected (default) or disconnected. |
| `platform` | `string` | No | GOOGLE, MICROSOFT or SMTP. Leave out for all. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | false when the list was retrieved. |
| `message` | `string \| null` | No | Summary. |
| `mailboxes` | `object[] \| null` | No | The mailboxes on this page. |
| `total` | `number \| null` | No | Mailboxes matching the filters. |
| `pages` | `number \| null` | No | Number of pages. |
| `current_page` | `number \| null` | No | This page. |
| `limit` | `number \| null` | No | Mailboxes per page. |

> [accordion] mailboxes full type
>
> ```ts theme={null}
> {
>   uid?: string | null,
>   email?: string | null,
>   display_name?: string | null,
>   platform?: string | null,
>   connection_type?: string | null,
>   status?: string | null,
>   status_reason?: string | null,
>   status_message?: string | null,
>   warmup?: {
>     subscription_uid?: string | null,
>     status?: string | null,
>     health_status?: string | null
>   } | null,
>   connected_at?: string | null,
>   disconnected_at?: string | null,
>   created_at?: string | null
> }[] | null
> ```

***

### pause

`warmup.pause`

Pause warmup for mailboxes.

**Risk:** `write`

```ts theme={null}
await corsair.inboxkit.api.warmup.pause({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `mailbox_uids` | `string[]` | Yes | Array of mailbox UIDs to pause warmup for (max 100). Only active subscriptions can be paused. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | — |
| `message` | `string \| null` | No | — |
| `results` | `object \| null` | No | — |
| `summary` | `object \| null` | No | — |

> [accordion] results full type
>
> ```ts theme={null}
> {
>   success?: {
>     mailbox_uid?: string | null,
>     subscription_uid?: string | null,
>     action?: string | null
>   }[] | null,
>   failed?: {
>     mailbox_uid?: string | null,
>     reason?: string | null
>   }[] | null
> } | null
> ```

> [accordion] summary full type
>
> ```ts theme={null}
> {
>   total_requested?: number | null,
>   success_count?: number | null,
>   failed_count?: number | null
> } | null
> ```

***

### resume

`warmup.resume`

Resume warmup for mailboxes.

**Risk:** `write`

```ts theme={null}
await corsair.inboxkit.api.warmup.resume({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `mailbox_uids` | `string[]` | Yes | Array of mailbox UIDs to resume warmup for (max 100). Only paused subscriptions can be resumed. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | — |
| `message` | `string \| null` | No | — |
| `results` | `object \| null` | No | — |
| `summary` | `object \| null` | No | — |

> [accordion] results full type
>
> ```ts theme={null}
> {
>   success?: {
>     mailbox_uid?: string | null,
>     subscription_uid?: string | null,
>     action?: string | null
>   }[] | null,
>   failed?: {
>     mailbox_uid?: string | null,
>     reason?: string | null
>   }[] | null
> } | null
> ```

> [accordion] summary full type
>
> ```ts theme={null}
> {
>   total_requested?: number | null,
>   success_count?: number | null,
>   failed_count?: number | null
> } | null
> ```

***

### updateSettings

`warmup.updateSettings`

Change warmup settings for mailboxes. Only the settings you send change.

**Risk:** `write`

```ts theme={null}
await corsair.inboxkit.api.warmup.updateSettings({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Which workspace, as a uid from workspaces.list. Leave out to use the plugin's workspaceId option or, failing that, the team's only workspace. |
| `mailbox_uids` | `string[]` | Yes | UIDs of the mailboxes to update, 1 to 100 per request. A UID sent more than once is updated once. |
| `settings` | `object` | Yes | The settings to change. Send at least one. Settings you leave out stay as they are. |

> [accordion] settings full type
>
> ```ts theme={null}
> {
>   starting_volume?: number,
>   daily_increase?: number,
>   target_volume?: number,
>   reply_rates?: {
>     inbox?: {
>       min?: number,
>       max?: number
>     },
>     promotions?: {
>       min?: number,
>       max?: number
>     },
>     spam?: number
>   }
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | false when the request was processed. |
| `message` | `string \| null` | No | Summary of the result. |
| `results` | `object \| null` | No | — |
| `summary` | `object \| null` | No | — |

> [accordion] results full type
>
> ```ts theme={null}
> {
>   success?: {
>     mailbox_uid?: string | null,
>     subscription_uid?: string | null,
>     settings?: Record<string, any> | null,
>     skipped_settings?: (string | null)[] | null
>   }[] | null,
>   failed?: {
>     mailbox_uid?: string | null,
>     reason?: string | null
>   }[] | null
> } | null
> ```

> [accordion] summary full type
>
> ```ts theme={null}
> {
>   total_requested?: number | null,
>   success_count?: number | null,
>   failed_count?: number | null
> } | null
> ```

***

## Workspaces

### create

`workspaces.create`

Create a workspace. All team members are copied into it unless admins\_only is set. Set a webhook URL afterwards with workspaces.updateWebhook.

**Risk:** `write`

```ts theme={null}
await corsair.inboxkit.api.workspaces.create({ name: 'Client A' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Workspace name |
| `admins_only` | `boolean` | No | Optional. If true, only team members with role=admin are copied into the new workspace as initial members; member-role rows (people invited to specific previous workspaces) are skipped. Default false. |

InboxKit's API also takes `webhook_url` here. The plugin leaves it out because that URL can receive mailbox passwords; set it with `workspaces.updateWebhook`.

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | — |
| `message` | `string \| null` | No | — |
| `uid` | `string \| null` | No | Created workspace unique identifier |

***

### delete

`workspaces.delete`

Delete a workspace permanently.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.inboxkit.api.workspaces.delete({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `uid` | `string` | Yes | Workspace unique identifier to delete |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | — |
| `message` | `string \| null` | No | — |

***

### get

`workspaces.get`

One workspace by uid.

**Risk:** `read`

```ts theme={null}
await corsair.inboxkit.api.workspaces.get({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `uid` | `string` | Yes | Workspace unique identifier |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | — |
| `message` | `string \| null` | No | — |
| `workspace` | `object \| null` | No | — |

> [accordion] workspace full type
>
> ```ts theme={null}
> {
>   uid?: string | null,
>   name?: string | null,
>   webhook_url?: string | null,
>   use_shared_billing?: boolean | null,
>   members?: {
>     email?: string | null,
>     role?: string | null,
>     full_name?: string | null,
>     uid?: string | null
>   }[] | null,
>   domains?: number | null,
>   assigned_domains?: number | null,
>   assignable_domains?: number | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   workspace_type?: string | null,
>   createdAt?: string | null,
>   updatedAt?: string | null
> } | null
> ```

***

### inviteMember

`workspaces.inviteMember`

Invite someone to a workspace, or resend an invite. Sends them an email and gives them access to its domains and mailboxes.

**Risk:** `destructive`

```ts theme={null}
await corsair.inboxkit.api.workspaces.inviteMember({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `email` | `string` | Yes | Email address of the person to invite |
| `name` | `string` | No | Display name for the member. Defaults to email prefix if omitted. |
| `role` | `admin \| member` | Yes | Role to assign. admin = full access including member management. member = standard access. |
| `workspace_uid` | `string` | Yes | UID of the workspace to invite the member to. Get this from the List Workspaces endpoint. |
| `resend` | `boolean` | No | Set to true to resend a pending invitation that was already sent. Default false. |

Sends the person an email and gives them access to the workspace's domains and mailboxes.

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | — |
| `invitation_sent` | `boolean \| null` | No | true if the invitation email was successfully delivered to the upstream provider. |
| `message` | `string \| null` | No | Human-readable status. On invitation\_sent=true: "Workspace invitation sent successfully.". |

***

### list

`workspaces.list`

Every workspace in the team, with its uid. Pass a uid as workspaceId to the operations that act on one workspace.

**Risk:** `read`

```ts theme={null}
await corsair.inboxkit.api.workspaces.list({});
```

**Input:** *empty object*

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | — |
| `message` | `string \| null` | No | — |
| `workspaces` | `object[] \| null` | No | List of workspaces |

> [accordion] workspaces full type
>
> ```ts theme={null}
> {
>   uid?: string | null,
>   name?: string | null,
>   team?: string | null,
>   webhook_url?: string | null,
>   use_shared_billing?: boolean | null,
>   domains?: number | null,
>   assigned_domains?: number | null,
>   assignable_domains?: number | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   workspace_type?: string | null
> }[] | null
> ```

***

### update

`workspaces.update`

Rename a workspace and set its webhook URL. That URL can receive mailbox passwords in plaintext, so only point it at an endpoint you control.

**Risk:** `destructive`

```ts theme={null}
await corsair.inboxkit.api.workspaces.update({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `uid` | `string` | Yes | Workspace unique identifier |
| `name` | `string` | Yes | New workspace name |
| `webhook_url` | `string` | Yes | New webhook URL for notifications |

`webhook_url` can receive mailbox passwords in plaintext for this workspace when the team has no team-level URL. Only point it at an endpoint you control, over HTTPS.

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | — |
| `message` | `string \| null` | No | — |

***

### updateWebhook

`workspaces.updateWebhook`

Set a workspace's webhook URL. That URL can receive mailbox passwords in plaintext, so only point it at an endpoint you control.

**Risk:** `destructive`

```ts theme={null}
await corsair.inboxkit.api.workspaces.updateWebhook({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `uid` | `string` | Yes | Workspace unique identifier |
| `webhook_url` | `string` | Yes | New webhook URL for notifications |

This URL can receive mailbox passwords in plaintext for this workspace when the team has no team-level URL. Only point it at an endpoint you control, over HTTPS.

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `boolean \| null` | No | — |
| `message` | `string \| null` | No | — |

***


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.