> ## 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 Instantly: every `instantly.api.*` operation with input and output types.

Every `instantly.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).

## Accounts

### create

`accounts.create`

Connect a sending account with its IMAP and SMTP login (Google and Microsoft OAuth connections are not covered by this plugin). The passwords are sent to Instantly and never logged

**Risk:** `write`

```ts theme={null}
await corsair.instantly.api.accounts.create({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `email` | `string` | Yes | Email address of the account |
| `first_name` | `string` | Yes | First name associated with the account |
| `last_name` | `string` | Yes | Last name associated with the account |
| `warmup` | `object` | No | Warmup configuration for the account |
| `daily_limit` | `number` | No | Daily email sending limit |
| `tracking_domain_name` | `string` | No | Tracking domain |
| `tracking_domain_status` | `string` | No | Tracking domain status |
| `enable_slow_ramp` | `boolean` | No | Whether to enable slow ramp up for sending limits |
| `inbox_placement_test_limit` | `number` | No | The limit for inbox placement tests |
| `provider_code` | `1 \| 2 \| 3 \| 4 \| 8 \| 11` | Yes | Provider code for the account. Please make sure to specify the right provider code, otherwise your account will not work.; 1 Custom IMAP/SMTP, 2 Google, 3 Microsoft, 4 AWS, 8 AirMail, 11 Airmail Instant |
| `sending_gap` | `number` | No | The gap between emails sent from this account in minutes (minimum wait time when used with multiple campaigns) |
| `signature` | `string` | No | Email signature for the account |
| `reply_to` | `string` | No | — |
| `imap_username` | `string` | Yes | — |
| `imap_password` | `string` | Yes | — |
| `imap_host` | `string` | Yes | — |
| `imap_port` | `number` | Yes | — |
| `smtp_username` | `string` | Yes | — |
| `smtp_password` | `string` | Yes | — |
| `smtp_host` | `string` | Yes | — |
| `smtp_port` | `number` | Yes | — |
| `warmup_custom_ftag` | `string` | No | — |
| `skip_cname_check` | `boolean` | No | — |

> **warmup full type**
>
> ```ts theme={null}
> {
>   limit?: number,
>   advanced?: {
>     warm_ctd?: boolean,
>     open_rate?: number,
>     important_rate?: number,
>     read_emulation?: boolean,
>     spam_save_rate?: number,
>     weekday_only?: boolean
>   },
>   warmup_custom_ftag?: string,
>   increment?: 0 | 1 | 2 | 3 | 4 | disabled,
>   reply_rate?: number
> }
> ```

**Output:** `object`

> **Output full type**
>
> ```ts theme={null}
> {
>   email?: string | null,
>   timestamp_created?: string | null,
>   timestamp_updated?: string | null,
>   first_name?: string | null,
>   last_name?: string | null,
>   warmup?: {
>   } | null,
>   added_by?: string | null,
>   daily_limit?: number | null,
>   daily_limit_max?: number | null,
>   warmup_limit_max?: number | null,
>   modified_by?: string | null,
>   tracking_domain_name?: string | null,
>   tracking_domain_status?: string | null,
>   status?: number | null,
>   enable_slow_ramp?: boolean | null,
>   inbox_placement_test_limit?: number | null,
>   organization?: string | null,
>   warmup_status?: number | null,
>   status_message?: {
>   } | null,
>   timestamp_warmup_start?: string | null,
>   provider_code?: number | null,
>   setup_pending?: boolean | null,
>   is_managed_account?: boolean | null,
>   stat_warmup_score?: number | null,
>   sending_gap?: number | null,
>   signature?: string | null,
>   reply_to?: string | null,
>   autofix_failed?: boolean | null
> } | {
>   parse_warning: string
> }
> ```

***

### delete

`accounts.delete`

Remove a sending account from the workspace; it stops sending and warming up

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

```ts theme={null}
await corsair.instantly.api.accounts.delete({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `email` | `string` | Yes | The email of the account to get |

**Output:** `object`

> **Output full type**
>
> ```ts theme={null}
> {
>   email?: string | null,
>   timestamp_created?: string | null,
>   timestamp_updated?: string | null,
>   first_name?: string | null,
>   last_name?: string | null,
>   warmup?: {
>   } | null,
>   added_by?: string | null,
>   daily_limit?: number | null,
>   daily_limit_max?: number | null,
>   warmup_limit_max?: number | null,
>   modified_by?: string | null,
>   tracking_domain_name?: string | null,
>   tracking_domain_status?: string | null,
>   status?: number | null,
>   enable_slow_ramp?: boolean | null,
>   inbox_placement_test_limit?: number | null,
>   organization?: string | null,
>   warmup_status?: number | null,
>   status_message?: {
>   } | null,
>   timestamp_warmup_start?: string | null,
>   provider_code?: number | null,
>   setup_pending?: boolean | null,
>   is_managed_account?: boolean | null,
>   stat_warmup_score?: number | null,
>   sending_gap?: number | null,
>   signature?: string | null,
>   reply_to?: string | null,
>   autofix_failed?: boolean | null
> } | {
>   parse_warning: string
> }
> ```

***

### disableWarmup

`accounts.disableWarmup`

Turn warmup off for up to 100 sending accounts (runs as a background job; returns the job)

**Risk:** `write`

```ts theme={null}
await corsair.instantly.api.accounts.disableWarmup({ emails: ['sam@fieldkit-mail.com'] });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `emails` | `string[]` | Yes | Sending account emails, up to 100 |

**Output:** `object`

> **Output full type**
>
> ```ts theme={null}
> {
>   id: string,
>   type?: string | null,
>   status?: string | null,
>   progress?: number | null,
>   workspace_id?: string | null,
>   created_at?: string | null,
>   updated_at?: string | null
> } | {
>   parse_warning: string
> }
> ```

***

### enableWarmup

`accounts.enableWarmup`

Turn warmup on for up to 100 sending accounts (runs as a background job; returns the job)

**Risk:** `write`

```ts theme={null}
await corsair.instantly.api.accounts.enableWarmup({ emails: ['sam@fieldkit-mail.com'] });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `emails` | `string[]` | Yes | Sending account emails, up to 100 |

**Output:** `object`

> **Output full type**
>
> ```ts theme={null}
> {
>   id: string,
>   type?: string | null,
>   status?: string | null,
>   progress?: number | null,
>   workspace_id?: string | null,
>   created_at?: string | null,
>   updated_at?: string | null
> } | {
>   parse_warning: string
> }
> ```

***

### get

`accounts.get`

Get one sending account by email address

**Risk:** `read`

```ts theme={null}
await corsair.instantly.api.accounts.get({ email: 'sam@fieldkit-mail.com' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `email` | `string` | Yes | Sending account email address |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `email` | `string` | Yes | — |
| `first_name` | `string` | No | — |
| `last_name` | `string` | No | — |
| `organization` | `string` | No | — |
| `status` | `number` | No | 1 Active, 2 Paused, 3 Paused for maintenance, -1 Connection error, -2 Soft bounce error, -3 Sending error |
| `warmup_status` | `number` | No | 0 Paused, 1 Active, -1 Banned, -2 Spam folder unknown, -3 Permanent suspension |
| `provider_code` | `number` | No | 1 IMAP/SMTP, 2 Google, 3 Microsoft, 4 AWS, 8 AirMail, 11 AirMail Instant |
| `daily_limit` | `number` | No | Campaign emails this account sends per day |
| `sending_gap` | `number` | No | Minutes between emails from this account |
| `stat_warmup_score` | `number` | No | — |
| `warmup` | `object` | No | Warmup settings: limit, increment, reply\_rate |
| `status_message` | `object` | No | Last connection or sending error |
| `setup_pending` | `boolean` | No | — |
| `is_managed_account` | `boolean` | No | — |
| `enable_slow_ramp` | `boolean` | No | — |
| `tracking_domain_name` | `string` | No | — |
| `tracking_domain_status` | `string` | No | — |
| `signature` | `string` | No | — |
| `reply_to` | `string` | No | — |
| `timestamp_created` | `string` | No | — |
| `timestamp_updated` | `string` | No | — |
| `timestamp_warmup_start` | `string` | No | — |

> **warmup full type**
>
> ```ts theme={null}
> {
> }
> ```

> **status\_message full type**
>
> ```ts theme={null}
> {
> }
> ```

***

### getDailyAnalytics

`accounts.getDailyAnalytics`

Emails sent per day by each sending account. Pass emails or a short date range: on a large workspace Instantly answers 413 otherwise

**Risk:** `read`

```ts theme={null}
await corsair.instantly.api.accounts.getDailyAnalytics({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `start_date` | `string` | No | Start date for the analytics period. Defaults to a 30-day window ending at end\_date. The maximum range is 31 days. |
| `end_date` | `string` | No | End date for the analytics period. Defaults to the current date. |
| `emails` | `string[]` | No | Email accounts to include. This filter is required and accepts at most 200 unique accounts. |

**Output:** `object[]`

> **Output full type**
>
> ```ts theme={null}
> {
>   date?: string | null,
>   email_account?: string | null,
>   sent?: number | null,
>   bounced?: number | null,
>   contacted?: number | null,
>   new_leads_contacted?: number | null,
>   opened?: number | null,
>   unique_opened?: number | null,
>   replies?: number | null,
>   unique_replies?: number | null,
>   replies_automatic?: number | null,
>   unique_replies_automatic?: number | null,
>   clicks?: number | null,
>   unique_clicks?: number | null
> }[]
> ```

***

### getTrackingDomainStatus

`accounts.getTrackingDomainStatus`

Check a custom tracking domain's DNS setup

**Risk:** `read`

```ts theme={null}
await corsair.instantly.api.accounts.getTrackingDomainStatus({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `host` | `string` | Yes | Custom tracking domain host |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `boolean` | No | — |
| `ssl` | `boolean` | No | — |
| `cname` | `boolean` | No | — |
| `host` | `string` | No | — |

***

### getWarmupAnalytics

`accounts.getWarmupAnalytics`

Get warmup results for up to 100 sending accounts: daily sent, received and landed-in-inbox counts and a 0-100 health score

**Risk:** `read`

```ts theme={null}
await corsair.instantly.api.accounts.getWarmupAnalytics({ emails: ['sam@fieldkit-mail.com'] });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `emails` | `string[]` | Yes | Sending account emails, up to 100 |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `email_date_data` | `object` | No | Per account, per day (YYYY-MM-DD) warmup counts |
| `aggregate_data` | `object` | No | Per account totals and health score |

> **email\_date\_data full type**
>
> ```ts theme={null}
> {
> }
> ```

> **aggregate\_data full type**
>
> ```ts theme={null}
> {
> }
> ```

***

### list

`accounts.list`

List sending accounts (mailboxes) with status, warmup status, daily limit and warmup score; filter by status, provider, tag or search

**Risk:** `read`

```ts theme={null}
await corsair.instantly.api.accounts.list({ filter: 'ACC_FILTER_W_ACTIVE', limit: 50 });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `limit` | `number` | No | Items per page, 1 to 100 |
| `starting_after` | `string` | No | Cursor: `next_starting_after` from the previous page |
| `search` | `string` | No | Match account emails |
| `status` | `1 \| 2 \| 3 \| -1 \| -2 \| -3` | No | 1 Active, 2 Paused, 3 Maintenance, -1 Connection error, -2 Soft bounce error, -3 Sending error |
| `provider_code` | `1 \| 2 \| 3 \| 4 \| 8 \| 11` | No | — |
| `filter` | `ACC_FILTER_PAUSED \| ACC_FILTER_ERROR \| ACC_FILTER_NO_CTD \| ACC_FILTER_PW_ACCOUNTS \| ACC_FILTER_DFY \| ACC_FILTER_DFY_SETUP_PENDING \| ACC_FILTER_W_ACTIVE \| ACC_FILTER_W_PAUSED \| ACC_FILTER_W_ERROR` | No | Paused, has errors, no custom tracking domain, pre-warmed, DFY, DFY setup pending, or warmup active / paused / erroring |
| `tag_ids` | `string[]` | No | Accounts with any of these tag IDs |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[]` | Yes | — |
| `next_starting_after` | `string` | No | Pass as starting\_after to get the next page; absent on the last page |

> **items full type**
>
> ```ts theme={null}
> {
>   email: string,
>   first_name?: string | null,
>   last_name?: string | null,
>   organization?: string | null,
>   status?: number | null,
>   warmup_status?: number | null,
>   provider_code?: number | null,
>   daily_limit?: number | null,
>   sending_gap?: number | null,
>   stat_warmup_score?: number | null,
>   warmup?: {
>   } | null,
>   status_message?: {
>   } | null,
>   setup_pending?: boolean | null,
>   is_managed_account?: boolean | null,
>   enable_slow_ramp?: boolean | null,
>   tracking_domain_name?: string | null,
>   tracking_domain_status?: string | null,
>   signature?: string | null,
>   reply_to?: string | null,
>   timestamp_created?: string | null,
>   timestamp_updated?: string | null,
>   timestamp_warmup_start?: string | null
> }[]
> ```

***

### listCampaigns

`accounts.listCampaigns`

List the campaigns a sending account sends for

**Risk:** `read`

```ts theme={null}
await corsair.instantly.api.accounts.listCampaigns({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `email` | `string` | Yes | Email |
| `limit` | `number` | No | — |
| `starting_after` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[]` | Yes | — |
| `next_starting_after` | `string` | No | Pass as starting\_after to get the next page; absent on the last page |

> **items full type**
>
> ```ts theme={null}
> {
>   campaign_id?: string | null,
>   campaign_name?: string | null,
>   timestamp_created?: string | null,
>   status?: number | null
> }[]
> ```

***

### markFixed

`accounts.markFixed`

Set a sending account back to active and clear its error message, after fixing its connection

**Risk:** `write`

```ts theme={null}
await corsair.instantly.api.accounts.markFixed({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `email` | `string` | Yes | Account email |

**Output:** `object`

> **Output full type**
>
> ```ts theme={null}
> {
>   email?: string | null,
>   timestamp_created?: string | null,
>   timestamp_updated?: string | null,
>   first_name?: string | null,
>   last_name?: string | null,
>   warmup?: {
>   } | null,
>   added_by?: string | null,
>   daily_limit?: number | null,
>   daily_limit_max?: number | null,
>   warmup_limit_max?: number | null,
>   modified_by?: string | null,
>   tracking_domain_name?: string | null,
>   tracking_domain_status?: string | null,
>   status?: number | null,
>   enable_slow_ramp?: boolean | null,
>   inbox_placement_test_limit?: number | null,
>   organization?: string | null,
>   warmup_status?: number | null,
>   status_message?: {
>   } | null,
>   timestamp_warmup_start?: string | null,
>   provider_code?: number | null,
>   setup_pending?: boolean | null,
>   is_managed_account?: boolean | null,
>   stat_warmup_score?: number | null,
>   sending_gap?: number | null,
>   signature?: string | null,
>   reply_to?: string | null,
>   autofix_failed?: boolean | null
> } | {
>   parse_warning: string
> }
> ```

***

### moveToWorkspace

`accounts.moveToWorkspace`

Move sending accounts to another workspace in the same workspace group. Needs the admin workspace's API key

**Risk:** `write`

```ts theme={null}
await corsair.instantly.api.accounts.moveToWorkspace({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `emails` | `string[]` | Yes | Array of email addresses of the accounts to move |
| `source_workspace_id` | `string` | Yes | ID of the source workspace (the workspace that the accounts are currently in) |
| `destination_workspace_id` | `string` | Yes | ID of the destination workspace (the workspace that the accounts will be moved to) |

**Output:** `object`

> **Output full type**
>
> ```ts theme={null}
> {
>   status?: string | null
> } | {
>   parse_warning: string
> }
> ```

***

### pause

`accounts.pause`

Pause a sending account: it stops sending campaign emails until resumed

**Risk:** `write`

```ts theme={null}
await corsair.instantly.api.accounts.pause({ email: 'sam@fieldkit-mail.com' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `email` | `string` | Yes | Sending account email address |

**Output:** `object`

> **Output full type**
>
> ```ts theme={null}
> {
>   email: string,
>   first_name?: string | null,
>   last_name?: string | null,
>   organization?: string | null,
>   status?: number | null,
>   warmup_status?: number | null,
>   provider_code?: number | null,
>   daily_limit?: number | null,
>   sending_gap?: number | null,
>   stat_warmup_score?: number | null,
>   warmup?: {
>   } | null,
>   status_message?: {
>   } | null,
>   setup_pending?: boolean | null,
>   is_managed_account?: boolean | null,
>   enable_slow_ramp?: boolean | null,
>   tracking_domain_name?: string | null,
>   tracking_domain_status?: string | null,
>   signature?: string | null,
>   reply_to?: string | null,
>   timestamp_created?: string | null,
>   timestamp_updated?: string | null,
>   timestamp_warmup_start?: string | null
> } | {
>   parse_warning: string
> }
> ```

***

### pauseMany

`accounts.pauseMany`

Pause up to 100 sending accounts at once; returns which were paused and which failed

**Risk:** `write`

```ts theme={null}
await corsair.instantly.api.accounts.pauseMany({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `emails` | `string[]` | Yes | Email addresses to pause. Duplicate values are ignored. |

**Output:** `object`

> **Output full type**
>
> ```ts theme={null}
> {
>   paused_emails?: string[] | null,
>   failed_emails?: string[] | null
> } | {
>   parse_warning: string
> }
> ```

***

### resume

`accounts.resume`

Resume a paused sending account so it sends campaign emails again

**Risk:** `write`

```ts theme={null}
await corsair.instantly.api.accounts.resume({ email: 'sam@fieldkit-mail.com' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `email` | `string` | Yes | Sending account email address |

**Output:** `object`

> **Output full type**
>
> ```ts theme={null}
> {
>   email: string,
>   first_name?: string | null,
>   last_name?: string | null,
>   organization?: string | null,
>   status?: number | null,
>   warmup_status?: number | null,
>   provider_code?: number | null,
>   daily_limit?: number | null,
>   sending_gap?: number | null,
>   stat_warmup_score?: number | null,
>   warmup?: {
>   } | null,
>   status_message?: {
>   } | null,
>   setup_pending?: boolean | null,
>   is_managed_account?: boolean | null,
>   enable_slow_ramp?: boolean | null,
>   tracking_domain_name?: string | null,
>   tracking_domain_status?: string | null,
>   signature?: string | null,
>   reply_to?: string | null,
>   timestamp_created?: string | null,
>   timestamp_updated?: string | null,
>   timestamp_warmup_start?: string | null
> } | {
>   parse_warning: string
> }
> ```

***

### testVitals

`accounts.testVitals`

Check the health ("vitals") of sending accounts' domains; changes nothing

**Risk:** `read`

```ts theme={null}
await corsair.instantly.api.accounts.testVitals({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accounts` | `string[]` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `status` | `string` | No | — |
| `success_list` | `any[]` | No | — |
| `failure_list` | `any[]` | No | — |

***

### update

`accounts.update`

Change a sending account's name, daily limit, sending gap, signature, reply-to, tracking domain or warmup settings

**Risk:** `write`

```ts theme={null}
await corsair.instantly.api.accounts.update({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `email` | `string` | Yes | The email of the account to update |
| `first_name` | `string` | No | First name associated with the account |
| `last_name` | `string` | No | Last name associated with the account |
| `warmup` | `object` | No | Warmup configuration for the account |
| `daily_limit` | `number` | No | Daily email sending limit |
| `tracking_domain_name` | `string` | No | Tracking domain |
| `tracking_domain_status` | `string` | No | Tracking domain status |
| `enable_slow_ramp` | `boolean` | No | Whether to enable slow ramp up for sending limits |
| `inbox_placement_test_limit` | `number` | No | The limit for inbox placement tests |
| `sending_gap` | `number` | No | The gap between emails sent from this account in minutes (minimum wait time when used with multiple campaigns) |
| `signature` | `string` | No | Email signature for the account |
| `reply_to` | `string` | No | Custom reply-to email address for the account |
| `skip_cname_check` | `boolean` | No | — |
| `remove_tracking_domain` | `boolean` | No | — |

> **warmup full type**
>
> ```ts theme={null}
> {
>   limit?: number,
>   advanced?: {
>     warm_ctd?: boolean,
>     open_rate?: number,
>     important_rate?: number,
>     read_emulation?: boolean,
>     spam_save_rate?: number,
>     weekday_only?: boolean
>   },
>   warmup_custom_ftag?: string,
>   increment?: 0 | 1 | 2 | 3 | 4 | disabled,
>   reply_rate?: number
> }
> ```

**Output:** `object`

> **Output full type**
>
> ```ts theme={null}
> {
>   email?: string | null,
>   timestamp_created?: string | null,
>   timestamp_updated?: string | null,
>   first_name?: string | null,
>   last_name?: string | null,
>   warmup?: {
>   } | null,
>   added_by?: string | null,
>   daily_limit?: number | null,
>   daily_limit_max?: number | null,
>   warmup_limit_max?: number | null,
>   modified_by?: string | null,
>   tracking_domain_name?: string | null,
>   tracking_domain_status?: string | null,
>   status?: number | null,
>   enable_slow_ramp?: boolean | null,
>   inbox_placement_test_limit?: number | null,
>   organization?: string | null,
>   warmup_status?: number | null,
>   status_message?: {
>   } | null,
>   timestamp_warmup_start?: string | null,
>   provider_code?: number | null,
>   setup_pending?: boolean | null,
>   is_managed_account?: boolean | null,
>   stat_warmup_score?: number | null,
>   sending_gap?: number | null,
>   signature?: string | null,
>   reply_to?: string | null,
>   autofix_failed?: boolean | null
> } | {
>   parse_warning: string
> }
> ```

***

## Api Keys

### create

`apiKeys.create`

Create an API key with the given scopes. The response holds the key itself, the only time it is returned in full

**Risk:** `write`

```ts theme={null}
await corsair.instantly.api.apiKeys.create({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | — |
| `scopes` | `all:all \| all:create \| all:read \| all:update \| all:delete \| ai_agents:all \| ai_agents:create \| ai_agents:read \| ai_agents:update \| ai_agents:delete \| api_keys:all \| api_keys:create \| api_keys:read \| api_keys:update \| api_keys:delete \| audit_logs:all \| audit_logs:create \| audit_logs:read \| audit_logs:update \| audit_logs:delete \| custom_prompt_templates:all \| custom_prompt_templates:create \| custom_prompt_templates:read \| custom_prompt_templates:update \| custom_prompt_templates:delete \| account_campaign_mappings:all \| account_campaign_mappings:create \| account_campaign_mappings:read \| account_campaign_mappings:update \| account_campaign_mappings:delete \| campaigns:all \| campaigns:create \| campaigns:read \| campaigns:update \| campaigns:delete \| inbox_placement_tests:all \| inbox_placement_tests:create \| inbox_placement_tests:read \| inbox_placement_tests:update \| inbox_placement_tests:delete \| inbox_placement_analytics:all \| inbox_placement_analytics:create \| inbox_placement_analytics:read \| inbox_placement_analytics:update \| inbox_placement_analytics:delete \| inbox_placement_reports:all \| inbox_placement_reports:create \| inbox_placement_reports:read \| inbox_placement_reports:update \| inbox_placement_reports:delete \| lead_lists:all \| lead_lists:create \| lead_lists:read \| lead_lists:update \| lead_lists:delete \| leads:all \| leads:create \| leads:read \| leads:update \| leads:delete \| background-jobs:all \| background-jobs:create \| background-jobs:read \| background-jobs:update \| background-jobs:delete \| custom_tags:all \| custom_tags:create \| custom_tags:read \| custom_tags:update \| custom_tags:delete \| custom_tag_mappings:all \| custom_tag_mappings:create \| custom_tag_mappings:read \| custom_tag_mappings:update \| custom_tag_mappings:delete \| crm_actions:all \| crm_actions:create \| crm_actions:read \| crm_actions:update \| crm_actions:delete \| accounts:all \| accounts:create \| accounts:read \| accounts:update \| accounts:delete \| block_list_entries:all \| block_list_entries:create \| block_list_entries:read \| block_list_entries:update \| block_list_entries:delete \| lead-labels:all \| lead-labels:create \| lead-labels:read \| lead-labels:update \| lead-labels:delete \| email_verifications:all \| email_verifications:create \| email_verifications:read \| emails:all \| emails:create \| emails:read \| emails:update \| emails:delete \| email_templates:all \| email_templates:create \| email_templates:read \| email_templates:update \| email_templates:delete \| workspaces:all \| workspaces:create \| workspaces:read \| workspaces:update \| workspaces:delete \| workspace_billing:all \| workspace_billing:create \| workspace_billing:read \| workspace_billing:update \| workspace_billing:delete \| workspace_group_members:all \| workspace_group_members:create \| workspace_group_members:read \| workspace_group_members:update \| workspace_group_members:delete \| workspace_members:all \| workspace_members:create \| workspace_members:read \| workspace_members:update \| workspace_members:delete \| subsequences:all \| subsequences:create \| subsequences:read \| subsequences:update \| subsequences:delete \| supersearch_enrichments:all \| supersearch_enrichments:create \| supersearch_enrichments:read \| supersearch_enrichments:update \| supersearch_enrichments:delete \| ai_sdr:all \| ai_sdr:create \| ai_sdr:read \| ai_sdr:update \| ai_sdr:delete \| ai_sdr_replies:all \| ai_sdr_replies:create \| ai_sdr_replies:read \| ai_sdr_replies:update \| ai_sdr_replies:delete \| ai_inbox_manager_analytics:all \| ai_inbox_manager_analytics:create \| ai_inbox_manager_analytics:read \| ai_inbox_manager_analytics:update \| ai_inbox_manager_analytics:delete \| sales_flows:all \| sales_flows:create \| sales_flows:read \| sales_flows:update \| sales_flows:delete \| webhooks:all \| webhooks:create \| webhooks:read \| webhooks:update \| webhooks:delete \| webhook_events:all \| webhook_events:create \| webhook_events:read \| webhook_events:update \| webhook_events:delete \| email_marketing_events:all \| email_marketing_events:create \| email_marketing_events:read \| security_tokens:all \| security_tokens:create \| security_tokens:read \| security_tokens:update \| security_tokens:delete \| dfy_email_account_orders:all \| dfy_email_account_orders:create \| dfy_email_account_orders:read \| dfy_email_account_orders:update \| dfy_email_account_orders:delete \| auth:all \| auth:create \| auth:read \| auth:update \| auth:delete[]` | Yes | — |

**Output:** `object`

> **Output full type**
>
> ```ts theme={null}
> {
>   id?: string | null,
>   name?: string | null,
>   scopes?: string[] | null,
>   key?: string | null,
>   organization_id?: string | null,
>   timestamp_created?: string | null,
>   timestamp_updated?: string | null
> } | {
>   parse_warning: string
> }
> ```

***

### delete

`apiKeys.delete`

Revoke an API key; anything using it stops working

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

```ts theme={null}
await corsair.instantly.api.apiKeys.delete({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | The ID of the item to delete |

**Output:** `object`

> **Output full type**
>
> ```ts theme={null}
> {
>   id?: string | null,
>   name?: string | null,
>   scopes?: string[] | null,
>   key?: string | null,
>   organization_id?: string | null,
>   timestamp_created?: string | null,
>   timestamp_updated?: string | null
> } | {
>   parse_warning: string
> }
> ```

***

### list

`apiKeys.list`

List the workspace's API keys with their scopes (key values redacted)

**Risk:** `read`

```ts theme={null}
await corsair.instantly.api.apiKeys.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `limit` | `number` | No | The number of items to return |
| `starting_after` | `string` | No | The ID of the last item in the previous page - used for pagination. You can use the value of the `next_starting_after` field from the previous response. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[]` | Yes | — |
| `next_starting_after` | `string` | No | Pass as starting\_after to get the next page; absent on the last page |

> **items full type**
>
> ```ts theme={null}
> {
>   id?: string | null,
>   name?: string | null,
>   scopes?: string[] | null,
>   key?: string | null,
>   organization_id?: string | null,
>   timestamp_created?: string | null,
>   timestamp_updated?: string | null
> }[]
> ```

***

## Audit Logs

### list

`auditLogs.list`

List audit log records (who did what, when); filter by activity type, search or date

**Risk:** `read`

```ts theme={null}
await corsair.instantly.api.auditLogs.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `limit` | `number` | No | The number of items to return |
| `starting_after` | `string` | No | The ID of the last item in the previous page - used for pagination. You can use the value of the `next_starting_after` field from the previous response. |
| `activity_type` | `number` | No | Filter by activity type |
| `search` | `string` | No | Search term to filter logs |
| `start_date` | `string` | No | Start date to filter logs |
| `end_date` | `string` | No | End date to filter logs |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[]` | Yes | — |
| `next_starting_after` | `string` | No | Pass as starting\_after to get the next page; absent on the last page |

> **items full type**
>
> ```ts theme={null}
> {
>   id?: string | null,
>   timestamp?: string | null,
>   organization_id?: string | null,
>   activity_type?: number | null,
>   user_agent?: string | null,
>   user_id?: string | null,
>   ip_address?: string | null,
>   from_api?: boolean | null,
>   api_key_id?: string | null,
>   affected_count?: number | null,
>   campaign_id?: string | null,
>   webhook_id?: string | null,
>   subsequence_id?: string | null,
>   list_id?: string | null,
>   audit_metadata?: {
>   } | null,
>   user_name?: string | null
> }[]
> ```

***

## Background Jobs

### get

`backgroundJobs.get`

Get one background job, e.g. the one leads.move or accounts.enableWarmup returned

**Risk:** `read`

```ts theme={null}
await corsair.instantly.api.backgroundJobs.get({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | The ID of the requested item |
| `data_fields` | `string` | No | Comma-separated list of fields to include from the `data` object (e.g., "success\_count,failed\_count" or "moved\_lead\_emails,moved\_leads"). For `move-leads` jobs, `moved_lead_emails` is capped at 10,000 entries. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | No | Unique identifier for the background job |
| `workspace_id` | `string` | No | Workspace ID |
| `user_id` | `string` | No | The id of the user that triggered the action that created the job |
| `type` | `string` | No | Type of background job; move-leads Move Leads, import-leads Import Leads, export-leads Export Leads, update-warmup-accounts Update Warmup Accounts, rename-variable Rename Variable, broadcast-ai-generate AI broadcast generati |
| `entity_id` | `string` | No | The id of the entity that the job is related to |
| `entity_type` | `string` | No | Type of entity; list The entity is a lead list, campaign The entity is a campaign, workspace The entity is a workspace, broadcast The entity is an email-marketing broadcast, subscriber-group-sync The entity is a subs |
| `data` | `object` | No | Data about the job, used to store any additional information we need to process the job |
| `progress` | `number` | No | Progress of the job as a percentage (from 0 to 100) |
| `status` | `string` | No | Job status; pending The background job is waiting in the queue to be processed, in-progress The background job is being processed, success The background job has been successfully processed, failed The background |
| `created_at` | `string` | No | Timestamp when the job was created |
| `updated_at` | `string` | No | Timestamp when the job was last updated |

> **data full type**
>
> ```ts theme={null}
> {
> }
> ```

***

### list

`backgroundJobs.list`

List background jobs (lead moves, imports, warmup changes) with status and progress

**Risk:** `read`

```ts theme={null}
await corsair.instantly.api.backgroundJobs.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `limit` | `number` | No | The number of items to return |
| `starting_after` | `string` | No | — |
| `ids` | `string` | No | The ID of the job. Multiple IDs can be provided as a comma-separated list |
| `included_ids` | `string` | No | The ID of the job to be included in the response. Multiple IDs can be provided as a comma-separated list |
| `excluded_ids` | `string` | No | The ID of the job to be excluded from the response. Multiple IDs can be provided as a comma-separated list |
| `type` | `move-leads \| import-leads \| export-leads \| update-warmup-accounts \| rename-variable \| broadcast-ai-generate \| broadcast-website-scrape \| import-subscribers-from-crm \| resync-subscriber-crm-tags \| journey-ai-build \| delete-leads` | No | The type of the job |
| `entity_type` | `list \| campaign \| workspace \| broadcast \| subscriber-group-sync \| subscriber-group \| journey` | No | The type of the entity |
| `entity_id` | `string` | No | The ID of the entity. Multiple IDs can be provided as a comma-separated list |
| `status` | `string` | No | The status of the job. Multiple statuses can be provided as a comma-separated list. Valid statuses are: pending, in-progress, success, failed, draining, paused, cancelled |
| `sort_column` | `created_at \| updated_at` | No | The column to sort the results by; created\_at Created at, updated\_at Updated at |
| `sort_order` | `asc \| desc` | No | The order to sort the results by; asc Ascending, desc Descending |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[]` | Yes | — |
| `next_starting_after` | `string` | No | Pass as starting\_after to get the next page; absent on the last page |

> **items full type**
>
> ```ts theme={null}
> {
>   id?: string | null,
>   workspace_id?: string | null,
>   user_id?: string | null,
>   type?: string | null,
>   entity_id?: string | null,
>   entity_type?: string | null,
>   data?: {
>   } | null,
>   progress?: number | null,
>   status?: string | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[]
> ```

***

## Billing

### getPlanDetails

`billing.getPlanDetails`

Get the workspace's plans and their limits

**Risk:** `read`

```ts theme={null}
await corsair.instantly.api.billing.getPlanDetails({});
```

**Input:** *empty object*

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `organization_id` | `string` | No | The id of workspace |
| `organization_name` | `string` | No | The name of workspace |
| `subscriptions` | `object` | No | — |
| `addons` | `object` | No | — |

> **subscriptions full type**
>
> ```ts theme={null}
> {
> }
> ```

> **addons full type**
>
> ```ts theme={null}
> {
> }
> ```

***

### getSubscriptionDetails

`billing.getSubscriptionDetails`

Get the workspace's subscriptions and billing state

**Risk:** `read`

```ts theme={null}
await corsair.instantly.api.billing.getSubscriptionDetails({});
```

**Input:** *empty object*

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `subscriptions` | `any[]` | No | — |
| `all_subs_cancelled` | `boolean` | No | Indicates whether all subscriptions are either already canceled or scheduled to be canceled at the end of their current billing cycles |

***

## Blocklist

### add

`blocklist.add`

Block an email ([jane@acme.com](mailto:jane@acme.com)) or a whole domain (acme.com) from every campaign

**Risk:** `write`

```ts theme={null}
await corsair.instantly.api.blocklist.add({ bl_value: 'competitor.com' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `bl_value` | `string` | Yes | Email ([jane@acme.com](mailto:jane@acme.com)) or domain (acme.com) to block |

**Output:** `object`

> **Output full type**
>
> ```ts theme={null}
> {
>   id: string,
>   bl_value?: string | null,
>   is_domain?: boolean | null,
>   organization_id?: string | null,
>   timestamp_created?: string | null
> } | {
>   parse_warning: string
> }
> ```

***

### addMany

`blocklist.addMany`

Block many emails and domains at once

**Risk:** `write`

```ts theme={null}
await corsair.instantly.api.blocklist.addMany({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `bl_values` | `string[]` | Yes | List of domains or emails to block |

**Output:** `object`

> **Output full type**
>
> ```ts theme={null}
> {
>   items: {
>     id?: string | null,
>     timestamp_created?: string | null,
>     organization_id?: string | null,
>     bl_value?: string | null,
>     is_domain?: boolean | null
>   }[],
>   next_starting_after?: string | null
> } | {
>   parse_warning: string
> }
> ```

***

### deleteAll

`blocklist.deleteAll`

Delete EVERY blocklist entry (or every domain entry, or every entry matching search). Campaigns can then email those addresses again

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

```ts theme={null}
await corsair.instantly.api.blocklist.deleteAll({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `domains_only` | `boolean` | No | Filter by domain |
| `search` | `string` | No | Search by value |

**Output:** `object`

> **Output full type**
>
> ```ts theme={null}
> {
>   id?: string | null,
>   timestamp_created?: string | null,
>   organization_id?: string | null,
>   bl_value?: string | null,
>   is_domain?: boolean | null
> }[] | {
>   parse_warning: string
> }
> ```

***

### downloadCsv

`blocklist.downloadCsv`

Download the blocklist as CSV text

**Risk:** `read`

```ts theme={null}
await corsair.instantly.api.blocklist.downloadCsv({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `domains_only` | `boolean` | No | Filter by domain |
| `search` | `string` | No | Search by value |

**Output:** `string`

***

### get

`blocklist.get`

Get one blocklist entry by ID

**Risk:** `read`

```ts theme={null}
await corsair.instantly.api.blocklist.get({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | The ID of the requested item |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | No | Unique identifier for the block list entry |
| `timestamp_created` | `string` | No | Timestamp when the block list entry was created |
| `organization_id` | `string` | No | Organization ID that owns this block list entry |
| `bl_value` | `string` | No | The email or domain to block |
| `is_domain` | `boolean` | No | Whether this entry blocks an entire domain |

***

### list

`blocklist.list`

List blocked emails and domains

**Risk:** `read`

```ts theme={null}
await corsair.instantly.api.blocklist.list({ domains_only: true });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `limit` | `number` | No | Items per page, 1 to 100 |
| `starting_after` | `string` | No | Cursor: `next_starting_after` from the previous page |
| `search` | `string` | No | — |
| `domains_only` | `boolean` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[]` | Yes | — |
| `next_starting_after` | `string` | No | Pass as starting\_after to get the next page; absent on the last page |

> **items full type**
>
> ```ts theme={null}
> {
>   id: string,
>   bl_value?: string | null,
>   is_domain?: boolean | null,
>   organization_id?: string | null,
>   timestamp_created?: string | null
> }[]
> ```

***

### remove

`blocklist.remove`

Remove a blocklist entry, so campaigns can email that address or domain again

**Risk:** `destructive`

```ts theme={null}
await corsair.instantly.api.blocklist.remove({ id: '01a181d1-c62c-745b-b842-8710aa4f2e01' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | Blocklist entry ID (UUID) |

**Output:** `object`

> **Output full type**
>
> ```ts theme={null}
> {
>   id?: string,
>   bl_value?: string | null,
>   is_domain?: boolean | null,
>   organization_id?: string | null,
>   timestamp_created?: string | null
> } | {
>   parse_warning: string
> }
> ```

***

### removeMany

`blocklist.removeMany`

Remove blocklist entries by ID, so campaigns can email those addresses again

**Risk:** `destructive`

```ts theme={null}
await corsair.instantly.api.blocklist.removeMany({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `ids` | `string[]` | Yes | List block list entry ids to delete |

**Output:** `object`

> **Output full type**
>
> ```ts theme={null}
> {
>   id?: string | null,
>   timestamp_created?: string | null,
>   organization_id?: string | null,
>   bl_value?: string | null,
>   is_domain?: boolean | null
> }[] | {
>   parse_warning: string
> }
> ```

***

### update

`blocklist.update`

Change the email or domain a blocklist entry blocks

**Risk:** `write`

```ts theme={null}
await corsair.instantly.api.blocklist.update({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | The ID of the item to update |
| `bl_value` | `string` | No | The email or domain to block |

**Output:** `object`

> **Output full type**
>
> ```ts theme={null}
> {
>   id?: string | null,
>   timestamp_created?: string | null,
>   organization_id?: string | null,
>   bl_value?: string | null,
>   is_domain?: boolean | null
> } | {
>   parse_warning: string
> }
> ```

***

## Campaigns

### activate

`campaigns.activate`

Start or resume a campaign. This SENDS REAL EMAIL to the campaign's leads from the connected accounts, on its schedule

**Risk:** `write`

```ts theme={null}
await corsair.instantly.api.campaigns.activate({ id: '01a181d1-c62c-745b-b842-870ce5b29862' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | Campaign ID (UUID) |

**Output:** `object`

> **Output full type**
>
> ```ts theme={null}
> {
>   id: string,
>   name?: string | null,
>   status?: number | null,
>   not_sending_status?: number | null,
>   campaign_schedule?: {
>   } | null,
>   sequences?: any[] | null,
>   email_list?: string[] | null,
>   email_tag_list?: string[] | null,
>   daily_limit?: number | null,
>   daily_max_leads?: number | null,
>   email_gap?: number | null,
>   random_wait_max?: number | null,
>   stop_on_reply?: boolean | null,
>   stop_on_auto_reply?: boolean | null,
>   stop_for_company?: boolean | null,
>   text_only?: boolean | null,
>   first_email_text_only?: boolean | null,
>   link_tracking?: boolean | null,
>   open_tracking?: boolean | null,
>   is_evergreen?: boolean | null,
>   pl_value?: number | null,
>   organization?: string | null,
>   timestamp_created?: string | null,
>   timestamp_updated?: string | null
> } | {
>   parse_warning: string
> }
> ```

***

### addVariables

`campaigns.addVariables`

Add custom variable names to a campaign, for use as `{{variable}}` in its copy

**Risk:** `write`

```ts theme={null}
await corsair.instantly.api.campaigns.addVariables({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | Campaign ID |
| `variables` | `string[]` | Yes | — |

**Output:** `object`

> **Output full type**
>
> ```ts theme={null}
> {
>   id?: string | null,
>   name?: string | null,
>   pl_value?: number | null,
>   status?: number | null,
>   is_evergreen?: boolean | null,
>   campaign_schedule?: {
>   } | null,
>   sequences?: any[] | null,
>   timestamp_created?: string | null,
>   timestamp_updated?: string | null,
>   email_gap?: number | null,
>   random_wait_max?: number | null,
>   text_only?: boolean | null,
>   first_email_text_only?: boolean | null,
>   email_list?: string[] | null,
>   daily_limit?: number | null,
>   stop_on_reply?: boolean | null,
>   email_tag_list?: string[] | null,
>   link_tracking?: boolean | null,
>   open_tracking?: boolean | null,
>   stop_on_auto_reply?: boolean | null,
>   daily_max_leads?: number | null,
>   prioritize_new_leads?: boolean | null,
>   auto_variant_select?: {
>   } | null,
>   match_lead_esp?: boolean | null,
>   not_sending_status?: number | null,
>   stop_for_company?: boolean | null,
>   core_variables?: {
>   } | null,
>   custom_variables?: {
>   } | null,
>   insert_unsubscribe_header?: boolean | null,
>   allow_risky_contacts?: boolean | null,
>   disable_bounce_protect?: boolean | null,
>   limit_emails_per_company_override?: {
>   } | null,
>   cc_list?: string[] | null,
>   bcc_list?: string[] | null,
>   organization?: string | null,
>   owned_by?: string | null,
>   created_by?: string | null,
>   ai_sdr_id?: string | null,
>   provider_routing_rules?: any[] | null
> } | {
>   parse_warning: string
> }
> ```

***

### countLaunched

`campaigns.countLaunched`

Count the campaigns ever launched in the workspace

**Risk:** `read`

```ts theme={null}
await corsair.instantly.api.campaigns.countLaunched({});
```

**Input:** *empty object*

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `count` | `number` | No | — |

***

### create

`campaigns.create`

Create a campaign as a draft: schedule, one sequence of email steps with A/B variants, sending accounts, daily limit and stop rules (stop\_on\_reply, stop\_for\_company). Sends nothing until campaigns.activate

**Risk:** `write`

```ts theme={null}
await corsair.instantly.api.campaigns.create({
  name: 'Northeast IT leads',
  campaign_schedule: {
    schedules: [{
      name: 'Weekdays',
      timing: { from: '09:00', to: '17:00' },
      days: { '1': true, '2': true, '3': true, '4': true, '5': true },
      timezone: 'America/Detroit',
    }],
  },
  sequences: [{
    steps: [
      { delay: 3, variants: [{ subject: 'Quick question, {{firstName}}', body: 'Hi {{firstName}},<br/><br/>{{personalization}}' }] },
      { delay: 0, variants: [{ subject: '', body: 'Following up, {{firstName}}.' }] },
    ],
  }],
  email_list: ['sam@fieldkit-mail.com'],
  daily_limit: 30,
  stop_on_reply: true,
  stop_for_company: true,
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | — |
| `campaign_schedule` | `object` | Yes | — |
| `sequences` | `object[]` | No | Exactly one sequence holding every step: Instantly reads only the first element |
| `email_list` | `string[]` | No | Sending account emails to rotate through |
| `email_tag_list` | `string[]` | No | Account tag IDs whose accounts send for this campaign |
| `daily_limit` | `number` | No | Most emails the campaign sends per day |
| `daily_max_leads` | `number` | No | Most new leads contacted per day |
| `email_gap` | `number` | No | Minutes between emails |
| `random_wait_max` | `number` | No | Extra random wait, in minutes, up to this |
| `stop_on_reply` | `boolean` | No | Stop the sequence for a lead once they reply |
| `stop_on_auto_reply` | `boolean` | No | Also stop on auto-replies such as out-of-office |
| `stop_for_company` | `boolean` | No | Stop the sequence for every lead at the same company (domain) when one replies |
| `text_only` | `boolean` | No | Send every email as plain text |
| `first_email_text_only` | `boolean` | No | Send only the first email as plain text |
| `link_tracking` | `boolean` | No | — |
| `open_tracking` | `boolean` | No | — |
| `insert_unsubscribe_header` | `boolean` | No | — |
| `prioritize_new_leads` | `boolean` | No | — |
| `match_lead_esp` | `boolean` | No | Send from accounts on the lead's email provider |
| `allow_risky_contacts` | `boolean` | No | — |
| `disable_bounce_protect` | `boolean` | No | — |
| `is_evergreen` | `boolean` | No | — |
| `pl_value` | `number` | No | Value of each positive lead |
| `cc_list` | `string[]` | No | — |
| `bcc_list` | `string[]` | No | — |
| `auto_variant_select` | `object` | No | Pick the winning A/B variant automatically by this metric |

> **campaign\_schedule full type**
>
> ```ts theme={null}
> {
>   schedules: {
>     name: string,
>     timing: {
>       from: string,
>       to: string
>     },
>     days: {
>       0?: boolean,
>       1?: boolean,
>       2?: boolean,
>       3?: boolean,
>       4?: boolean,
>       5?: boolean,
>       6?: boolean
>     },
>     timezone: Etc/GMT+12 | Etc/GMT+11 | Etc/GMT+10 | America/Anchorage | America/Dawson | America/Creston | America/Chihuahua | America/Boise | America/Belize | America/Chicago | America/Bahia_Banderas | America/Regina | America/Bogota | America/Detroit | America/Indiana/Marengo | America/Caracas | America/Asuncion | America/Glace_Bay | America/Campo_Grande | America/Anguilla | America/Santiago | America/St_Johns | America/Sao_Paulo | America/Argentina/La_Rioja | America/Araguaina | America/Godthab | America/Montevideo | America/Bahia | America/Noronha | America/Scoresbysund | Atlantic/Cape_Verde | Africa/Casablanca | America/Danmarkshavn | Europe/Isle_of_Man | Atlantic/Canary | Africa/Abidjan | Arctic/Longyearbyen | Europe/Belgrade | Africa/Ceuta | Europe/Sarajevo | Africa/Algiers | Africa/Windhoek | Asia/Nicosia | Asia/Beirut | Africa/Cairo | Asia/Damascus | Europe/Bucharest | Africa/Blantyre | Europe/Helsinki | Europe/Istanbul | Asia/Jerusalem | Africa/Tripoli | Asia/Amman | Asia/Baghdad | Europe/Kaliningrad | Asia/Aden | Africa/Addis_Ababa | Europe/Kirov | Europe/Astrakhan | Asia/Tehran | Asia/Dubai | Asia/Baku | Indian/Mahe | Asia/Tbilisi | Asia/Yerevan | Asia/Kabul | Antarctica/Mawson | Asia/Yekaterinburg | Asia/Karachi | Asia/Kolkata | Asia/Colombo | Asia/Kathmandu | Antarctica/Vostok | Asia/Dhaka | Asia/Rangoon | Antarctica/Davis | Asia/Novokuznetsk | Asia/Hong_Kong | Asia/Krasnoyarsk | Asia/Brunei | Australia/Perth | Asia/Taipei | Asia/Choibalsan | Asia/Irkutsk | Asia/Dili | Asia/Pyongyang | Australia/Adelaide | Australia/Darwin | Australia/Brisbane | Australia/Melbourne | Antarctica/DumontDUrville | Australia/Currie | Asia/Chita | Antarctica/Macquarie | Asia/Sakhalin | Pacific/Auckland | Etc/GMT-12 | Pacific/Fiji | Asia/Anadyr | Asia/Kamchatka | Etc/GMT-13 | Pacific/Apia | America/New_York | US/Eastern | America/Indiana/Indianapolis | America/Kentucky/Louisville | US/Central | America/Denver | US/Mountain | America/Phoenix | US/Arizona | US/Alaska | Pacific/Honolulu | US/Hawaii | America/Mexico_City | America/Lima | America/Argentina/Buenos_Aires | Europe/London | Europe/Dublin | Europe/Lisbon | Europe/Paris | Europe/Berlin | Europe/Madrid | Europe/Rome | Europe/Amsterdam | Europe/Brussels | Europe/Vienna | Europe/Zurich | Europe/Stockholm | Europe/Oslo | Europe/Copenhagen | Europe/Prague | Europe/Warsaw | Europe/Budapest | Europe/Athens | Europe/Kyiv | Europe/Kiev | Europe/Riga | Europe/Sofia | Europe/Moscow | Asia/Riyadh | Asia/Qatar | Asia/Kuwait | Asia/Tel_Aviv | Africa/Nairobi | Africa/Lagos | Africa/Johannesburg | Asia/Calcutta | Asia/Yangon | Asia/Bangkok | Asia/Jakarta | Asia/Ho_Chi_Minh | Asia/Singapore | Asia/Kuala_Lumpur | Asia/Shanghai | Asia/Manila | Asia/Tokyo | Asia/Seoul | Australia/Sydney | Australia/Canberra | Australia/Hobart | UTC | Etc/UTC | GMT | Etc/GMT
>   }[],
>   start_date?: string | null,
>   end_date?: string | null
> }
> ```

> **sequences full type**
>
> ```ts theme={null}
> {
>   steps: {
>     type: email,
>     delay: number,
>     delay_unit?: minutes | hours | days,
>     pre_delay?: number,
>     pre_delay_unit?: minutes | hours | days,
>     variants: {
>       subject: string,
>       body: string,
>       v_disabled?: boolean
>     }[]
>   }[]
> }[]
> ```

> **auto\_variant\_select full type**
>
> ```ts theme={null}
> {
>   trigger: reply_rate | click_rate | open_rate
> }
> ```

**Output:** `object`

> **Output full type**
>
> ```ts theme={null}
> {
>   id: string,
>   name?: string | null,
>   status?: number | null,
>   not_sending_status?: number | null,
>   campaign_schedule?: {
>   } | null,
>   sequences?: any[] | null,
>   email_list?: string[] | null,
>   email_tag_list?: string[] | null,
>   daily_limit?: number | null,
>   daily_max_leads?: number | null,
>   email_gap?: number | null,
>   random_wait_max?: number | null,
>   stop_on_reply?: boolean | null,
>   stop_on_auto_reply?: boolean | null,
>   stop_for_company?: boolean | null,
>   text_only?: boolean | null,
>   first_email_text_only?: boolean | null,
>   link_tracking?: boolean | null,
>   open_tracking?: boolean | null,
>   is_evergreen?: boolean | null,
>   pl_value?: number | null,
>   organization?: string | null,
>   timestamp_created?: string | null,
>   timestamp_updated?: string | null
> } | {
>   parse_warning: string
> }
> ```

***

### createFromShared

`campaigns.createFromShared`

Create a campaign in this workspace from one shared with campaigns.share

**Risk:** `write`

```ts theme={null}
await corsair.instantly.api.campaigns.createFromShared({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | Campaign ID |

**Output:** `object`

> **Output full type**
>
> ```ts theme={null}
> {
>   id?: string | null,
>   name?: string | null,
>   pl_value?: number | null,
>   status?: number | null,
>   is_evergreen?: boolean | null,
>   campaign_schedule?: {
>   } | null,
>   sequences?: any[] | null,
>   timestamp_created?: string | null,
>   timestamp_updated?: string | null,
>   email_gap?: number | null,
>   random_wait_max?: number | null,
>   text_only?: boolean | null,
>   first_email_text_only?: boolean | null,
>   email_list?: string[] | null,
>   daily_limit?: number | null,
>   stop_on_reply?: boolean | null,
>   email_tag_list?: string[] | null,
>   link_tracking?: boolean | null,
>   open_tracking?: boolean | null,
>   stop_on_auto_reply?: boolean | null,
>   daily_max_leads?: number | null,
>   prioritize_new_leads?: boolean | null,
>   auto_variant_select?: {
>   } | null,
>   match_lead_esp?: boolean | null,
>   not_sending_status?: number | null,
>   stop_for_company?: boolean | null,
>   core_variables?: {
>   } | null,
>   custom_variables?: {
>   } | null,
>   insert_unsubscribe_header?: boolean | null,
>   allow_risky_contacts?: boolean | null,
>   disable_bounce_protect?: boolean | null,
>   limit_emails_per_company_override?: {
>   } | null,
>   cc_list?: string[] | null,
>   bcc_list?: string[] | null,
>   organization?: string | null,
>   owned_by?: string | null,
>   created_by?: string | null,
>   ai_sdr_id?: string | null,
>   provider_routing_rules?: any[] | null
> } | {
>   parse_warning: string
> }
> ```

***

### delete

`campaigns.delete`

Delete a campaign permanently

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

```ts theme={null}
await corsair.instantly.api.campaigns.delete({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | The ID of the item to delete |

**Output:** `object`

> **Output full type**
>
> ```ts theme={null}
> {
> } | {
>   parse_warning: string
> }
> ```

***

### duplicate

`campaigns.duplicate`

Copy a campaign into a new one, optionally with a new name

**Risk:** `write`

```ts theme={null}
await corsair.instantly.api.campaigns.duplicate({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | Campaign ID |
| `name` | `string` | No | Campaign new name (optional). If not provided, it will default to CAMPAIGN NAME (copy). |

**Output:** `object`

> **Output full type**
>
> ```ts theme={null}
> {
>   id?: string | null,
>   name?: string | null,
>   pl_value?: number | null,
>   status?: number | null,
>   is_evergreen?: boolean | null,
>   campaign_schedule?: {
>   } | null,
>   sequences?: any[] | null,
>   timestamp_created?: string | null,
>   timestamp_updated?: string | null,
>   email_gap?: number | null,
>   random_wait_max?: number | null,
>   text_only?: boolean | null,
>   first_email_text_only?: boolean | null,
>   email_list?: string[] | null,
>   daily_limit?: number | null,
>   stop_on_reply?: boolean | null,
>   email_tag_list?: string[] | null,
>   link_tracking?: boolean | null,
>   open_tracking?: boolean | null,
>   stop_on_auto_reply?: boolean | null,
>   daily_max_leads?: number | null,
>   prioritize_new_leads?: boolean | null,
>   auto_variant_select?: {
>   } | null,
>   match_lead_esp?: boolean | null,
>   not_sending_status?: number | null,
>   stop_for_company?: boolean | null,
>   core_variables?: {
>   } | null,
>   custom_variables?: {
>   } | null,
>   insert_unsubscribe_header?: boolean | null,
>   allow_risky_contacts?: boolean | null,
>   disable_bounce_protect?: boolean | null,
>   limit_emails_per_company_override?: {
>   } | null,
>   cc_list?: string[] | null,
>   bcc_list?: string[] | null,
>   organization?: string | null,
>   owned_by?: string | null,
>   created_by?: string | null,
>   ai_sdr_id?: string | null,
>   provider_routing_rules?: any[] | null
> } | {
>   parse_warning: string
> }
> ```

***

### export

`campaigns.export`

Export a campaign's settings and sequence as JSON; changes nothing

**Risk:** `read`

```ts theme={null}
await corsair.instantly.api.campaigns.export({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | Campaign ID |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | No | Unique identifier for the campaign |
| `name` | `string` | No | Name of the campaign |
| `pl_value` | `number` | No | Value of every positive lead |
| `status` | `number` | No | Campaign Status; 0 Draft, 1 Active, 2 Paused, 3 Completed, 4 Running Subsequences, -99 Account Suspended, -1 Accounts Unhealthy, -2 Bounce Protect |
| `is_evergreen` | `boolean` | No | Whether the campaign is evergreen |
| `campaign_schedule` | `object` | No | Campaign schedule |
| `sequences` | `any[]` | No | — |
| `timestamp_created` | `string` | No | Timestamp when the campaign was created |
| `timestamp_updated` | `string` | No | Timestamp when the campaign was last updated |
| `email_gap` | `number` | No | The gap between emails in minutes |
| `random_wait_max` | `number` | No | The maximum random wait time in minutes |
| `text_only` | `boolean` | No | Whether the campaign is text only |
| `first_email_text_only` | `boolean` | No | Whether the campaign is send the first email as a text only |
| `email_list` | `string[]` | No | — |
| `daily_limit` | `number` | No | The daily limit for sending emails |
| `stop_on_reply` | `boolean` | No | Whether to stop the campaign on reply |
| `email_tag_list` | `string[]` | No | — |
| `link_tracking` | `boolean` | No | Whether to track links in emails |
| `open_tracking` | `boolean` | No | Whether to track opens in emails |
| `stop_on_auto_reply` | `boolean` | No | Whether to stop the campaign on auto reply |
| `daily_max_leads` | `number` | No | The daily maximum new leads to contact |
| `prioritize_new_leads` | `boolean` | No | Whether to prioritize new leads |
| `auto_variant_select` | `object` | No | Auto variant select settings |
| `match_lead_esp` | `boolean` | No | Whether to match leads by ESP |
| `not_sending_status` | `number` | No | Campaign not sending status; 1 Campaign is currently not within its sending schedule., 2 Campaign is currently waiting for a lead to process., 3 Campaign has reached its daily sending limit., 4 All sending accounts for this campa |
| `stop_for_company` | `boolean` | No | Whether to stop the campaign for the entire company(domain) when a lead replies |
| `core_variables` | `object` | No | Campaign core variables |
| `custom_variables` | `object` | No | Campaign custom variables |
| `insert_unsubscribe_header` | `boolean` | No | Whether to insert an unsubscribe header in emails |
| `allow_risky_contacts` | `boolean` | No | Whether to allow risky contacts |
| `disable_bounce_protect` | `boolean` | No | Whether to disable bounce protection |
| `limit_emails_per_company_override` | `object` | No | Overrides the workspace-wide limit emails per company setting for this campaign. |
| `cc_list` | `string[]` | No | — |
| `bcc_list` | `string[]` | No | — |
| `organization` | `string` | No | Organization ID |
| `owned_by` | `string` | No | Owner ID |
| `created_by` | `string` | No | ID of the user who created the campaign |
| `ai_sdr_id` | `string` | No | AI Sales Agent ID that created this campaign |
| `provider_routing_rules` | `any[]` | No | — |

> **campaign\_schedule full type**
>
> ```ts theme={null}
> {
> }
> ```

> **auto\_variant\_select full type**
>
> ```ts theme={null}
> {
> }
> ```

> **core\_variables full type**
>
> ```ts theme={null}
> {
> }
> ```

> **custom\_variables full type**
>
> ```ts theme={null}
> {
> }
> ```

> **limit\_emails\_per\_company\_override full type**
>
> ```ts theme={null}
> {
> }
> ```

***

### get

`campaigns.get`

Get one campaign with its schedule, sequence steps and settings

**Risk:** `read`

```ts theme={null}
await corsair.instantly.api.campaigns.get({ id: '01a181d1-c62c-745b-b842-870ce5b29862' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | Campaign ID (UUID) |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | — |
| `name` | `string` | No | — |
| `status` | `number` | No | 0 Draft, 1 Active, 2 Paused, 3 Completed, 4 Running subsequences, -1 Accounts unhealthy, -2 Bounce protect, -99 Account suspended |
| `not_sending_status` | `number` | No | Why an active campaign is not sending: 1 outside its schedule, 2 waiting for a lead, 3 campaign daily limit hit, 4 every account at its daily limit, 99 error |
| `campaign_schedule` | `object` | No | — |
| `sequences` | `any[]` | No | — |
| `email_list` | `string[]` | No | — |
| `email_tag_list` | `string[]` | No | — |
| `daily_limit` | `number` | No | — |
| `daily_max_leads` | `number` | No | — |
| `email_gap` | `number` | No | — |
| `random_wait_max` | `number` | No | — |
| `stop_on_reply` | `boolean` | No | — |
| `stop_on_auto_reply` | `boolean` | No | — |
| `stop_for_company` | `boolean` | No | — |
| `text_only` | `boolean` | No | — |
| `first_email_text_only` | `boolean` | No | — |
| `link_tracking` | `boolean` | No | — |
| `open_tracking` | `boolean` | No | — |
| `is_evergreen` | `boolean` | No | — |
| `pl_value` | `number` | No | — |
| `organization` | `string` | No | — |
| `timestamp_created` | `string` | No | — |
| `timestamp_updated` | `string` | No | — |

> **campaign\_schedule full type**
>
> ```ts theme={null}
> {
> }
> ```

***

### getAnalytics

`campaigns.getAnalytics`

Per-campaign totals: leads, contacted, sent, opens, replies, clicks, bounces, unsubscribes, completed and opportunities, for all campaigns or chosen ones, optionally in a date range

**Risk:** `read`

```ts theme={null}
await corsair.instantly.api.campaigns.getAnalytics({ id: '01a181d1-c62c-745b-b842-870ce5b29862', exclude_total_leads_count: true });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | No | One campaign; omit for all |
| `ids` | `string[]` | No | Several campaigns |
| `start_date` | `string` | No | YYYY-MM-DD (UTC midnight) or an ISO 8601 timestamp |
| `end_date` | `string` | No | YYYY-MM-DD (UTC midnight) or an ISO 8601 timestamp |
| `exclude_total_leads_count` | `boolean` | No | Skip leads\_count, which makes the call much faster |

**Output:** `object[]`

> **Output full type**
>
> ```ts theme={null}
> {
>   campaign_id: string,
>   campaign_name?: string | null,
>   campaign_status?: number | null,
>   campaign_is_evergreen?: boolean | null,
>   leads_count?: number | null,
>   contacted_count?: number | null,
>   new_leads_contacted_count?: number | null,
>   emails_sent_count?: number | null,
>   open_count?: number | null,
>   open_count_unique?: number | null,
>   reply_count?: number | null,
>   reply_count_unique?: number | null,
>   reply_count_automatic?: number | null,
>   link_click_count?: number | null,
>   link_click_count_unique?: number | null,
>   bounced_count?: number | null,
>   unsubscribed_count?: number | null,
>   completed_count?: number | null,
>   total_opportunities?: number | null,
>   total_opportunity_value?: number | null
> }[]
> ```

***

### getAnalyticsOverview

`campaigns.getAnalyticsOverview`

Combined totals across one, several or all campaigns: sent, opens, replies, clicks, bounces, interested, meetings booked and closed

**Risk:** `read`

```ts theme={null}
await corsair.instantly.api.campaigns.getAnalyticsOverview({ start_date: '2026-10-01', end_date: '2026-10-28' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | No | One campaign; omit for all |
| `ids` | `string[]` | No | — |
| `start_date` | `string` | No | YYYY-MM-DD (UTC midnight) or an ISO 8601 timestamp |
| `end_date` | `string` | No | YYYY-MM-DD (UTC midnight) or an ISO 8601 timestamp |
| `campaign_status` | `-99 \| -2 \| -1 \| 0 \| 1 \| 2 \| 3 \| 4` | No | 0 Draft, 1 Active, 2 Paused, 3 Completed, 4 Running subsequences, -1 Accounts unhealthy, -2 Bounce protect, -99 Account suspended |
| `expand_crm_events` | `boolean` | No | Count every interest status change, not only the first per lead |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `emails_sent_count` | `number` | No | — |
| `contacted_count` | `number` | No | — |
| `new_leads_contacted_count` | `number` | No | — |
| `open_count` | `number` | No | — |
| `open_count_unique` | `number` | No | — |
| `reply_count` | `number` | No | — |
| `reply_count_unique` | `number` | No | — |
| `reply_count_automatic` | `number` | No | — |
| `link_click_count` | `number` | No | — |
| `link_click_count_unique` | `number` | No | — |
| `bounced_count` | `number` | No | — |
| `unsubscribed_count` | `number` | No | — |
| `completed_count` | `number` | No | — |
| `total_opportunities` | `number` | No | — |
| `total_opportunity_value` | `number` | No | — |
| `total_interested` | `number` | No | — |
| `total_meeting_booked` | `number` | No | — |
| `total_meeting_completed` | `number` | No | — |
| `total_closed` | `number` | No | — |

***

### getDailyAnalytics

`campaigns.getDailyAnalytics`

Per-day sent, opens, replies and clicks for one campaign or all, optionally in a date range

**Risk:** `read`

```ts theme={null}
await corsair.instantly.api.campaigns.getDailyAnalytics({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `campaign_id` | `string` | No | Campaign ID (optional). Leave this field empty to get the analytics for all campaigns |
| `start_date` | `string` | No | Start of the analytics range. Accepts a date-only value (`YYYY-MM-DD`) or a full ISO 8601 timestamp. Date-only values are interpreted as UTC midnight — e.g. `2026-04-07` is treated as `2026-04-07T00:00:00.000Z`. |
| `end_date` | `string` | No | End of the analytics range. Accepts a date-only value (`YYYY-MM-DD`) or a full ISO 8601 timestamp. Date-only values are interpreted as UTC midnight — e.g. `2026-04-07` is treated as `2026-04-07T00:00:00.000Z`. |
| `campaign_status` | `-99 \| -1 \| -2 \| 0 \| 1 \| 2 \| 3 \| 4` | No | Filter by campaign status (only the analytics for the campaigns with the specified status will be returned); 0 Draft, 1 Active, 2 Paused, 3 Completed, 4 Running Subsequences, -99 Account Suspended, -1 Accounts Unhealthy, -2 Bounce Protect |

**Output:** `object[]`

> **Output full type**
>
> ```ts theme={null}
> {
>   date?: string | null,
>   sent?: number | null,
>   contacted?: number | null,
>   new_leads_contacted?: number | null,
>   opened?: number | null,
>   unique_opened?: number | null,
>   replies?: number | null,
>   unique_replies?: number | null,
>   replies_automatic?: number | null,
>   unique_replies_automatic?: number | null,
>   clicks?: number | null,
>   unique_clicks?: number | null,
>   opportunities?: number | null,
>   unique_opportunities?: number | null
> }[]
> ```

***

### getSendingStatus

`campaigns.getSendingStatus`

Explain why a campaign is not sending, or sending slower than expected

**Risk:** `read`

```ts theme={null}
await corsair.instantly.api.campaigns.getSendingStatus({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | Campaign ID |
| `with_ai_summary` | `boolean` | No | Include AI-generated summary |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `diagnostics` | `object` | No | Raw sending status data. Some fields may be missing when campaign is out of schedule. |
| `summary` | `object` | No | Human-readable summary of the sending status |

> **diagnostics full type**
>
> ```ts theme={null}
> {
> }
> ```

> **summary full type**
>
> ```ts theme={null}
> {
> }
> ```

***

### getStepAnalytics

`campaigns.getStepAnalytics`

Sent, opens, replies and clicks per sequence step and A/B variant, for one campaign or all

**Risk:** `read`

```ts theme={null}
await corsair.instantly.api.campaigns.getStepAnalytics({ campaign_id: '01a181d1-c62c-745b-b842-870ce5b29862', include_opportunities_count: true });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `campaign_id` | `string` | No | One campaign; omit for all |
| `start_date` | `string` | No | YYYY-MM-DD (UTC midnight) or an ISO 8601 timestamp |
| `end_date` | `string` | No | YYYY-MM-DD (UTC midnight) or an ISO 8601 timestamp |
| `include_opportunities_count` | `boolean` | No | Add opportunities, meetings\_booked and won per step |

**Output:** `object[]`

> **Output full type**
>
> ```ts theme={null}
> {
>   step?: string | number | null,
>   variant?: string | number | null,
>   sent?: number | null,
>   opened?: number | null,
>   unique_opened?: number | null,
>   replies?: number | null,
>   unique_replies?: number | null,
>   replies_automatic?: number | null,
>   clicks?: number | null,
>   unique_clicks?: number | null,
>   opportunities?: number | null,
>   unique_opportunities?: number | null,
>   meetings_booked?: number | null,
>   won?: number | null
> }[]
> ```

***

### list

`campaigns.list`

List campaigns with status, schedule, sending accounts and daily limit; filter by name, status or tag

**Risk:** `read`

```ts theme={null}
await corsair.instantly.api.campaigns.list({ status: 1, limit: 20 });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `limit` | `number` | No | Items per page, 1 to 100 |
| `starting_after` | `string` | No | Cursor: `next_starting_after` from the previous page |
| `search` | `string` | No | Match campaign names |
| `status` | `-99 \| -2 \| -1 \| 0 \| 1 \| 2 \| 3 \| 4` | No | 0 Draft, 1 Active, 2 Paused, 3 Completed, 4 Running subsequences, -1 Accounts unhealthy, -2 Bounce protect, -99 Account suspended |
| `tag_ids` | `string[]` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[]` | Yes | — |
| `next_starting_after` | `string` | No | Pass as starting\_after to get the next page; absent on the last page |

> **items full type**
>
> ```ts theme={null}
> {
>   id: string,
>   name?: string | null,
>   status?: number | null,
>   not_sending_status?: number | null,
>   campaign_schedule?: {
>   } | null,
>   sequences?: any[] | null,
>   email_list?: string[] | null,
>   email_tag_list?: string[] | null,
>   daily_limit?: number | null,
>   daily_max_leads?: number | null,
>   email_gap?: number | null,
>   random_wait_max?: number | null,
>   stop_on_reply?: boolean | null,
>   stop_on_auto_reply?: boolean | null,
>   stop_for_company?: boolean | null,
>   text_only?: boolean | null,
>   first_email_text_only?: boolean | null,
>   link_tracking?: boolean | null,
>   open_tracking?: boolean | null,
>   is_evergreen?: boolean | null,
>   pl_value?: number | null,
>   organization?: string | null,
>   timestamp_created?: string | null,
>   timestamp_updated?: string | null
> }[]
> ```

***

### pause

`campaigns.pause`

Pause a campaign: it stops sending until activated again

**Risk:** `write`

```ts theme={null}
await corsair.instantly.api.campaigns.pause({ id: '01a181d1-c62c-745b-b842-870ce5b29862' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | Campaign ID (UUID) |

**Output:** `object`

> **Output full type**
>
> ```ts theme={null}
> {
>   id: string,
>   name?: string | null,
>   status?: number | null,
>   not_sending_status?: number | null,
>   campaign_schedule?: {
>   } | null,
>   sequences?: any[] | null,
>   email_list?: string[] | null,
>   email_tag_list?: string[] | null,
>   daily_limit?: number | null,
>   daily_max_leads?: number | null,
>   email_gap?: number | null,
>   random_wait_max?: number | null,
>   stop_on_reply?: boolean | null,
>   stop_on_auto_reply?: boolean | null,
>   stop_for_company?: boolean | null,
>   text_only?: boolean | null,
>   first_email_text_only?: boolean | null,
>   link_tracking?: boolean | null,
>   open_tracking?: boolean | null,
>   is_evergreen?: boolean | null,
>   pl_value?: number | null,
>   organization?: string | null,
>   timestamp_created?: string | null,
>   timestamp_updated?: string | null
> } | {
>   parse_warning: string
> }
> ```

***

### searchByLead

`campaigns.searchByLead`

Find the campaigns a lead is in, by their email address

**Risk:** `read`

```ts theme={null}
await corsair.instantly.api.campaigns.searchByLead({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `search` | `string` | No | Search by lead email |
| `sort_column` | `string` | No | Sort campaigns by column name |
| `sort_order` | `string` | No | Sort direction |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[]` | Yes | — |
| `next_starting_after` | `string` | No | Pass as starting\_after to get the next page; absent on the last page |

> **items full type**
>
> ```ts theme={null}
> {
>   id?: string | null,
>   name?: string | null,
>   pl_value?: number | null,
>   status?: number | null,
>   is_evergreen?: boolean | null,
>   campaign_schedule?: {
>   } | null,
>   sequences?: any[] | null,
>   timestamp_created?: string | null,
>   timestamp_updated?: string | null,
>   email_gap?: number | null,
>   random_wait_max?: number | null,
>   text_only?: boolean | null,
>   first_email_text_only?: boolean | null,
>   email_list?: string[] | null,
>   daily_limit?: number | null,
>   stop_on_reply?: boolean | null,
>   email_tag_list?: string[] | null,
>   link_tracking?: boolean | null,
>   open_tracking?: boolean | null,
>   stop_on_auto_reply?: boolean | null,
>   daily_max_leads?: number | null,
>   prioritize_new_leads?: boolean | null,
>   auto_variant_select?: {
>   } | null,
>   match_lead_esp?: boolean | null,
>   not_sending_status?: number | null,
>   stop_for_company?: boolean | null,
>   core_variables?: {
>   } | null,
>   custom_variables?: {
>   } | null,
>   insert_unsubscribe_header?: boolean | null,
>   allow_risky_contacts?: boolean | null,
>   disable_bounce_protect?: boolean | null,
>   limit_emails_per_company_override?: {
>   } | null,
>   cc_list?: string[] | null,
>   bcc_list?: string[] | null,
>   organization?: string | null,
>   owned_by?: string | null,
>   created_by?: string | null,
>   ai_sdr_id?: string | null,
>   provider_routing_rules?: any[] | null
> }[]
> ```

***

### share

`campaigns.share`

Share a campaign for 7 days so other Instantly users can copy it with campaigns.createFromShared

**Risk:** `write`

```ts theme={null}
await corsair.instantly.api.campaigns.share({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | Campaign ID |

**Output:** `object`

> **Output full type**
>
> ```ts theme={null}
> {
> } | {
>   parse_warning: string
> }
> ```

***

### update

`campaigns.update`

Change a campaign's name, schedule, sequence steps, sending accounts, daily limit or stop rules; only the fields passed change

**Risk:** `write`

```ts theme={null}
await corsair.instantly.api.campaigns.update({ id: '01a181d1-c62c-745b-b842-870ce5b29862', daily_limit: 50, stop_on_auto_reply: true });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | Campaign ID (UUID) |
| `name` | `string` | No | — |
| `campaign_schedule` | `object` | No | — |
| `sequences` | `object[]` | No | Exactly one sequence holding every step: Instantly reads only the first element |
| `email_list` | `string[]` | No | Sending account emails to rotate through |
| `email_tag_list` | `string[]` | No | Account tag IDs whose accounts send for this campaign |
| `daily_limit` | `number` | No | Most emails the campaign sends per day |
| `daily_max_leads` | `number` | No | Most new leads contacted per day |
| `email_gap` | `number` | No | Minutes between emails |
| `random_wait_max` | `number` | No | Extra random wait, in minutes, up to this |
| `stop_on_reply` | `boolean` | No | Stop the sequence for a lead once they reply |
| `stop_on_auto_reply` | `boolean` | No | Also stop on auto-replies such as out-of-office |
| `stop_for_company` | `boolean` | No | Stop the sequence for every lead at the same company (domain) when one replies |
| `text_only` | `boolean` | No | Send every email as plain text |
| `first_email_text_only` | `boolean` | No | Send only the first email as plain text |
| `link_tracking` | `boolean` | No | — |
| `open_tracking` | `boolean` | No | — |
| `insert_unsubscribe_header` | `boolean` | No | — |
| `prioritize_new_leads` | `boolean` | No | — |
| `match_lead_esp` | `boolean` | No | Send from accounts on the lead's email provider |
| `allow_risky_contacts` | `boolean` | No | — |
| `disable_bounce_protect` | `boolean` | No | — |
| `is_evergreen` | `boolean` | No | — |
| `pl_value` | `number` | No | Value of each positive lead |
| `cc_list` | `string[]` | No | — |
| `bcc_list` | `string[]` | No | — |
| `auto_variant_select` | `object` | No | Pick the winning A/B variant automatically by this metric |

> **campaign\_schedule full type**
>
> ```ts theme={null}
> {
>   schedules: {
>     name: string,
>     timing: {
>       from: string,
>       to: string
>     },
>     days: {
>       0?: boolean,
>       1?: boolean,
>       2?: boolean,
>       3?: boolean,
>       4?: boolean,
>       5?: boolean,
>       6?: boolean
>     },
>     timezone: Etc/GMT+12 | Etc/GMT+11 | Etc/GMT+10 | America/Anchorage | America/Dawson | America/Creston | America/Chihuahua | America/Boise | America/Belize | America/Chicago | America/Bahia_Banderas | America/Regina | America/Bogota | America/Detroit | America/Indiana/Marengo | America/Caracas | America/Asuncion | America/Glace_Bay | America/Campo_Grande | America/Anguilla | America/Santiago | America/St_Johns | America/Sao_Paulo | America/Argentina/La_Rioja | America/Araguaina | America/Godthab | America/Montevideo | America/Bahia | America/Noronha | America/Scoresbysund | Atlantic/Cape_Verde | Africa/Casablanca | America/Danmarkshavn | Europe/Isle_of_Man | Atlantic/Canary | Africa/Abidjan | Arctic/Longyearbyen | Europe/Belgrade | Africa/Ceuta | Europe/Sarajevo | Africa/Algiers | Africa/Windhoek | Asia/Nicosia | Asia/Beirut | Africa/Cairo | Asia/Damascus | Europe/Bucharest | Africa/Blantyre | Europe/Helsinki | Europe/Istanbul | Asia/Jerusalem | Africa/Tripoli | Asia/Amman | Asia/Baghdad | Europe/Kaliningrad | Asia/Aden | Africa/Addis_Ababa | Europe/Kirov | Europe/Astrakhan | Asia/Tehran | Asia/Dubai | Asia/Baku | Indian/Mahe | Asia/Tbilisi | Asia/Yerevan | Asia/Kabul | Antarctica/Mawson | Asia/Yekaterinburg | Asia/Karachi | Asia/Kolkata | Asia/Colombo | Asia/Kathmandu | Antarctica/Vostok | Asia/Dhaka | Asia/Rangoon | Antarctica/Davis | Asia/Novokuznetsk | Asia/Hong_Kong | Asia/Krasnoyarsk | Asia/Brunei | Australia/Perth | Asia/Taipei | Asia/Choibalsan | Asia/Irkutsk | Asia/Dili | Asia/Pyongyang | Australia/Adelaide | Australia/Darwin | Australia/Brisbane | Australia/Melbourne | Antarctica/DumontDUrville | Australia/Currie | Asia/Chita | Antarctica/Macquarie | Asia/Sakhalin | Pacific/Auckland | Etc/GMT-12 | Pacific/Fiji | Asia/Anadyr | Asia/Kamchatka | Etc/GMT-13 | Pacific/Apia | America/New_York | US/Eastern | America/Indiana/Indianapolis | America/Kentucky/Louisville | US/Central | America/Denver | US/Mountain | America/Phoenix | US/Arizona | US/Alaska | Pacific/Honolulu | US/Hawaii | America/Mexico_City | America/Lima | America/Argentina/Buenos_Aires | Europe/London | Europe/Dublin | Europe/Lisbon | Europe/Paris | Europe/Berlin | Europe/Madrid | Europe/Rome | Europe/Amsterdam | Europe/Brussels | Europe/Vienna | Europe/Zurich | Europe/Stockholm | Europe/Oslo | Europe/Copenhagen | Europe/Prague | Europe/Warsaw | Europe/Budapest | Europe/Athens | Europe/Kyiv | Europe/Kiev | Europe/Riga | Europe/Sofia | Europe/Moscow | Asia/Riyadh | Asia/Qatar | Asia/Kuwait | Asia/Tel_Aviv | Africa/Nairobi | Africa/Lagos | Africa/Johannesburg | Asia/Calcutta | Asia/Yangon | Asia/Bangkok | Asia/Jakarta | Asia/Ho_Chi_Minh | Asia/Singapore | Asia/Kuala_Lumpur | Asia/Shanghai | Asia/Manila | Asia/Tokyo | Asia/Seoul | Australia/Sydney | Australia/Canberra | Australia/Hobart | UTC | Etc/UTC | GMT | Etc/GMT
>   }[],
>   start_date?: string | null,
>   end_date?: string | null
> }
> ```

> **sequences full type**
>
> ```ts theme={null}
> {
>   steps: {
>     type: email,
>     delay: number,
>     delay_unit?: minutes | hours | days,
>     pre_delay?: number,
>     pre_delay_unit?: minutes | hours | days,
>     variants: {
>       subject: string,
>       body: string,
>       v_disabled?: boolean
>     }[]
>   }[]
> }[]
> ```

> **auto\_variant\_select full type**
>
> ```ts theme={null}
> {
>   trigger: reply_rate | click_rate | open_rate
> }
> ```

**Output:** `object`

> **Output full type**
>
> ```ts theme={null}
> {
>   id: string,
>   name?: string | null,
>   status?: number | null,
>   not_sending_status?: number | null,
>   campaign_schedule?: {
>   } | null,
>   sequences?: any[] | null,
>   email_list?: string[] | null,
>   email_tag_list?: string[] | null,
>   daily_limit?: number | null,
>   daily_max_leads?: number | null,
>   email_gap?: number | null,
>   random_wait_max?: number | null,
>   stop_on_reply?: boolean | null,
>   stop_on_auto_reply?: boolean | null,
>   stop_for_company?: boolean | null,
>   text_only?: boolean | null,
>   first_email_text_only?: boolean | null,
>   link_tracking?: boolean | null,
>   open_tracking?: boolean | null,
>   is_evergreen?: boolean | null,
>   pl_value?: number | null,
>   organization?: string | null,
>   timestamp_created?: string | null,
>   timestamp_updated?: string | null
> } | {
>   parse_warning: string
> }
> ```

***

## Crm Actions

### deletePhoneNumber

`crmActions.deletePhoneNumber`

Release a phone number from the workspace and its provider

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

```ts theme={null}
await corsair.instantly.api.crmActions.deletePhoneNumber({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | The phone number record id to delete |

**Output:** `object`

> **Output full type**
>
> ```ts theme={null}
> {
>   cleanup_pending?: boolean | null,
>   id?: string | null,
>   timestamp_created?: string | null,
>   organization_id?: string | null,
>   phone_number?: string | null,
>   country?: string | null,
>   locality?: string | null,
>   subscription_id?: string | null,
>   twilio_sid?: string | null
> } | {
>   parse_warning: string
> }
> ```

***

### listPhoneNumbers

`crmActions.listPhoneNumbers`

List the workspace's phone numbers

**Risk:** `read`

```ts theme={null}
await corsair.instantly.api.crmActions.listPhoneNumbers({});
```

**Input:** *empty object*

**Output:** `object[]`

> **Output full type**
>
> ```ts theme={null}
> {
>   id?: string | null,
>   timestamp_created?: string | null,
>   organization_id?: string | null,
>   phone_number?: string | null,
>   country?: string | null,
>   locality?: string | null,
>   subscription_id?: string | null,
>   twilio_sid?: string | null,
>   renewal_date?: string | null,
>   price?: number | null
> }[]
> ```

***

## Custom Prompt Templates

### create

`customPromptTemplates.create`

Create a custom AI prompt template; `{{property}}` placeholders take lead fields

**Risk:** `write`

```ts theme={null}
await corsair.instantly.api.customPromptTemplates.create({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Template name |
| `prompt` | `string` | Yes | Prompt text; `{{property}}` placeholders take lead fields |
| `category` | `1 \| 2 \| 3 \| 4 \| 5 \| 6` | Yes | 1 Copywriting, 2 Cleaning, 3 Sales, 4 Marketing, 5 Other, 6 Personalization |
| `is_public` | `boolean` | Yes | Whether other workspaces can see it |
| `description` | `string` | No | — |
| `model_version` | `string` | No | Model, e.g. gpt-4o |
| `template_type` | `custom \| public` | No | — |

**Output:** `object`

> **Output full type**
>
> ```ts theme={null}
> {
>   id?: string | null,
>   workspace_id?: string | null,
>   created_by?: string | null,
>   name?: string | null,
>   category?: number | null,
>   prompt?: string | null,
>   is_public?: boolean | null,
>   description?: string | null,
>   properties?: any,
>   template_type?: string | null,
>   like_count?: number | null,
>   execution_count?: number | null,
>   created_by_instantly?: boolean | null
> } | {
>   parse_warning: string
> }
> ```

***

### delete

`customPromptTemplates.delete`

Delete a custom AI prompt template

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

```ts theme={null}
await corsair.instantly.api.customPromptTemplates.delete({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | Template ID |

**Output:** `object`

> **Output full type**
>
> ```ts theme={null}
> {
>   id?: string | null,
>   workspace_id?: string | null,
>   created_by?: string | null,
>   name?: string | null,
>   category?: number | null,
>   prompt?: string | null,
>   is_public?: boolean | null,
>   description?: string | null,
>   properties?: any,
>   template_type?: string | null,
>   like_count?: number | null,
>   execution_count?: number | null,
>   created_by_instantly?: boolean | null
> } | {
>   parse_warning: string
> }
> ```

***

### get

`customPromptTemplates.get`

Get one custom AI prompt template

**Risk:** `read`

```ts theme={null}
await corsair.instantly.api.customPromptTemplates.get({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | Template ID |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | No | — |
| `workspace_id` | `string` | No | — |
| `created_by` | `string` | No | — |
| `name` | `string` | No | — |
| `category` | `number` | No | 1 Copywriting, 2 Cleaning, 3 Sales, 4 Marketing, 5 Other, 6 Personalization |
| `prompt` | `string` | No | — |
| `is_public` | `boolean` | No | — |
| `description` | `string` | No | — |
| `properties` | `any` | No | — |
| `template_type` | `string` | No | custom or public |
| `like_count` | `number` | No | — |
| `execution_count` | `number` | No | — |
| `created_by_instantly` | `boolean` | No | — |

***

### list

`customPromptTemplates.list`

List custom AI prompt templates, including public ones

**Risk:** `read`

```ts theme={null}
await corsair.instantly.api.customPromptTemplates.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `limit` | `number` | No | Items per page, 1 to 100 |
| `starting_after` | `string` | No | Cursor: next\_starting\_after from the previous page |
| `search` | `string` | No | Search by template name |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[]` | Yes | — |
| `next_starting_after` | `string` | No | Pass as starting\_after to get the next page; absent on the last page |

> **items full type**
>
> ```ts theme={null}
> {
>   id?: string | null,
>   workspace_id?: string | null,
>   created_by?: string | null,
>   name?: string | null,
>   category?: number | null,
>   prompt?: string | null,
>   is_public?: boolean | null,
>   description?: string | null,
>   properties?: any,
>   template_type?: string | null,
>   like_count?: number | null,
>   execution_count?: number | null,
>   created_by_instantly?: boolean | null
> }[]
> ```

***

### update

`customPromptTemplates.update`

Change a custom AI prompt template

**Risk:** `write`

```ts theme={null}
await corsair.instantly.api.customPromptTemplates.update({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | Template ID |
| `name` | `string` | No | Template name |
| `prompt` | `string` | No | Prompt text; `{{property}}` placeholders take lead fields |
| `category` | `1 \| 2 \| 3 \| 4 \| 5 \| 6` | No | 1 Copywriting, 2 Cleaning, 3 Sales, 4 Marketing, 5 Other, 6 Personalization |
| `is_public` | `boolean` | No | Whether other workspaces can see it |
| `description` | `string` | No | — |
| `model_version` | `string` | No | Model, e.g. gpt-4o |
| `template_type` | `custom \| public` | No | — |

**Output:** `object`

> **Output full type**
>
> ```ts theme={null}
> {
>   id?: string | null,
>   workspace_id?: string | null,
>   created_by?: string | null,
>   name?: string | null,
>   category?: number | null,
>   prompt?: string | null,
>   is_public?: boolean | null,
>   description?: string | null,
>   properties?: any,
>   template_type?: string | null,
>   like_count?: number | null,
>   execution_count?: number | null,
>   created_by_instantly?: boolean | null
> } | {
>   parse_warning: string
> }
> ```

***

## Custom Tag Mappings

### list

`customTagMappings.list`

List which tags are assigned to which accounts and campaigns

**Risk:** `read`

```ts theme={null}
await corsair.instantly.api.customTagMappings.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `limit` | `number` | No | The number of items to return |
| `starting_after` | `string` | No | The ID of the last item in the previous page - used for pagination. You can use the value of the `next_starting_after` field from the previous response. |
| `resource_ids` | `string` | No | The list of resource ids to filter custom tag mappings by. A resource id is the id of an account or a campaign. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[]` | Yes | — |
| `next_starting_after` | `string` | No | Pass as starting\_after to get the next page; absent on the last page |

> **items full type**
>
> ```ts theme={null}
> {
>   id?: string | null,
>   tag_id?: string | null,
>   resource_id?: string | null,
>   resource_type?: number | null,
>   timestamp_created?: string | null,
>   organization_id?: string | null
> }[]
> ```

***

## Custom Tags

### create

`customTags.create`

Create a tag for organizing sending accounts and campaigns

**Risk:** `write`

```ts theme={null}
await corsair.instantly.api.customTags.create({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `label` | `string` | Yes | Display label for the custom tag. Must be unique per workspace after trimming whitespace. |
| `description` | `string` | No | Detailed description of the custom tag purpose |

**Output:** `object`

> **Output full type**
>
> ```ts theme={null}
> {
>   id?: string | null,
>   timestamp_created?: string | null,
>   timestamp_updated?: string | null,
>   organization_id?: string | null,
>   label?: string | null,
>   description?: string | null
> } | {
>   parse_warning: string
> }
> ```

***

### delete

`customTags.delete`

Delete a tag; the accounts and campaigns that had it lose it

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

```ts theme={null}
await corsair.instantly.api.customTags.delete({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | The ID of the item to delete |

**Output:** `object`

> **Output full type**
>
> ```ts theme={null}
> {
>   id?: string | null,
>   timestamp_created?: string | null,
>   timestamp_updated?: string | null,
>   organization_id?: string | null,
>   label?: string | null,
>   description?: string | null
> } | {
>   parse_warning: string
> }
> ```

***

### get

`customTags.get`

Get one tag by ID

**Risk:** `read`

```ts theme={null}
await corsair.instantly.api.customTags.get({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | The ID of the requested item |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | No | Unique identifier for the custom tag |
| `timestamp_created` | `string` | No | Timestamp when the custom tag was created |
| `timestamp_updated` | `string` | No | Timestamp when the custom tag was last updated |
| `organization_id` | `string` | No | Organization ID that owns this custom tag |
| `label` | `string` | No | Display label for the custom tag. Must be unique per workspace after trimming whitespace. |
| `description` | `string` | No | Detailed description of the custom tag purpose |

***

### list

`customTags.list`

List the workspace's tags

**Risk:** `read`

```ts theme={null}
await corsair.instantly.api.customTags.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `limit` | `number` | No | The number of items to return |
| `starting_after` | `string` | No | The ID of the last item in the previous page - used for pagination. You can use the value of the `next_starting_after` field from the previous response. |
| `search` | `string` | No | The search query to filter custom tags. |
| `resource_ids` | `string` | No | The list of resource ids to filter custom tags by. A resource id is the id of an account or a campaign. |
| `tag_ids` | `string` | No | The list of tag ids to filter custom tags by. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[]` | Yes | — |
| `next_starting_after` | `string` | No | Pass as starting\_after to get the next page; absent on the last page |

> **items full type**
>
> ```ts theme={null}
> {
>   id?: string | null,
>   timestamp_created?: string | null,
>   timestamp_updated?: string | null,
>   organization_id?: string | null,
>   label?: string | null,
>   description?: string | null
> }[]
> ```

***

### toggleResource

`customTags.toggleResource`

Assign tags to, or remove them from, sending accounts or campaigns (by IDs or all matching a filter)

**Risk:** `write`

```ts theme={null}
await corsair.instantly.api.customTags.toggleResource({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `tag_ids` | `string[]` | Yes | The list of tag ids to assign or unassign |
| `resource_type` | `1 \| 2 \| 3` | Yes | The resource type to assign or unassign the tags to; 1 Account, 2 Campaign, 3 Workspace |
| `resource_ids` | `string[]` | No | The list of resource ids to assign or unassign. A resource id is the id of an account or a campaign. Required unless `selected_all` is `true`. |
| `excluded_resource_ids` | `string[]` | No | Optional list of resource ids to exclude when `selected_all` is `true`. |
| `assign` | `boolean` | Yes | Whether to assign the tags to the resources. |
| `selected_all` | `boolean` | No | Whether to select all resources. |
| `filter` | `object` | No | Optional selected-all filter. Accepts the existing account-status string shape and the merged object shape for account status, tag, any-tag, all-tags, and search criteria. |
| `search` | `string` | No | Optional selected-all search query. If omitted, `filter.search` is used when present. |

> **filter full type**
>
> ```ts theme={null}
> ACC_FILTER_PAUSED | ACC_FILTER_ERROR | ACC_FILTER_NO_CTD | ACC_FILTER_PW_ACCOUNTS | ACC_FILTER_DFY | ACC_FILTER_DFY_SETUP_PENDING | ACC_FILTER_W_ACTIVE | ACC_FILTER_W_PAUSED | ACC_FILTER_W_ERROR | null | {
>   tag_id?: string | no-tag,
>   tag_ids?: string[],
>   tag_ids_all?: string[],
>   filter?: ACC_FILTER_PAUSED | ACC_FILTER_ERROR | ACC_FILTER_NO_CTD | ACC_FILTER_PW_ACCOUNTS | ACC_FILTER_DFY | ACC_FILTER_DFY_SETUP_PENDING | ACC_FILTER_W_ACTIVE | ACC_FILTER_W_PAUSED | ACC_FILTER_W_ERROR | null,
>   search?: string
> }
> ```

**Output:** `object`

> **Output full type**
>
> ```ts theme={null}
> {
>   success?: boolean | null
> } | {
>   parse_warning: string
> }
> ```

***

### update

`customTags.update`

Rename a tag or change its description

**Risk:** `write`

```ts theme={null}
await corsair.instantly.api.customTags.update({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | The ID of the item to update |
| `label` | `string` | No | Display label for the custom tag. Must be unique per workspace after trimming whitespace. |
| `description` | `string` | No | Detailed description of the custom tag purpose |

**Output:** `object`

> **Output full type**
>
> ```ts theme={null}
> {
>   id?: string | null,
>   timestamp_created?: string | null,
>   timestamp_updated?: string | null,
>   organization_id?: string | null,
>   label?: string | null,
>   description?: string | null
> } | {
>   parse_warning: string
> }
> ```

***

## Domain Forwarding

### get

`domainForwarding.get`

Get the web forwarding set on a domain ordered through Instantly

**Risk:** `read`

```ts theme={null}
await corsair.instantly.api.domainForwarding.get({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `domain` | `string` | Yes | The domain to manage forwarding for |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `domain` | `string` | No | The domain the forwarding configuration applies to |
| `forwarding_domain` | `string` | No | Destination domain visitors are forwarded to. Null when no forwarding is configured. |
| `forwarding_mode` | `string` | No | How the forwarding domain is applied. Null when no forwarding is configured.; redirect Visitors are redirected and the browser URL changes to the forwarding domain, stealth Visitors stay on this domain while the content is proxied from the forwarding domain |

***

### remove

`domainForwarding.remove`

Remove a domain's web forwarding. Limited to 10 requests a minute

**Risk:** `destructive`

```ts theme={null}
await corsair.instantly.api.domainForwarding.remove({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `domain` | `string` | Yes | The domain to manage forwarding for |

**Output:** `object`

> **Output full type**
>
> ```ts theme={null}
> {
>   domain?: string | null,
>   forwarding_domain?: string | null,
>   forwarding_mode?: string | null
> } | {
>   parse_warning: string
> }
> ```

***

### set

`domainForwarding.set`

Forward web visits to a domain ordered through Instantly to another domain

**Risk:** `write`

```ts theme={null}
await corsair.instantly.api.domainForwarding.set({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `domain` | `string` | Yes | The domain to manage forwarding for |
| `forwarding_domain` | `string` | Yes | Destination domain visitors are forwarded to |
| `forwarding_mode` | `redirect \| stealth` | No | How the forwarding domain is applied. Defaults to `redirect`. |

**Output:** `object`

> **Output full type**
>
> ```ts theme={null}
> {
>   domain?: string | null,
>   forwarding_domain?: string | null,
>   forwarding_mode?: string | null
> } | {
>   parse_warning: string
> }
> ```

***

## Emails

### countUnread

`emails.countUnread`

Count unread emails in the Unibox

**Risk:** `read`

```ts theme={null}
await corsair.instantly.api.emails.countUnread({});
```

**Input:** *empty object*

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `count` | `number` | No | — |

***

### delete

`emails.delete`

Delete an email from the Unibox

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

```ts theme={null}
await corsair.instantly.api.emails.delete({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | The ID of the item to delete |

**Output:** `object`

> **Output full type**
>
> ```ts theme={null}
> {
>   id?: string | null,
>   timestamp_created?: string | null,
>   timestamp_email?: string | null,
>   message_id?: string | null,
>   subject?: string | null,
>   from_address_email?: string | null,
>   to_address_email_list?: string | null,
>   cc_address_email_list?: string | null,
>   bcc_address_email_list?: string | null,
>   reply_to?: string | null,
>   body?: {
>   } | null,
>   organization_id?: string | null,
>   campaign_id?: string | null,
>   subsequence_id?: string | null,
>   list_id?: string | null,
>   lead?: string | null,
>   lead_id?: string | null,
>   eaccount?: string | null,
>   ue_type?: number | null,
>   step?: string | null,
>   is_unread?: number | null,
>   is_auto_reply?: number | null,
>   reminder_ts?: string | null,
>   ai_interest_value?: number | null,
>   ai_assisted?: number | null,
>   is_focused?: number | null,
>   i_status?: number | null,
>   thread_id?: string | null,
>   content_preview?: string | null,
>   body_fallback_reason?: string | null,
>   attachment_json?: {
>   } | null,
>   from_address_json?: any[] | null,
>   to_address_json?: any[] | null,
>   cc_address_json?: any[] | null,
>   ai_agent_id?: string | null
> } | {
>   parse_warning: string
> }
> ```

***

### forward

`emails.forward`

Forward an email from the Unibox to other recipients. This SENDS REAL EMAIL from the chosen sending account, and is never retried automatically

**Risk:** `write`

```ts theme={null}
await corsair.instantly.api.emails.forward({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `object` | No | Optional body content for the forwarded email. When `include_original_body` is `true`, this can be used as a note before the appended original email content. You can specify either the `html` or the `text` field, or... |
| `include_original_body` | `boolean` | No | When true, append the original email headers and content after the provided body. Default: false. |
| `eaccount` | `string` | No | The email account that will be used to send this email. It has to be an email account connected to your workspace |
| `reply_to_uuid` | `string` | No | The id of the email you want to forward |
| `to_address_email_list` | `string` | No | Comma-separated list of recipients that will receive the forwarded email |
| `subject` | `string` | No | Subject line of the forwarded email message |
| `cc_address_email_list` | `string` | No | Comma-separated list of CC email addresses |
| `bcc_address_email_list` | `string` | No | Comma-separated list of BCC email addresses |
| `reply_to` | `string` | No | Reply-to email address that recipients should use when replying |
| `forwarded_attachments` | `string` | No | JSON-encoded forwarded attachment metadata from the original email |
| `assigned_to` | `string` | No | The user id assigned to the lead |

> **body full type**
>
> ```ts theme={null}
> {
>   html?: string,
>   text?: string
> }
> ```

**Output:** `object`

> **Output full type**
>
> ```ts theme={null}
> {
>   id?: string | null,
>   timestamp_created?: string | null,
>   timestamp_email?: string | null,
>   message_id?: string | null,
>   subject?: string | null,
>   from_address_email?: string | null,
>   to_address_email_list?: string | null,
>   cc_address_email_list?: string | null,
>   bcc_address_email_list?: string | null,
>   reply_to?: string | null,
>   body?: {
>   } | null,
>   organization_id?: string | null,
>   campaign_id?: string | null,
>   subsequence_id?: string | null,
>   list_id?: string | null,
>   lead?: string | null,
>   lead_id?: string | null,
>   eaccount?: string | null,
>   ue_type?: number | null,
>   step?: string | null,
>   is_unread?: number | null,
>   is_auto_reply?: number | null,
>   reminder_ts?: string | null,
>   ai_interest_value?: number | null,
>   ai_assisted?: number | null,
>   is_focused?: number | null,
>   i_status?: number | null,
>   thread_id?: string | null,
>   content_preview?: string | null,
>   body_fallback_reason?: string | null,
>   attachment_json?: {
>   } | null,
>   from_address_json?: any[] | null,
>   to_address_json?: any[] | null,
>   cc_address_json?: any[] | null,
>   ai_agent_id?: string | null
> } | {
>   parse_warning: string
> }
> ```

***

### get

`emails.get`

Get one email with its full body and thread\_id

**Risk:** `read`

```ts theme={null}
await corsair.instantly.api.emails.get({ id: '01a181d1-c62c-745b-b842-870e55aa2c19' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | Email ID (UUID) |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | Email ID; pass as reply\_to\_uuid to emails.reply |
| `thread_id` | `string` | No | — |
| `message_id` | `string` | No | — |
| `subject` | `string` | No | — |
| `from_address_email` | `string` | No | — |
| `to_address_email_list` | `string` | No | Comma-separated |
| `cc_address_email_list` | `string` | No | — |
| `reply_to` | `string` | No | — |
| `eaccount` | `string` | No | Sending account that sent or received it |
| `lead` | `string` | No | Lead email |
| `lead_id` | `string` | No | — |
| `campaign_id` | `string` | No | — |
| `list_id` | `string` | No | — |
| `ue_type` | `number` | No | 1 Sent from a campaign, 2 Received, 3 Sent manually, 4 Scheduled |
| `step` | `string \| number` | No | — |
| `is_unread` | `number` | No | 1 unread |
| `is_auto_reply` | `number` | No | 1 auto-reply |
| `i_status` | `number` | No | Interest status of the lead |
| `ai_interest_value` | `number` | No | — |
| `content_preview` | `string` | No | — |
| `body` | `object` | No | Full body; an excerpt when body\_fallback\_reason is set |
| `body_fallback_reason` | `string` | No | — |
| `timestamp_email` | `string` | No | When the email was sent or received |
| `timestamp_created` | `string` | No | — |

> **body full type**
>
> ```ts theme={null}
> {
>   text?: string | null,
>   html?: string | null
> }
> ```

***

### list

`emails.list`

List Unibox emails; email\_type received lists replies from leads, the way to read replies on plans without webhooks. Filter by lead, campaign, sending account, unread or date. Limited to 20 requests a minute

**Risk:** `read`

```ts theme={null}
await corsair.instantly.api.emails.list({ email_type: 'received', is_unread: true, limit: 20 });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `limit` | `number` | No | Items per page, 1 to 100 |
| `starting_after` | `string` | No | Cursor: `next_starting_after` from the previous page |
| `email_type` | `received \| sent \| manual` | No | received = replies from leads |
| `lead` | `string` | No | Lead email |
| `campaign_id` | `string` | No | — |
| `list_id` | `string` | No | — |
| `eaccount` | `string` | No | Sending account email(s), comma-separated |
| `search` | `string` | No | A lead email, or `thread:<thread_id>` for one thread |
| `is_unread` | `boolean` | No | — |
| `i_status` | `number` | No | Interest status |
| `mode` | `emode_focused \| emode_others \| emode_all` | No | Unibox tab: Primary, Others or all |
| `min_timestamp_created` | `string` | No | ISO timestamp: only emails stored after this |
| `max_timestamp_created` | `string` | No | — |
| `latest_of_thread` | `boolean` | No | Only the newest email of each thread |
| `preview_only` | `boolean` | No | Return content\_preview instead of full bodies |
| `sort_order` | `asc \| desc` | No | — |
| `company_domain` | `string` | No | — |
| `marked_as_done` | `boolean` | No | — |
| `assigned_to` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[]` | Yes | — |
| `next_starting_after` | `string` | No | Pass as starting\_after to get the next page; absent on the last page |

> **items full type**
>
> ```ts theme={null}
> {
>   id: string,
>   thread_id?: string | null,
>   message_id?: string | null,
>   subject?: string | null,
>   from_address_email?: string | null,
>   to_address_email_list?: string | null,
>   cc_address_email_list?: string | null,
>   reply_to?: string | null,
>   eaccount?: string | null,
>   lead?: string | null,
>   lead_id?: string | null,
>   campaign_id?: string | null,
>   list_id?: string | null,
>   ue_type?: number | null,
>   step?: string | number | null,
>   is_unread?: number | null,
>   is_auto_reply?: number | null,
>   i_status?: number | null,
>   ai_interest_value?: number | null,
>   content_preview?: string | null,
>   body?: {
>     text?: string | null,
>     html?: string | null
>   } | null,
>   body_fallback_reason?: string | null,
>   timestamp_email?: string | null,
>   timestamp_created?: string | null
> }[]
> ```

***

### markThreadRead

`emails.markThreadRead`

Mark every email in a thread as read

**Risk:** `write`

```ts theme={null}
await corsair.instantly.api.emails.markThreadRead({ thread_id: '01a181d1-c62c-745b-b842-870f8d0b9e33' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `thread_id` | `string` | Yes | thread\_id from an email |

**Output:** `object`

> **Output full type**
>
> ```ts theme={null}
> {
>   success?: boolean | null
> } | {
>   parse_warning: string
> }
> ```

***

### reply

`emails.reply`

Reply to an email in its thread. This SENDS A REAL EMAIL from the chosen sending account to the lead, and is never retried automatically

**Risk:** `write` · **Irreversible**

```ts theme={null}
await corsair.instantly.api.emails.reply({ reply_to_uuid: '01a181d1-c62c-745b-b842-870e55aa2c19', eaccount: 'sam@fieldkit-mail.com', subject: 'Re: Quick question, Jordan', body: { text: 'Tuesday 10am works.' } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `reply_to_uuid` | `string` | Yes | ID of the email to reply to (from emails.list or a webhook email\_id) |
| `eaccount` | `string` | Yes | Sending account in this workspace to reply from |
| `subject` | `string` | Yes | Subject, usually "Re: " plus the original |
| `body` | `object` | Yes | — |
| `cc_address_email_list` | `string` | No | Comma-separated |
| `bcc_address_email_list` | `string` | No | Comma-separated |
| `additional_recipients` | `string[]` | No | — |
| `reminder_ts` | `string` | No | ISO timestamp for a Unibox reminder |
| `assigned_to` | `string` | No | — |

> **body full type**
>
> ```ts theme={null}
> {
>   html?: string,
>   text?: string
> }
> ```

**Output:** `object`

> **Output full type**
>
> ```ts theme={null}
> {
>   id?: string,
>   thread_id?: string | null,
>   message_id?: string | null,
>   subject?: string | null,
>   from_address_email?: string | null,
>   to_address_email_list?: string | null,
>   cc_address_email_list?: string | null,
>   reply_to?: string | null,
>   eaccount?: string | null,
>   lead?: string | null,
>   lead_id?: string | null,
>   campaign_id?: string | null,
>   list_id?: string | null,
>   ue_type?: number | null,
>   step?: string | number | null,
>   is_unread?: number | null,
>   is_auto_reply?: number | null,
>   i_status?: number | null,
>   ai_interest_value?: number | null,
>   content_preview?: string | null,
>   body?: {
>     text?: string | null,
>     html?: string | null
>   } | null,
>   body_fallback_reason?: string | null,
>   timestamp_email?: string | null,
>   timestamp_created?: string | null
> } | {
>   parse_warning: string
> }
> ```

***

### sendTest

`emails.sendTest`

Send a test email from a sending account. This SENDS REAL EMAIL to the given addresses (it does not appear in the Unibox). Limited to 10 a minute

**Risk:** `write`

```ts theme={null}
await corsair.instantly.api.emails.sendTest({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `eaccount` | `string` | Yes | The email account that will be used to send this email. It has to be an email account connected to your workspace. |
| `to_address_email_list` | `string` | Yes | Comma-separated list of recipients that will receive the test email. |
| `subject` | `string` | Yes | Subject line of the test email. |
| `body` | `object` | Yes | HTML body of the test email. Use \`\` tags for delivered email line breaks. |

> **body full type**
>
> ```ts theme={null}
> {
>   html: string
> }
> ```

**Output:** `object`

> **Output full type**
>
> ```ts theme={null}
> {
> } | {
>   parse_warning: string
> }
> ```

***

### update

`emails.update`

Mark an email read or unread, or set a Unibox reminder on it

**Risk:** `write`

```ts theme={null}
await corsair.instantly.api.emails.update({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | The ID of the item to update |
| `is_unread` | `number` | No | Indicates if the email is unread |
| `reminder_ts` | `string` | No | Timestamp for the reminder. |

**Output:** `object`

> **Output full type**
>
> ```ts theme={null}
> {
>   id?: string | null,
>   timestamp_created?: string | null,
>   timestamp_email?: string | null,
>   message_id?: string | null,
>   subject?: string | null,
>   from_address_email?: string | null,
>   to_address_email_list?: string | null,
>   cc_address_email_list?: string | null,
>   bcc_address_email_list?: string | null,
>   reply_to?: string | null,
>   body?: {
>   } | null,
>   organization_id?: string | null,
>   campaign_id?: string | null,
>   subsequence_id?: string | null,
>   list_id?: string | null,
>   lead?: string | null,
>   lead_id?: string | null,
>   eaccount?: string | null,
>   ue_type?: number | null,
>   step?: string | null,
>   is_unread?: number | null,
>   is_auto_reply?: number | null,
>   reminder_ts?: string | null,
>   ai_interest_value?: number | null,
>   ai_assisted?: number | null,
>   is_focused?: number | null,
>   i_status?: number | null,
>   thread_id?: string | null,
>   content_preview?: string | null,
>   body_fallback_reason?: string | null,
>   attachment_json?: {
>   } | null,
>   from_address_json?: any[] | null,
>   to_address_json?: any[] | null,
>   cc_address_json?: any[] | null,
>   ai_agent_id?: string | null
> } | {
>   parse_warning: string
> }
> ```

***

## Email Templates

### create

`emailTemplates.create`

Save an email template (name and body)

**Risk:** `write`

```ts theme={null}
await corsair.instantly.api.emailTemplates.create({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Template name |
| `body` | `string` | Yes | Email body, HTML or text |

**Output:** `object`

> **Output full type**
>
> ```ts theme={null}
> {
>   id?: string | null,
>   name?: string | null,
>   body?: string | null,
>   organization_id?: string | null,
>   timestamp_created?: string | null
> } | {
>   parse_warning: string
> }
> ```

***

### delete

`emailTemplates.delete`

Delete a saved email template

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

```ts theme={null}
await corsair.instantly.api.emailTemplates.delete({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | Template ID |

**Output:** `object`

> **Output full type**
>
> ```ts theme={null}
> {
>   id?: string | null,
>   name?: string | null,
>   body?: string | null,
>   organization_id?: string | null,
>   timestamp_created?: string | null
> } | {
>   parse_warning: string
> }
> ```

***

### list

`emailTemplates.list`

List saved email templates

**Risk:** `read`

```ts theme={null}
await corsair.instantly.api.emailTemplates.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `limit` | `number` | No | Items per page, 1 to 100 |
| `starting_after` | `string` | No | Cursor: next\_starting\_after from the previous page |
| `search` | `string` | No | Search by template name |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[]` | Yes | — |
| `next_starting_after` | `string` | No | Pass as starting\_after to get the next page; absent on the last page |

> **items full type**
>
> ```ts theme={null}
> {
>   id?: string | null,
>   name?: string | null,
>   body?: string | null,
>   organization_id?: string | null,
>   timestamp_created?: string | null
> }[]
> ```

***

## Email Verification

### getStatus

`emailVerification.getStatus`

Get the result of an email verification started with emailVerification.verify

**Risk:** `read`

```ts theme={null}
await corsair.instantly.api.emailVerification.getStatus({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `email` | `string` | Yes | The email address to verify |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `status` | `string` | No | The request status. Do not use this field to determine the verification status. Please use `verification_status` instead to check the...; success The verification was successful, error The verification was unsuccessful |
| `email` | `string` | No | The email address to verify |
| `verification_status` | `string` | No | The verification status.; pending The verification is pending, verified The verification is verified, invalid The verification is invalid |
| `catch_all` | `any` | No | — |
| `credits` | `number` | No | The number of verification credits available after the verification |
| `credits_used` | `number` | No | The number of verification credits used |

***

### verify

`emailVerification.verify`

Verify one email address. SPENDS Instantly email-verification credits (the response reports credits and credits\_used) and is never retried automatically. A slow check answers pending; read the result with emailVerification.getStatus

**Risk:** `write`

```ts theme={null}
await corsair.instantly.api.emailVerification.verify({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `email` | `string` | Yes | The email address to verify |
| `webhook_url` | `string` | No | A webhook URL to receive the verification results. If the email verification takes more than 10 seconds we will send the results to this URL. |

**Output:** `object`

> **Output full type**
>
> ```ts theme={null}
> {
>   status?: string | null,
>   email?: string | null,
>   verification_status?: string | null,
>   catch_all?: any,
>   credits?: number | null,
>   credits_used?: number | null
> } | {
>   parse_warning: string
> }
> ```

***

## Engage Items

### deleteMany

`engageItems.deleteMany`

Delete up to 100 AI agents or automations from Engage at once

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

```ts theme={null}
await corsair.instantly.api.engageItems.deleteMany({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[]` | Yes | — |

> **items full type**
>
> ```ts theme={null}
> {
>   id: string,
>   type?: ai_agent | automation
> }[]
> ```

**Output:** `object`

> **Output full type**
>
> ```ts theme={null}
> {
>   deleted_ids?: string[] | null,
>   failed?: any[] | null
> } | {
>   parse_warning: string
> }
> ```

***

### list

`engageItems.list`

List Engage items: campaigns, AI agents, automations, broadcasts and journeys in one list

**Risk:** `read`

```ts theme={null}
await corsair.instantly.api.engageItems.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `limit` | `number` | No | The number of items to return |
| `starting_after` | `string` | No | The ID of the last item in the previous page - used for pagination. You can use the value of the `next_starting_after` field from the previous response. |
| `type` | `string` | No | Comma-separated item types: ai\_agent, automation |
| `status` | `string` | No | Comma-separated status values: Active, Paused, Draft, Error |
| `ai_agent_type` | `1 \| 2 \| 3 \| 4 \| 7 \| 8 \| 9 \| 10 \| 6 \| 11` | No | Filter by agent sub-type. Implies type=ai\_agent — automations have no sub-type.; 1 AI Inbox Manager, 2 AI Sales Agent, 3 AI Deliverability Agent, 4 AI Affiliate Agent, 6 AI Lead Finder Agent, 7 AI Recruiting Agent, 8 AI Investment Agent, 9 AI User Research Agent, 10 AI Partnership |
| `search` | `string` | No | Text search on agent name |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[]` | Yes | — |
| `next_starting_after` | `string` | No | Pass as starting\_after to get the next page; absent on the last page |

> **items full type**
>
> ```ts theme={null}
> {
>   resource_id?: string | null,
>   type?: string | null,
>   workspace_id?: string | null,
>   name?: string | null,
>   status?: string | null,
>   metadata?: {
>   } | null,
>   timestamp_created?: string | null,
>   timestamp_updated?: string | null,
>   tags?: any[] | null
> }[]
> ```

***

## Inbox Placement Analytics

### get

`inboxPlacementAnalytics.get`

Get one inbox placement result

**Risk:** `read`

```ts theme={null}
await corsair.instantly.api.inboxPlacementAnalytics.get({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | The ID of the requested item |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | No | Unique identifier for the inbox placement analytics entry |
| `timestamp_created` | `string` | No | Timestamp when the inbox placement analytics was created |
| `timestamp_created_date` | `string` | No | Date when the inbox placement analytics was created |
| `organization_id` | `string` | No | Organization ID |
| `test_id` | `string` | No | Inbox Placement Test ID |
| `is_spam` | `boolean` | No | Indicates if the email landed in spam (null if not determined). Only present when record\_type is 2 (received). |
| `has_category` | `boolean` | No | Indicates if the email was categorized like promotions, social, etc. (null if not determined). Only present when record\_type is 2... |
| `sender_email` | `string` | No | Email address of the sender |
| `sender_esp` | `number` | No | The sender ESP (Email Service Provider). Only present when record\_type is 2 (received).; 1 Google, 2 Microsoft, 8 AirMail, 12 Web.de, 13 Libero.it |
| `recipient_email` | `string` | No | Email address of the recipient |
| `recipient_esp` | `number` | No | The recipient ESP (Email Service Provider); 1 Google, 2 Microsoft, 8 AirMail, 12 Web.de, 13 Libero.it |
| `recipient_geo` | `number` | No | The geographic location of the recipient; 1 United States, 2 Italy, 3 Germany, 4 France |
| `recipient_type` | `number` | No | The type of recipient; 1 Professional, 2 Personal |
| `spf_pass` | `boolean` | No | Indicates if the email passed SPF validation. Only present when record\_type is 2 (received). |
| `dkim_pass` | `boolean` | No | Indicates if the email passed DKIM validation. Only present when record\_type is 2 (received). |
| `dmarc_pass` | `boolean` | No | Indicates if the email passed DMARC validation. Only present when record\_type is 2 (received). |
| `smtp_ip_blacklist_report` | `object` | No | Blacklist report for the SMTP IP address. Only present when record\_type is 2 (received). |
| `authentication_failure_results` | `object` | No | Details of authentication failures for SPF, DKIM, and DMARC. Only present when record\_type is 2 (received). |
| `record_type` | `number` | No | The type of record (sent or received); 1 Sent, 2 Received |

> **smtp\_ip\_blacklist\_report full type**
>
> ```ts theme={null}
> {
> }
> ```

> **authentication\_failure\_results full type**
>
> ```ts theme={null}
> {
> }
> ```

***

### getDeliverabilityInsights

`inboxPlacementAnalytics.getDeliverabilityInsights`

Deliverability insights for one inbox placement test, optionally against an earlier period; changes nothing

**Risk:** `read`

```ts theme={null}
await corsair.instantly.api.inboxPlacementAnalytics.getDeliverabilityInsights({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `test_id` | `string` | Yes | — |
| `date_from` | `string` | No | — |
| `date_to` | `string` | No | — |
| `previous_date_from` | `string` | No | — |
| `previous_date_to` | `string` | No | — |
| `show_previous` | `boolean` | No | — |
| `recipient_geo` | `(1 \| 2 \| 3 \| 4)[]` | No | — |
| `recipient_type` | `(1 \| 2)[]` | No | — |
| `recipient_esp` | `(1 \| 2 \| 8 \| 12 \| 13)[]` | No | — |

**Output:** `object[]`

> **Output full type**
>
> ```ts theme={null}
> {
>   test_id?: string | null,
>   from?: string | null,
>   to?: string | null,
>   previous_from?: string | null,
>   previous_to?: string | null,
>   sender_esp?: number | null,
>   recipient_esp?: number | null,
>   spam_percentage?: number | null,
>   inbox_percentage?: number | null,
>   category_percentage?: number | null,
>   prev_spam_percentage?: number | null,
>   prev_inbox_percentage?: number | null,
>   prev_category_percentage?: number | null
> }[]
> ```

***

### getStatsByDate

`inboxPlacementAnalytics.getStatsByDate`

Inbox, spam and category counts per day for a scheduled inbox placement test; changes nothing

**Risk:** `read`

```ts theme={null}
await corsair.instantly.api.inboxPlacementAnalytics.getStatsByDate({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `test_id` | `string` | Yes | — |
| `date_from` | `string` | No | — |
| `date_to` | `string` | No | — |
| `recipient_geo` | `(1 \| 2 \| 3 \| 4)[]` | No | — |
| `recipient_type` | `(1 \| 2)[]` | No | — |
| `recipient_esp` | `(1 \| 2 \| 8 \| 12 \| 13)[]` | No | — |
| `sender_email` | `string` | No | — |

**Output:** `object[]`

> **Output full type**
>
> ```ts theme={null}
> {
>   timestamp_created_date?: string | null,
>   sent_count?: number | null,
>   received_count?: number | null,
>   spam_count?: number | null,
>   inbox_count?: number | null,
>   category_count?: number | null
> }[]
> ```

***

### getStatsByTest

`inboxPlacementAnalytics.getStatsByTest`

Inbox, spam and category counts for inbox placement tests; changes nothing

**Risk:** `read`

```ts theme={null}
await corsair.instantly.api.inboxPlacementAnalytics.getStatsByTest({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `test_ids` | `string[]` | Yes | — |
| `date_from` | `string` | No | — |
| `date_to` | `string` | No | — |
| `recipient_geo` | `(1 \| 2 \| 3 \| 4)[]` | No | — |
| `recipient_type` | `(1 \| 2)[]` | No | — |
| `recipient_esp` | `(1 \| 2 \| 8 \| 12 \| 13)[]` | No | — |
| `sender_email` | `string` | No | — |

**Output:** `object[]`

> **Output full type**
>
> ```ts theme={null}
> {
>   test_id?: string | null,
>   count?: number | null,
>   spam_count?: number | null,
>   spam_percent?: number | null,
>   inbox_count?: number | null,
>   inbox_percent?: number | null,
>   category_count?: number | null,
>   category_percent?: number | null
> }[]
> ```

***

### list

`inboxPlacementAnalytics.list`

Where each inbox placement test email landed, per recipient; filter by test, date, provider or sender

**Risk:** `read`

```ts theme={null}
await corsair.instantly.api.inboxPlacementAnalytics.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `limit` | `number` | No | The number of items to return |
| `starting_after` | `string` | No | The ID of the last item in the previous page - used for pagination. You can use the value of the `next_starting_after` field from the previous response. |
| `test_id` | `string` | Yes | — |
| `date_from` | `string` | No | — |
| `date_to` | `string` | No | — |
| `recipient_geo` | `string` | No | A comma-separated list of recipient geo values. |
| `recipient_type` | `string` | No | A comma-separated list of recipient type values. |
| `recipient_esp` | `string` | No | A comma-separated list of recipient ESP values. |
| `sender_email` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[]` | Yes | — |
| `next_starting_after` | `string` | No | Pass as starting\_after to get the next page; absent on the last page |

> **items full type**
>
> ```ts theme={null}
> {
>   id?: string | null,
>   timestamp_created?: string | null,
>   timestamp_created_date?: string | null,
>   organization_id?: string | null,
>   test_id?: string | null,
>   is_spam?: boolean | null,
>   has_category?: boolean | null,
>   sender_email?: string | null,
>   sender_esp?: number | null,
>   recipient_email?: string | null,
>   recipient_esp?: number | null,
>   recipient_geo?: number | null,
>   recipient_type?: number | null,
>   spf_pass?: boolean | null,
>   dkim_pass?: boolean | null,
>   dmarc_pass?: boolean | null,
>   smtp_ip_blacklist_report?: {
>   } | null,
>   authentication_failure_results?: {
>   } | null,
>   record_type?: number | null
> }[]
> ```

***

## Inbox Placement Reports

### get

`inboxPlacementReports.get`

Get one blacklist and SpamAssassin report

**Risk:** `read`

```ts theme={null}
await corsair.instantly.api.inboxPlacementReports.get({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | The ID of the requested item |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | No | Unique identifier for the inbox placement report entry |
| `timestamp_created` | `string` | No | Timestamp when the inbox placement report was created |
| `timestamp_created_date` | `string` | No | Date when the inbox placement report was created |
| `organization_id` | `string` | No | Organization ID |
| `test_id` | `string` | No | Inbox Placement Test ID |
| `domain_blacklist_count` | `number` | No | Count of blacklists the domain is listed on |
| `domain` | `string` | No | Domain of the inbox placement report |
| `domain_ip` | `string` | No | IP address of the domain |
| `domain_ip_blacklist_count` | `number` | No | Count of blacklists the domain IP is listed on |
| `spam_assassin_score` | `number` | No | SpamAssassin score for the email, indicating spam likelihood |
| `spam_assassin_report` | `object` | No | Detailed SpamAssassin analysis report |
| `blacklist_report` | `object` | No | Detailed blacklist report for the domain or IP |

> **spam\_assassin\_report full type**
>
> ```ts theme={null}
> {
> }
> ```

> **blacklist\_report full type**
>
> ```ts theme={null}
> {
> }
> ```

***

### list

`inboxPlacementReports.list`

List blacklist and SpamAssassin reports for inbox placement tests

**Risk:** `read`

```ts theme={null}
await corsair.instantly.api.inboxPlacementReports.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `limit` | `number` | No | The number of items to return |
| `starting_after` | `string` | No | The ID of the last item in the previous page - used for pagination. You can use the value of the `next_starting_after` field from the previous response. |
| `test_id` | `string` | Yes | — |
| `date_from` | `string` | No | — |
| `date_to` | `string` | No | — |
| `skip_spam_assassin_report` | `boolean` | No | Flag to skip including spam\_assassin\_report JSON |
| `skip_blacklist_report` | `boolean` | No | Flag to skip including blacklist\_report JSON |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[]` | Yes | — |
| `next_starting_after` | `string` | No | Pass as starting\_after to get the next page; absent on the last page |

> **items full type**
>
> ```ts theme={null}
> {
>   id?: string | null,
>   timestamp_created?: string | null,
>   timestamp_created_date?: string | null,
>   organization_id?: string | null,
>   test_id?: string | null,
>   domain_blacklist_count?: number | null,
>   domain?: string | null,
>   domain_ip?: string | null,
>   domain_ip_blacklist_count?: number | null,
>   spam_assassin_score?: number | null,
>   spam_assassin_report?: {
>   } | null,
>   blacklist_report?: {
>   } | null
> }[]
> ```

***

## Inbox Placement Tests

### create

`inboxPlacementTests.create`

Create an inbox placement test: a test email sent to seed inboxes to see where it lands (inbox, spam or a category tab). With sending\_method 1, Instantly SENDS REAL EMAIL from the given accounts; with 2, you send it from outside Instantly

**Risk:** `write`

```ts theme={null}
await corsair.instantly.api.inboxPlacementTests.create({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Name of the inbox placement test |
| `delivery_mode` | `1 \| 2` | No | Whether to send emails one by one or all together; 1 One by one, 2 All together |
| `description` | `string` | No | Description of the inbox placement test |
| `schedule` | `object` | No | Specifies the date and time when the automated inbox placement tests will be sent. |
| `type` | `1 \| 2` | Yes | Whether the inbox placement test is a one-time test or an automated test |
| `sending_method` | `1 \| 2` | Yes | Whether the inbox placement test will be sent from Instantly or from outside Instantly; 1 From Instantly, 2 From Outside Instantly |
| `campaign_id` | `string` | No | Campaign ID |
| `email_subject` | `string` | Yes | Email subject of the inbox placement test |
| `email_body` | `string` | Yes | Email body of the inbox placement test |
| `emails` | `string[]` | Yes | Emails to send the inbox placement test to |
| `test_code` | `string` | No | Code for identifying inbox placement tests sent from outside Instantly. Use ptid\_ followed by letters, numbers, hyphens, or underscores. When creating a test, the ptid\_ prefix is added automatically if omitted. The full... |
| `tags` | `string[]` | No | List of tag IDs to use for sending emails |
| `text_only` | `boolean` | No | Disables open tracking |
| `recipients_labels` | `object[]` | No | A list of email providers and their corresponding types to which emails will be sent. To retrieve the available options, use the `GET: /inbox-placement-tests/email-service-provider-options` endpoint |
| `timestamp_next_run` | `string` | No | Timestamp when the inbox placement test will run next |
| `automations` | `object[]` | No | Optional automations to trigger based on conditions |
| `status` | `1 \| 2 \| 3` | No | Status of the inbox placement test; 1 Active, 2 Paused, 3 Completed |
| `not_sending_status` | `daily_limits_hit \| other` | No | Why the inbox placement test is currently not sending. It will be an empty string if there are no issues.; daily\_limits\_hit Daily limits hit, other Other reason |
| `run_immediately` | `boolean` | No | Run the test immediately after creation, as well as on the schedule |

> **schedule full type**
>
> ```ts theme={null}
> {
>   days?: {
>   },
>   timing?: {
>     from?: string
>   },
>   timezone?: Etc/GMT+12 | Etc/GMT+11 | Etc/GMT+10 | America/Anchorage | America/Dawson | America/Creston | America/Chihuahua | America/Boise | America/Belize | America/Chicago | America/Bahia_Banderas | America/Regina | America/Bogota | America/Detroit | America/Indiana/Marengo | America/Caracas | America/Asuncion | America/Glace_Bay | America/Campo_Grande | America/Anguilla | America/Santiago | America/St_Johns | America/Sao_Paulo | America/Argentina/La_Rioja | America/Araguaina | America/Godthab | America/Montevideo | America/Bahia | America/Noronha | America/Scoresbysund | Atlantic/Cape_Verde | Africa/Casablanca | America/Danmarkshavn | Europe/Isle_of_Man | Atlantic/Canary | Africa/Abidjan | Arctic/Longyearbyen | Europe/Belgrade | Africa/Ceuta | Europe/Sarajevo | Africa/Algiers | Africa/Windhoek | Asia/Nicosia | Asia/Beirut | Africa/Cairo | Asia/Damascus | Europe/Bucharest | Africa/Blantyre | Europe/Helsinki | Europe/Istanbul | Asia/Jerusalem | Africa/Tripoli | Asia/Amman | Asia/Baghdad | Europe/Kaliningrad | Asia/Aden | Africa/Addis_Ababa | Europe/Kirov | Europe/Astrakhan | Asia/Tehran | Asia/Dubai | Asia/Baku | Indian/Mahe | Asia/Tbilisi | Asia/Yerevan | Asia/Kabul | Antarctica/Mawson | Asia/Yekaterinburg | Asia/Karachi | Asia/Kolkata | Asia/Colombo | Asia/Kathmandu | Antarctica/Vostok | Asia/Dhaka | Asia/Rangoon | Antarctica/Davis | Asia/Novokuznetsk | Asia/Hong_Kong | Asia/Krasnoyarsk | Asia/Brunei | Australia/Perth | Asia/Taipei | Asia/Choibalsan | Asia/Irkutsk | Asia/Dili | Asia/Pyongyang | Australia/Adelaide | Australia/Darwin | Australia/Brisbane | Australia/Melbourne | Antarctica/DumontDUrville | Australia/Currie | Asia/Chita | Antarctica/Macquarie | Asia/Sakhalin | Pacific/Auckland | Etc/GMT-12 | Pacific/Fiji | Asia/Anadyr | Asia/Kamchatka | Etc/GMT-13 | Pacific/Apia | America/New_York | US/Eastern | America/Indiana/Indianapolis | America/Kentucky/Louisville | US/Central | America/Denver | US/Mountain | America/Phoenix | US/Arizona | US/Alaska | Pacific/Honolulu | US/Hawaii | America/Mexico_City | America/Lima | America/Argentina/Buenos_Aires | Europe/London | Europe/Dublin | Europe/Lisbon | Europe/Paris | Europe/Berlin | Europe/Madrid | Europe/Rome | Europe/Amsterdam | Europe/Brussels | Europe/Vienna | Europe/Zurich | Europe/Stockholm | Europe/Oslo | Europe/Copenhagen | Europe/Prague | Europe/Warsaw | Europe/Budapest | Europe/Athens | Europe/Kyiv | Europe/Kiev | Europe/Riga | Europe/Sofia | Europe/Moscow | Asia/Riyadh | Asia/Qatar | Asia/Kuwait | Asia/Tel_Aviv | Africa/Nairobi | Africa/Lagos | Africa/Johannesburg | Asia/Calcutta | Asia/Yangon | Asia/Bangkok | Asia/Jakarta | Asia/Ho_Chi_Minh | Asia/Singapore | Asia/Kuala_Lumpur | Asia/Shanghai | Asia/Manila | Asia/Tokyo | Asia/Seoul | Australia/Sydney | Australia/Canberra | Australia/Hobart | UTC | Etc/UTC | GMT | Etc/GMT
> }
> ```

> **recipients\_labels full type**
>
> ```ts theme={null}
> {
>   region: string,
>   sub_region: string,
>   type: string,
>   esp: string
> }[]
> ```

> **automations full type**
>
> ```ts theme={null}
> {
>   when: {
>   },
>   then: {
>   }
> }[]
> ```

**Output:** `object`

> **Output full type**
>
> ```ts theme={null}
> {
>   id?: string | null,
>   organization_id?: string | null,
>   name?: string | null,
>   delivery_mode?: number | null,
>   description?: string | null,
>   schedule?: {
>   } | null,
>   type?: number | null,
>   sending_method?: number | null,
>   campaign_id?: string | null,
>   email_subject?: string | null,
>   email_body?: string | null,
>   emails?: string[] | null,
>   test_code?: string | null,
>   tags?: string[] | null,
>   text_only?: boolean | null,
>   recipients?: string[] | null,
>   recipients_labels?: any[] | null,
>   timestamp_created?: string | null,
>   timestamp_next_run?: string | null,
>   automations?: any[] | null,
>   status?: number | null,
>   not_sending_status?: string | null
> } | {
>   parse_warning: string
> }
> ```

***

### delete

`inboxPlacementTests.delete`

Delete an inbox placement test

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

```ts theme={null}
await corsair.instantly.api.inboxPlacementTests.delete({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | The ID of the item to delete |

**Output:** `object`

> **Output full type**
>
> ```ts theme={null}
> {
>   id?: string | null,
>   organization_id?: string | null,
>   name?: string | null,
>   delivery_mode?: number | null,
>   description?: string | null,
>   schedule?: {
>   } | null,
>   type?: number | null,
>   sending_method?: number | null,
>   campaign_id?: string | null,
>   email_subject?: string | null,
>   email_body?: string | null,
>   emails?: string[] | null,
>   test_code?: string | null,
>   tags?: string[] | null,
>   text_only?: boolean | null,
>   recipients?: string[] | null,
>   recipients_labels?: any[] | null,
>   timestamp_created?: string | null,
>   timestamp_next_run?: string | null,
>   automations?: any[] | null,
>   status?: number | null,
>   not_sending_status?: string | null
> } | {
>   parse_warning: string
> }
> ```

***

### get

`inboxPlacementTests.get`

Get one inbox placement test

**Risk:** `read`

```ts theme={null}
await corsair.instantly.api.inboxPlacementTests.get({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | The ID of the requested item |
| `with_metadata` | `boolean` | No | Whether to include additional metadata about the inbox placement test |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | No | Unique identifier for the inbox placement test |
| `organization_id` | `string` | No | Organization ID |
| `name` | `string` | No | Name of the inbox placement test |
| `delivery_mode` | `number` | No | Whether to send emails one by one or all together; 1 One by one, 2 All together |
| `description` | `string` | No | Description of the inbox placement test |
| `schedule` | `object` | No | Specifies the date and time when the automated inbox placement tests will be sent. |
| `type` | `number` | No | Whether the inbox placement test is a one-time test or an automated test |
| `sending_method` | `number` | No | Whether the inbox placement test will be sent from Instantly or from outside Instantly; 1 From Instantly, 2 From Outside Instantly |
| `campaign_id` | `string` | No | Campaign ID |
| `email_subject` | `string` | No | Email subject of the inbox placement test |
| `email_body` | `string` | No | Email body of the inbox placement test |
| `emails` | `string[]` | No | — |
| `test_code` | `string` | No | Code for identifying inbox placement tests sent from outside Instantly. Use ptid\_ followed by letters, numbers, hyphens, or underscores.... |
| `tags` | `string[]` | No | — |
| `text_only` | `boolean` | No | Disables open tracking |
| `recipients` | `string[]` | No | — |
| `recipients_labels` | `any[]` | No | — |
| `timestamp_created` | `string` | No | Timestamp when the inbox placement test was created |
| `timestamp_next_run` | `string` | No | Timestamp when the inbox placement test will run next |
| `automations` | `any[]` | No | — |
| `status` | `number` | No | Status of the inbox placement test; 1 Active, 2 Paused, 3 Completed |
| `not_sending_status` | `string` | No | Why the inbox placement test is currently not sending. It will be an empty string if there are no issues.; daily\_limits\_hit Daily limits hit, other Other reason |
| `metadata` | `object` | No | Included only when the `with_metadata` parameter is `true`. Contains additional information about the inbox placement test as associated... |

> **schedule full type**
>
> ```ts theme={null}
> {
> }
> ```

> **metadata full type**
>
> ```ts theme={null}
> {
> }
> ```

***

### list

`inboxPlacementTests.list`

List inbox placement tests

**Risk:** `read`

```ts theme={null}
await corsair.instantly.api.inboxPlacementTests.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `limit` | `number` | No | The number of items to return |
| `starting_after` | `string` | No | The ID of the last item in the previous page - used for pagination. You can use the value of the `next_starting_after` field from the previous response. |
| `search` | `string` | No | — |
| `status` | `1 \| 2 \| 3` | No | — |
| `sort_order` | `asc \| desc` | No | Sort order for the results. Results are always sorted by id (which is timestamp-sorted due to UUIDv7). |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[]` | Yes | — |
| `next_starting_after` | `string` | No | Pass as starting\_after to get the next page; absent on the last page |

> **items full type**
>
> ```ts theme={null}
> {
>   id?: string | null,
>   organization_id?: string | null,
>   name?: string | null,
>   delivery_mode?: number | null,
>   description?: string | null,
>   schedule?: {
>   } | null,
>   type?: number | null,
>   sending_method?: number | null,
>   campaign_id?: string | null,
>   email_subject?: string | null,
>   email_body?: string | null,
>   emails?: string[] | null,
>   test_code?: string | null,
>   tags?: string[] | null,
>   text_only?: boolean | null,
>   recipients?: string[] | null,
>   recipients_labels?: any[] | null,
>   timestamp_created?: string | null,
>   timestamp_next_run?: string | null,
>   automations?: any[] | null,
>   status?: number | null,
>   not_sending_status?: string | null
> }[]
> ```

***

### listEspOptions

`inboxPlacementTests.listEspOptions`

List the email providers an inbox placement test can send to (for recipients\_labels)

**Risk:** `read`

```ts theme={null}
await corsair.instantly.api.inboxPlacementTests.listEspOptions({});
```

**Input:** *empty object*

**Output:** `object[]`

> **Output full type**
>
> ```ts theme={null}
> {
>   region?: string | null,
>   sub_region?: string | null,
>   type?: string | null,
>   esp?: string | null
> }[]
> ```

***

### update

`inboxPlacementTests.update`

Rename an inbox placement test, change its schedule or automations, or pause or resume it

**Risk:** `write`

```ts theme={null}
await corsair.instantly.api.inboxPlacementTests.update({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | The ID of the item to update |
| `name` | `string` | No | Name of the inbox placement test |
| `schedule` | `object` | No | Specifies the date and time when the automated inbox placement tests will be sent. |
| `automations` | `object[]` | No | Optional automations to trigger based on conditions |
| `status` | `1 \| 2 \| 3` | No | Status of the inbox placement test; 1 Active, 2 Paused, 3 Completed |

> **schedule full type**
>
> ```ts theme={null}
> {
>   days?: {
>   },
>   timing?: {
>     from?: string
>   },
>   timezone?: Etc/GMT+12 | Etc/GMT+11 | Etc/GMT+10 | America/Anchorage | America/Dawson | America/Creston | America/Chihuahua | America/Boise | America/Belize | America/Chicago | America/Bahia_Banderas | America/Regina | America/Bogota | America/Detroit | America/Indiana/Marengo | America/Caracas | America/Asuncion | America/Glace_Bay | America/Campo_Grande | America/Anguilla | America/Santiago | America/St_Johns | America/Sao_Paulo | America/Argentina/La_Rioja | America/Araguaina | America/Godthab | America/Montevideo | America/Bahia | America/Noronha | America/Scoresbysund | Atlantic/Cape_Verde | Africa/Casablanca | America/Danmarkshavn | Europe/Isle_of_Man | Atlantic/Canary | Africa/Abidjan | Arctic/Longyearbyen | Europe/Belgrade | Africa/Ceuta | Europe/Sarajevo | Africa/Algiers | Africa/Windhoek | Asia/Nicosia | Asia/Beirut | Africa/Cairo | Asia/Damascus | Europe/Bucharest | Africa/Blantyre | Europe/Helsinki | Europe/Istanbul | Asia/Jerusalem | Africa/Tripoli | Asia/Amman | Asia/Baghdad | Europe/Kaliningrad | Asia/Aden | Africa/Addis_Ababa | Europe/Kirov | Europe/Astrakhan | Asia/Tehran | Asia/Dubai | Asia/Baku | Indian/Mahe | Asia/Tbilisi | Asia/Yerevan | Asia/Kabul | Antarctica/Mawson | Asia/Yekaterinburg | Asia/Karachi | Asia/Kolkata | Asia/Colombo | Asia/Kathmandu | Antarctica/Vostok | Asia/Dhaka | Asia/Rangoon | Antarctica/Davis | Asia/Novokuznetsk | Asia/Hong_Kong | Asia/Krasnoyarsk | Asia/Brunei | Australia/Perth | Asia/Taipei | Asia/Choibalsan | Asia/Irkutsk | Asia/Dili | Asia/Pyongyang | Australia/Adelaide | Australia/Darwin | Australia/Brisbane | Australia/Melbourne | Antarctica/DumontDUrville | Australia/Currie | Asia/Chita | Antarctica/Macquarie | Asia/Sakhalin | Pacific/Auckland | Etc/GMT-12 | Pacific/Fiji | Asia/Anadyr | Asia/Kamchatka | Etc/GMT-13 | Pacific/Apia | America/New_York | US/Eastern | America/Indiana/Indianapolis | America/Kentucky/Louisville | US/Central | America/Denver | US/Mountain | America/Phoenix | US/Arizona | US/Alaska | Pacific/Honolulu | US/Hawaii | America/Mexico_City | America/Lima | America/Argentina/Buenos_Aires | Europe/London | Europe/Dublin | Europe/Lisbon | Europe/Paris | Europe/Berlin | Europe/Madrid | Europe/Rome | Europe/Amsterdam | Europe/Brussels | Europe/Vienna | Europe/Zurich | Europe/Stockholm | Europe/Oslo | Europe/Copenhagen | Europe/Prague | Europe/Warsaw | Europe/Budapest | Europe/Athens | Europe/Kyiv | Europe/Kiev | Europe/Riga | Europe/Sofia | Europe/Moscow | Asia/Riyadh | Asia/Qatar | Asia/Kuwait | Asia/Tel_Aviv | Africa/Nairobi | Africa/Lagos | Africa/Johannesburg | Asia/Calcutta | Asia/Yangon | Asia/Bangkok | Asia/Jakarta | Asia/Ho_Chi_Minh | Asia/Singapore | Asia/Kuala_Lumpur | Asia/Shanghai | Asia/Manila | Asia/Tokyo | Asia/Seoul | Australia/Sydney | Australia/Canberra | Australia/Hobart | UTC | Etc/UTC | GMT | Etc/GMT
> }
> ```

> **automations full type**
>
> ```ts theme={null}
> {
>   when: {
>   },
>   then: {
>   }
> }[]
> ```

**Output:** `object`

> **Output full type**
>
> ```ts theme={null}
> {
>   id?: string | null,
>   organization_id?: string | null,
>   name?: string | null,
>   delivery_mode?: number | null,
>   description?: string | null,
>   schedule?: {
>   } | null,
>   type?: number | null,
>   sending_method?: number | null,
>   campaign_id?: string | null,
>   email_subject?: string | null,
>   email_body?: string | null,
>   emails?: string[] | null,
>   test_code?: string | null,
>   tags?: string[] | null,
>   text_only?: boolean | null,
>   recipients?: string[] | null,
>   recipients_labels?: any[] | null,
>   timestamp_created?: string | null,
>   timestamp_next_run?: string | null,
>   automations?: any[] | null,
>   status?: number | null,
>   not_sending_status?: string | null
> } | {
>   parse_warning: string
> }
> ```

***

## Lead Labels

### create

`leadLabels.create`

Create a custom lead label (a status such as "Demo requested") marked positive, negative or neutral

**Risk:** `write`

```ts theme={null}
await corsair.instantly.api.leadLabels.create({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `label` | `string` | Yes | Display label for the custom lead label |
| `interest_status_label` | `positive \| negative \| neutral` | Yes | Interest status label associated with this label; positive Positive, negative Negative, neutral Neutral |
| `description` | `string` | No | Detailed description of the custom lead label purpose |
| `use_with_ai` | `boolean` | No | Whether this label should be used with AI features |

**Output:** `object`

> **Output full type**
>
> ```ts theme={null}
> {
>   id?: string | null,
>   timestamp_created?: string | null,
>   created_by?: string | null,
>   organization_id?: string | null,
>   label?: string | null,
>   interest_status_label?: string | null,
>   interest_status?: number | null,
>   description?: string | null,
>   use_with_ai?: boolean | null,
>   access_grants?: any[] | null
> } | {
>   parse_warning: string
> }
> ```

***

### delete

`leadLabels.delete`

Delete a custom lead label; its leads move to reassigned\_status

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

```ts theme={null}
await corsair.instantly.api.leadLabels.delete({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | The ID of the item to delete |
| `reassigned_status` | `number` | No | The interest status to reassign leads and emails to. |

**Output:** `object`

> **Output full type**
>
> ```ts theme={null}
> {
>   id?: string | null,
>   timestamp_created?: string | null,
>   created_by?: string | null,
>   organization_id?: string | null,
>   label?: string | null,
>   interest_status_label?: string | null,
>   interest_status?: number | null,
>   description?: string | null,
>   use_with_ai?: boolean | null,
>   access_grants?: any[] | null
> } | {
>   parse_warning: string
> }
> ```

***

### get

`leadLabels.get`

Get one custom lead label by ID

**Risk:** `read`

```ts theme={null}
await corsair.instantly.api.leadLabels.get({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | The ID of the requested item |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | No | Unique identifier for the custom lead label |
| `timestamp_created` | `string` | No | Timestamp when the custom lead label was created |
| `created_by` | `string` | No | User ID of the creator of this label. Null when the label was created by an API key or an internal service |
| `organization_id` | `string` | No | Organization ID that owns this custom lead label |
| `label` | `string` | No | Display label for the custom lead label |
| `interest_status_label` | `string` | No | Interest status label associated with this label; positive Positive, negative Negative, neutral Neutral |
| `interest_status` | `number` | No | Interest status associated with this label. This is generated automatically by us. |
| `description` | `string` | No | Detailed description of the custom lead label purpose |
| `use_with_ai` | `boolean` | No | Whether this label should be used with AI features |
| `access_grants` | `any[]` | No | — |

***

### list

`leadLabels.list`

List the workspace's custom lead labels

**Risk:** `read`

```ts theme={null}
await corsair.instantly.api.leadLabels.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `limit` | `number` | No | The number of items to return |
| `starting_after` | `string` | No | The starting after timestamp to filter lead labels by. |
| `search` | `string` | No | The search query to filter lead labels. |
| `interest_status` | `positive \| neutral \| negative` | No | The interest status to filter lead labels by. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[]` | Yes | — |
| `next_starting_after` | `string` | No | Pass as starting\_after to get the next page; absent on the last page |

> **items full type**
>
> ```ts theme={null}
> {
>   id?: string | null,
>   timestamp_created?: string | null,
>   created_by?: string | null,
>   organization_id?: string | null,
>   label?: string | null,
>   interest_status_label?: string | null,
>   interest_status?: number | null,
>   description?: string | null,
>   use_with_ai?: boolean | null,
>   access_grants?: any[] | null
> }[]
> ```

***

### testAiReplyLabel

`leadLabels.testAiReplyLabel`

Ask which label Instantly's AI would give a reply text, to test custom labels. Changes nothing, but the workspace gets 500 of these tests per 30 days

**Risk:** `read`

```ts theme={null}
await corsair.instantly.api.leadLabels.testAiReplyLabel({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `reply_text` | `string` | Yes | The reply text to classify. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `result` | `string` | No | The predicted lead label. |
| `custom_labels_considered` | `string[]` | No | — |

***

### update

`leadLabels.update`

Rename a custom lead label or change its description, sentiment or AI use

**Risk:** `write`

```ts theme={null}
await corsair.instantly.api.leadLabels.update({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | The ID of the item to update |
| `label` | `string` | No | Display label for the custom lead label |
| `interest_status_label` | `positive \| negative \| neutral` | No | Interest status label associated with this label; positive Positive, negative Negative, neutral Neutral |
| `description` | `string` | No | Detailed description of the custom lead label purpose |
| `use_with_ai` | `boolean` | No | Whether this label should be used with AI features |

**Output:** `object`

> **Output full type**
>
> ```ts theme={null}
> {
>   id?: string | null,
>   timestamp_created?: string | null,
>   created_by?: string | null,
>   organization_id?: string | null,
>   label?: string | null,
>   interest_status_label?: string | null,
>   interest_status?: number | null,
>   description?: string | null,
>   use_with_ai?: boolean | null,
>   access_grants?: any[] | null
> } | {
>   parse_warning: string
> }
> ```

***

## Lead Lists

### create

`leadLists.create`

Create a lead list to hold leads outside any campaign (add to it with leads.addBulk list\_id)

**Risk:** `write`

```ts theme={null}
await corsair.instantly.api.leadLists.create({ name: 'Boston IT directors' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | — |
| `has_enrichment_task` | `boolean` | No | Enrich every lead added to the list |
| `owned_by` | `string` | No | Workspace user ID |

**Output:** `object`

> **Output full type**
>
> ```ts theme={null}
> {
>   id: string,
>   name?: string | null,
>   organization_id?: string | null,
>   has_enrichment_task?: boolean | null,
>   owned_by?: string | null,
>   timestamp_created?: string | null
> } | {
>   parse_warning: string
> }
> ```

***

### delete

`leadLists.delete`

Delete a lead list permanently

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

```ts theme={null}
await corsair.instantly.api.leadLists.delete({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | The ID of the item to delete |

**Output:** `object`

> **Output full type**
>
> ```ts theme={null}
> {
> } | {
>   parse_warning: string
> }
> ```

***

### get

`leadLists.get`

Get one lead list by ID: name, owner and enrichment setting

**Risk:** `read`

```ts theme={null}
await corsair.instantly.api.leadLists.get({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | The ID of the requested item |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | No | Unique identifier for the lead list |
| `organization_id` | `string` | No | Organization ID that owns this lead list |
| `has_enrichment_task` | `boolean` | No | Whether this list runs the enrichment process on every added lead or not |
| `owned_by` | `string` | No | User ID of the owner of this lead list. Defaults to the user that created the list |
| `name` | `string` | No | Name of the lead list |
| `timestamp_created` | `string` | No | Timestamp when the lead list was created |

***

### getVerificationStats

`leadLists.getVerificationStats`

Counts of a lead list's leads by email verification result

**Risk:** `read`

```ts theme={null}
await corsair.instantly.api.leadLists.getVerificationStats({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | id of the leadLists item |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `stats` | `object` | No | Sums up the leads by their verification status |
| `total_leads` | `number` | No | Total number of leads in the list |

> **stats full type**
>
> ```ts theme={null}
> {
> }
> ```

***

### list

`leadLists.list`

List lead lists (leads stored outside any campaign)

**Risk:** `read`

```ts theme={null}
await corsair.instantly.api.leadLists.list({ search: 'Boston' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `limit` | `number` | No | Items per page, 1 to 100 |
| `starting_after` | `string` | No | Cursor: `next_starting_after` from the previous page |
| `search` | `string` | No | — |
| `has_enrichment_task` | `boolean` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[]` | Yes | — |
| `next_starting_after` | `string` | No | Pass as starting\_after to get the next page; absent on the last page |

> **items full type**
>
> ```ts theme={null}
> {
>   id: string,
>   name?: string | null,
>   organization_id?: string | null,
>   has_enrichment_task?: boolean | null,
>   owned_by?: string | null,
>   timestamp_created?: string | null
> }[]
> ```

***

### update

`leadLists.update`

Rename a lead list, change its owner or turn enrichment of new leads on or off

**Risk:** `write`

```ts theme={null}
await corsair.instantly.api.leadLists.update({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | The ID of the item to update |
| `has_enrichment_task` | `boolean` | No | Whether this list runs the enrichment process on every added lead or not |
| `owned_by` | `string` | No | User ID of the owner of this lead list. Defaults to the user that created the list |
| `name` | `string` | No | Name of the lead list |

**Output:** `object`

> **Output full type**
>
> ```ts theme={null}
> {
>   id?: string | null,
>   organization_id?: string | null,
>   has_enrichment_task?: boolean | null,
>   owned_by?: string | null,
>   name?: string | null,
>   timestamp_created?: string | null
> } | {
>   parse_warning: string
> }
> ```

***

## Leads

### addBulk

`leads.addBulk`

Add up to 1,000 leads to one campaign or list, with custom variables. Skips leads already in the workspace unless skip\_if\_in\_workspace is false, and is never retried automatically. Every lead uploaded counts toward the plan's lifetime contact limit, including re-uploads and the same person in a second campaign; re-adding or moving a lead who already replied restarts their sequence at step 1

**Risk:** `write` · **Irreversible**

```ts theme={null}
await corsair.instantly.api.leads.addBulk({ campaign_id: '01a181d1-c62c-745b-b842-870ce5b29862', leads: [{ email: 'jordan@acme-logistics.com', first_name: 'Jordan' }] });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `campaign_id` | `string` | No | Campaign to add the leads to (or list\_id, not both) |
| `list_id` | `string` | No | Lead list instead |
| `leads` | `object[]` | Yes | Up to 1,000 leads per call |
| `skip_if_in_workspace` | `boolean` | Yes | Skip leads already anywhere in the workspace (default true). Every upload counts toward the lifetime contact limit, and re-adding a lead who already replied restarts them at step 1 |
| `skip_if_in_campaign` | `boolean` | No | Skip leads already in any campaign |
| `skip_if_in_list` | `boolean` | No | Skip leads already in any list |
| `blocklist_id` | `string` | No | — |
| `assigned_to` | `string` | No | Workspace user ID to assign every lead to |
| `verify_leads_on_import` | `boolean` | No | — |

> **leads full type**
>
> ```ts theme={null}
> {
>   email?: string | null,
>   first_name?: string | null,
>   last_name?: string | null,
>   company_name?: string | null,
>   job_title?: string | null,
>   phone?: string | null,
>   website?: string | null,
>   personalization?: string | null,
>   pl_value_lead?: string | null,
>   assigned_to?: string | null,
>   custom_variables?: {
>   },
>   lt_interest_status?: number
> }[]
> ```

**Output:** `object`

> **Output full type**
>
> ```ts theme={null}
> {
>   status?: string | null,
>   total_sent?: number | null,
>   leads_uploaded?: number | null,
>   duplicated_leads?: number | null,
>   skipped_count?: number | null,
>   in_blocklist?: number | null,
>   blocklist_used?: string | null,
>   invalid_email_count?: number | null,
>   incomplete_count?: number | null,
>   duplicate_email_count?: number | null,
>   remaining_in_plan?: number | null,
>   created_leads?: {
>     index?: number | null,
>     id?: string | null,
>     email?: string | null,
>     first_name?: string | null,
>     last_name?: string | null
>   }[] | null
> } | {
>   parse_warning: string
> }
> ```

***

### assign

`leads.assign`

Assign leads (by IDs or filters) to workspace users. Runs in the background

**Risk:** `write`

```ts theme={null}
await corsair.instantly.api.leads.assign({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `search` | `string` | No | The search query to filter leads by. |
| `filter` | `FILTER_VAL_CONTACTED \| FILTER_VAL_NOT_CONTACTED \| FILTER_VAL_COMPLETED \| FILTER_VAL_UNSUBSCRIBED \| FILTER_VAL_ACTIVE \| FILTER_LEAD_INTERESTED \| FILTER_LEAD_NOT_INTERESTED \| FILTER_LEAD_MEETING_BOOKED \| FILTER_LEAD_MEETING_COMPLETED \| FILTER_LEAD_CLOSED \| FILTER_LEAD_OUT_OF_OFFICE \| FILTER_LEAD_WRONG_PERSON \| FILTER_LEAD_LOST \| FILTER_LEAD_NO_SHOW \| FILTER_LEAD_CUSTOM_LABEL_POSITIVE \| FILTER_LEAD_CUSTOM_LABEL_NEGATIVE \| FILTER_VAL_BOUNCED \| FILTER_VAL_SKIPPED \| FILTER_VAL_RISKY \| FILTER_VAL_INVALID \| FILTER_VAL_VALID \| FILTER_VAL_CATCH_ALL \| FILTER_VAL_NOT_VERIFIED \| FILTER_VAL_IN_SUBSEQUENCE \| FILTER_VAL_OPENED_NO_REPLY \| FILTER_VAL_COMPLETED_NO_REPLY \| FILTER_VAL_NO_OPENS \| FILTER_VAL_REPLIED \| FILTER_VAL_LINK_CLICKED` | No | The filter to apply to the leads. |
| `campaign` | `string` | No | The ID of the campaign to filter leads by. |
| `list_id` | `string` | No | The ID of the list to filter leads by. |
| `in_campaign` | `boolean` | No | Whether the leads are in the campaign. |
| `in_list` | `boolean` | No | Whether the leads are in the list. |
| `organization_user_ids` | `string[]` | Yes | — |
| `smart_view_id` | `string` | No | The ID of the smart view to filter leads by. |
| `ids` | `string[]` | No | The IDs of the leads to filter by. |
| `limit` | `number` | No | The limit of the number of leads to return. |
| `queries` | `object[]` | No | — |
| `assigned_to` | `string` | No | Filter leads by their current owner (the user they are currently assigned to). |
| `has_clause` | `boolean` | No | Whether this endpoint should list data based on the filters currently applied in the web app. |

> **queries full type**
>
> ```ts theme={null}
> {
>   actionType: reply | email-open | last-contacted | link-click | lead-status | lead-status-change,
>   values: {
>   }
> }[]
> ```

**Output:** `object`

> **Output full type**
>
> ```ts theme={null}
> {
>   status?: string | null,
>   message?: string | null
> } | {
>   parse_warning: string
> }
> ```

***

### create

`leads.create`

Add one lead to a campaign or list. Skips leads already in the workspace unless skip\_if\_in\_workspace is false. Every lead uploaded counts toward the plan's lifetime contact limit, including re-uploads and the same person in a second campaign; re-adding or moving a lead who already replied restarts their sequence at step 1

**Risk:** `write` · **Irreversible**

```ts theme={null}
await corsair.instantly.api.leads.create({ campaign: '01a181d1-c62c-745b-b842-870ce5b29862', email: 'jordan@acme-logistics.com', first_name: 'Jordan' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `campaign` | `string` | No | Campaign ID to add the lead to |
| `list_id` | `string` | No | Lead list ID instead |
| `email` | `string` | No | Lead email address |
| `first_name` | `string` | No | — |
| `last_name` | `string` | No | — |
| `company_name` | `string` | No | — |
| `job_title` | `string` | No | — |
| `phone` | `string` | No | — |
| `website` | `string` | No | — |
| `personalization` | `string` | No | Personalized opening line, used as `{{personalization}}` |
| `pl_value_lead` | `string` | No | Potential value of the lead |
| `assigned_to` | `string` | No | Workspace user ID |
| `custom_variables` | `object` | No | Custom variables for personalization, e.g. `{ "pain_point": "slow onboarding" }`. Values must be strings, numbers, booleans or null; use them in copy as `{{pain_point}}` |
| `lt_interest_status` | `number` | No | Interest status: 1 Interested, 2 Meeting booked, 3 Meeting completed, 4 Won, 0 Out of office, -1 Not interested, -2 Wrong person, -3 Lost, -4 No show, or a custom label value |
| `skip_if_in_workspace` | `boolean` | Yes | Skip leads already anywhere in the workspace (default true). Every upload counts toward the lifetime contact limit, and re-adding a lead who already replied restarts them at step 1 |
| `skip_if_in_campaign` | `boolean` | No | — |
| `skip_if_in_list` | `boolean` | No | — |
| `blocklist_id` | `string` | No | Check against this blocklist instead of the default |
| `verify_leads_on_import` | `boolean` | No | — |

> **custom\_variables full type**
>
> ```ts theme={null}
> {
> }
> ```

**Output:** `object`

> **Output full type**
>
> ```ts theme={null}
> {
>   id?: string,
>   email?: string | null,
>   first_name?: string | null,
>   last_name?: string | null,
>   company_name?: string | null,
>   company_domain?: string | null,
>   job_title?: string | null,
>   phone?: string | null,
>   website?: string | null,
>   personalization?: string | null,
>   campaign?: string | null,
>   list_id?: string | null,
>   status?: number | null,
>   lt_interest_status?: number | null,
>   email_open_count?: number | null,
>   email_reply_count?: number | null,
>   email_click_count?: number | null,
>   verification_status?: number | null,
>   payload?: {
>   } | null,
>   timestamp_created?: string | null,
>   timestamp_updated?: string | null,
>   timestamp_last_contact?: string | null,
>   timestamp_last_reply?: string | null,
>   timestamp_last_interest_change?: string | null
> } | {
>   parse_warning: string
> }
> ```

***

### delete

`leads.delete`

Delete a lead from the workspace. Its upload still counts toward the lifetime contact limit

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

```ts theme={null}
await corsair.instantly.api.leads.delete({ id: '01a181d1-c62c-745b-b842-870d0c3a11f4' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | Lead ID (UUID) |

**Output:** `object`

> **Output full type**
>
> ```ts theme={null}
> {
>   id?: string,
>   email?: string | null,
>   first_name?: string | null,
>   last_name?: string | null,
>   company_name?: string | null,
>   company_domain?: string | null,
>   job_title?: string | null,
>   phone?: string | null,
>   website?: string | null,
>   personalization?: string | null,
>   campaign?: string | null,
>   list_id?: string | null,
>   status?: number | null,
>   lt_interest_status?: number | null,
>   email_open_count?: number | null,
>   email_reply_count?: number | null,
>   email_click_count?: number | null,
>   verification_status?: number | null,
>   payload?: {
>   } | null,
>   timestamp_created?: string | null,
>   timestamp_updated?: string | null,
>   timestamp_last_contact?: string | null,
>   timestamp_last_reply?: string | null,
>   timestamp_last_interest_change?: string | null
> } | {
>   parse_warning: string
> }
> ```

***

### deleteMany

`leads.deleteMany`

Delete leads from one campaign or list, optionally only some IDs or a status. Their uploads still count toward the lifetime contact limit

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

```ts theme={null}
await corsair.instantly.api.leads.deleteMany({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `campaign_id` | `string` | No | The ID of the campaign to delete leads from. Required if `list_id` is not provided. |
| `list_id` | `string` | No | The ID of the list to delete leads from. Required if `campaign_id` is not provided. |
| `status` | `1 \| 2 \| 3 \| -1 \| -2 \| -3` | No | Optional status filter. Only delete leads with this status.; 1 Active, 2 Paused, 3 Completed, -1 Bounced, -2 Unsubscribed, -3 Skipped |
| `ids` | `string[]` | No | Optional array of specific lead IDs to delete. When provided, only these leads will be deleted from the specified campaign or list. |
| `limit` | `number` | No | Maximum number of leads to delete. If not specified, all matching leads will be deleted. |

**Output:** `object`

> **Output full type**
>
> ```ts theme={null}
> {
>   count?: number | null
> } | {
>   parse_warning: string
> }
> ```

***

### get

`leads.get`

Get one lead with status, interest status, open/reply/click counts and custom variables

**Risk:** `read`

```ts theme={null}
await corsair.instantly.api.leads.get({ id: '01a181d1-c62c-745b-b842-870d0c3a11f4' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | Lead ID (UUID) |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | — |
| `email` | `string` | No | — |
| `first_name` | `string` | No | — |
| `last_name` | `string` | No | — |
| `company_name` | `string` | No | — |
| `company_domain` | `string` | No | — |
| `job_title` | `string` | No | — |
| `phone` | `string` | No | — |
| `website` | `string` | No | — |
| `personalization` | `string` | No | — |
| `campaign` | `string` | No | Campaign ID |
| `list_id` | `string` | No | Lead list ID |
| `status` | `number` | No | Read-only: 1 Active, 2 Paused, 3 Completed, -1 Bounced, -2 Unsubscribed, -3 Skipped |
| `lt_interest_status` | `number` | No | 1 Interested, 2 Meeting booked, 3 Meeting completed, 4 Won, 0 Out of office, -1 Not interested, -2 Wrong person, -3 Lost, -4 No show; absent = plain Lead |
| `email_open_count` | `number` | No | — |
| `email_reply_count` | `number` | No | — |
| `email_click_count` | `number` | No | — |
| `verification_status` | `number` | No | 0 Not verified, 1 Verified, 11 Pending, -1 Invalid, -2 Risky, -3 Catch-all |
| `payload` | `object` | No | Custom variables |
| `timestamp_created` | `string` | No | — |
| `timestamp_updated` | `string` | No | — |
| `timestamp_last_contact` | `string` | No | — |
| `timestamp_last_reply` | `string` | No | — |
| `timestamp_last_interest_change` | `string` | No | — |

> **payload full type**
>
> ```ts theme={null}
> {
> }
> ```

***

### list

`leads.list`

List leads in a campaign or list, or across the workspace; filter by email, status (replied, interested, bounced and more) or search

**Risk:** `read`

```ts theme={null}
await corsair.instantly.api.leads.list({ campaign: '01a181d1-c62c-745b-b842-870ce5b29862', filter: 'FILTER_VAL_REPLIED', limit: 50 });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `limit` | `number` | No | Items per page, 1 to 100 |
| `starting_after` | `string` | No | Cursor: `next_starting_after` from the previous page |
| `campaign` | `string` | No | Campaign ID |
| `list_id` | `string` | No | Lead list ID |
| `search` | `string` | No | Match email, name, company or job title |
| `filter` | `FILTER_VAL_CONTACTED \| FILTER_VAL_NOT_CONTACTED \| FILTER_VAL_COMPLETED \| FILTER_VAL_UNSUBSCRIBED \| FILTER_VAL_ACTIVE \| FILTER_VAL_REPLIED \| FILTER_VAL_OPENED_NO_REPLY \| FILTER_VAL_COMPLETED_NO_REPLY \| FILTER_VAL_NO_OPENS \| FILTER_VAL_LINK_CLICKED \| FILTER_VAL_BOUNCED \| FILTER_VAL_SKIPPED \| FILTER_VAL_RISKY \| FILTER_VAL_INVALID \| FILTER_VAL_VALID \| FILTER_VAL_CATCH_ALL \| FILTER_VAL_NOT_VERIFIED \| FILTER_VAL_IN_SUBSEQUENCE \| FILTER_LEAD_INTERESTED \| FILTER_LEAD_NOT_INTERESTED \| FILTER_LEAD_MEETING_BOOKED \| FILTER_LEAD_MEETING_COMPLETED \| FILTER_LEAD_CLOSED \| FILTER_LEAD_OUT_OF_OFFICE \| FILTER_LEAD_WRONG_PERSON \| FILTER_LEAD_LOST \| FILTER_LEAD_NO_SHOW \| FILTER_LEAD_CUSTOM_LABEL_POSITIVE \| FILTER_LEAD_CUSTOM_LABEL_NEGATIVE` | No | — |
| `contacts` | `string[]` | No | Only leads with these email addresses |
| `ids` | `string[]` | No | Only these lead IDs |
| `excluded_ids` | `string[]` | No | — |
| `in_campaign` | `boolean` | No | — |
| `in_list` | `boolean` | No | — |
| `distinct_contacts` | `boolean` | No | One row per email address; the cursor is then the last email instead of the last ID |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[]` | Yes | — |
| `next_starting_after` | `string` | No | Pass as starting\_after to get the next page; absent on the last page |

> **items full type**
>
> ```ts theme={null}
> {
>   id: string,
>   email?: string | null,
>   first_name?: string | null,
>   last_name?: string | null,
>   company_name?: string | null,
>   company_domain?: string | null,
>   job_title?: string | null,
>   phone?: string | null,
>   website?: string | null,
>   personalization?: string | null,
>   campaign?: string | null,
>   list_id?: string | null,
>   status?: number | null,
>   lt_interest_status?: number | null,
>   email_open_count?: number | null,
>   email_reply_count?: number | null,
>   email_click_count?: number | null,
>   verification_status?: number | null,
>   payload?: {
>   } | null,
>   timestamp_created?: string | null,
>   timestamp_updated?: string | null,
>   timestamp_last_contact?: string | null,
>   timestamp_last_reply?: string | null,
>   timestamp_last_interest_change?: string | null
> }[]
> ```

***

### merge

`leads.merge`

Merge one lead into another (destination\_lead\_id); the first lead is removed

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

```ts theme={null}
await corsair.instantly.api.leads.merge({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `lead_id` | `string` | Yes | The ID of the lead to merge. |
| `destination_lead_id` | `string` | Yes | The ID of the destination lead to merge into. |

**Output:** `object`

> **Output full type**
>
> ```ts theme={null}
> {
>   id?: string | null,
>   timestamp_created?: string | null,
>   timestamp_updated?: string | null,
>   organization?: string | null,
>   campaign?: string | null,
>   status?: number | null,
>   email?: string | null,
>   personalization?: string | null,
>   website?: string | null,
>   last_name?: string | null,
>   first_name?: string | null,
>   company_name?: string | null,
>   job_title?: string | null,
>   phone?: string | null,
>   email_open_count?: number | null,
>   email_reply_count?: number | null,
>   email_click_count?: number | null,
>   company_domain?: string | null,
>   status_summary?: {
>   } | null,
>   payload?: {
>   } | null,
>   status_summary_subseq?: {
>   } | null,
>   last_step_from?: string | null,
>   last_step_id?: string | null,
>   last_step_timestamp_executed?: string | null,
>   email_opened_step?: number | null,
>   email_opened_variant?: number | null,
>   email_replied_step?: number | null,
>   email_replied_variant?: number | null,
>   email_clicked_step?: number | null,
>   email_clicked_variant?: number | null,
>   lt_interest_status?: number | null,
>   subsequence_id?: string | null,
>   verification_status?: number | null,
>   pl_value_lead?: string | null,
>   timestamp_added_subsequence?: string | null,
>   timestamp_last_contact?: string | null,
>   timestamp_last_open?: string | null,
>   timestamp_last_reply?: string | null,
>   timestamp_last_interest_change?: string | null,
>   timestamp_last_click?: string | null,
>   enrichment_status?: number | null,
>   list_id?: string | null,
>   last_contacted_from?: string | null,
>   uploaded_by_user?: string | null,
>   upload_method?: string | null,
>   assigned_to?: string | null,
>   is_website_visitor?: boolean | null,
>   timestamp_last_touch?: string | null,
>   esp_code?: number | null,
>   esg_code?: number | null
> } | {
>   parse_warning: string
> }
> ```

***

### move

`leads.move`

Move or copy leads (by IDs or filters) to another campaign or list, as a background job; returns the job. Moving a lead who already replied restarts their sequence at step 1

**Risk:** `write`

```ts theme={null}
await corsair.instantly.api.leads.move({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `search` | `string` | No | A search string to search the leads against - can be First Name, Last Name, or Email |
| `filter` | `string` | No | Filter criteria for leads. For custom lead labels, use the `interest_status` field.; FILTER\_VAL\_CONTACTED Filter for contacted leads, FILTER\_VAL\_NOT\_CONTACTED Filter for not contacted leads, FILTER\_VAL\_COMPLETED Filter for completed leads, FILTER\_VAL\_UNSUBSCRIBED Filter for unsubscrib |
| `campaign` | `string` | No | Campaign ID to filter leads |
| `list_id` | `string` | No | List ID to filter leads |
| `in_campaign` | `boolean` | No | Whether the lead is in a campaign |
| `in_list` | `boolean` | No | Whether the lead is in a list |
| `ids` | `string[]` | No | Array of lead IDs to include. When using this parameter, you must provide either `campaign` or `list_id` to specify which campaign or list to filter the leads from. This parameter acts as a filter within the specified... |
| `queries` | `object[]` | No | — |
| `excluded_ids` | `string[]` | No | Array of lead IDs to exclude |
| `contacts` | `string[]` | No | Array of emails the leads needs to have |
| `to_campaign_id` | `string` | No | The ID of the campaign to move the leads to. |
| `to_list_id` | `string` | No | The ID of the list to move the leads to. |
| `ignore_resource_filter_clauses` | `boolean` | No | Whether to ignore saved lead-finder clauses for the source campaign/list when selecting leads to move. |
| `check_duplicates_in_campaigns` | `boolean` | No | Whether to check duplicates in campaigns. |
| `skip_leads_in_verification` | `boolean` | No | Whether to skip leads in verification. |
| `skip_invalid_emails` | `boolean` | No | Whether to leave behind leads whose email verified as invalid or risky. Leads that were never verified still move. |
| `limit` | `number` | No | The limit of the number of leads to move. |
| `assigned_to` | `string` | No | The ID of the user to assign the leads to. |
| `esp_code` | `0 \| 1 \| 2 \| 3 \| 8 \| 9 \| 10 \| 12 \| 13 \| 999 \| 1000` | No | The ESP code to move the leads for.; 0 In Queue, 1 Google, 2 Microsoft, 3 Zoho, 8 AirMail, 9 Yahoo, 10 Yandex, 12 Webde, 13 Liberoit, 999 Other, 1000 Not Found |
| `esg_code` | `0 \| 1 \| 2 \| 3 \| 4 \| all \| none` | No | The ESG code to move the leads for.; 0 In Queue, 1 Barracuda, 2 Mimecast, 3 Proofpoint, 4 Cisco, all All, none None |
| `copy_leads` | `boolean` | No | Whether to copy the leads. |
| `check_duplicates` | `boolean` | No | Whether to check duplicates. |
| `reset_interest_status` | `boolean` | No | Whether to reset the interest status of leads when moving or copying them. When true, the interest status will be reset. When false, the existing interest status will be preserved; for non-copy campaign-to-campaign... |

> **queries full type**
>
> ```ts theme={null}
> {
>   actionType: reply | email-open | last-contacted | link-click | lead-status | lead-status-change,
>   values: {
>   }
> }[]
> ```

**Output:** `object`

> **Output full type**
>
> ```ts theme={null}
> {
>   id?: string | null,
>   workspace_id?: string | null,
>   user_id?: string | null,
>   type?: string | null,
>   entity_id?: string | null,
>   entity_type?: string | null,
>   data?: {
>   } | null,
>   progress?: number | null,
>   status?: string | null,
>   created_at?: string | null,
>   updated_at?: string | null
> } | {
>   parse_warning: string
> }
> ```

***

### moveToSubsequence

`leads.moveToSubsequence`

Put a lead into a subsequence. This SENDS REAL EMAIL: the subsequence starts emailing the lead

**Risk:** `write`

```ts theme={null}
await corsair.instantly.api.leads.moveToSubsequence({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `subsequence_id` | `string` | Yes | — |
| `id` | `string` | Yes | — |

**Output:** `object`

> **Output full type**
>
> ```ts theme={null}
> {
>   id?: string | null,
>   timestamp_created?: string | null,
>   timestamp_updated?: string | null,
>   organization?: string | null,
>   campaign?: string | null,
>   status?: number | null,
>   email?: string | null,
>   personalization?: string | null,
>   website?: string | null,
>   last_name?: string | null,
>   first_name?: string | null,
>   company_name?: string | null,
>   job_title?: string | null,
>   phone?: string | null,
>   email_open_count?: number | null,
>   email_reply_count?: number | null,
>   email_click_count?: number | null,
>   company_domain?: string | null,
>   status_summary?: {
>   } | null,
>   payload?: {
>   } | null,
>   status_summary_subseq?: {
>   } | null,
>   last_step_from?: string | null,
>   last_step_id?: string | null,
>   last_step_timestamp_executed?: string | null,
>   email_opened_step?: number | null,
>   email_opened_variant?: number | null,
>   email_replied_step?: number | null,
>   email_replied_variant?: number | null,
>   email_clicked_step?: number | null,
>   email_clicked_variant?: number | null,
>   lt_interest_status?: number | null,
>   subsequence_id?: string | null,
>   verification_status?: number | null,
>   pl_value_lead?: string | null,
>   timestamp_added_subsequence?: string | null,
>   timestamp_last_contact?: string | null,
>   timestamp_last_open?: string | null,
>   timestamp_last_reply?: string | null,
>   timestamp_last_interest_change?: string | null,
>   timestamp_last_click?: string | null,
>   enrichment_status?: number | null,
>   list_id?: string | null,
>   last_contacted_from?: string | null,
>   uploaded_by_user?: string | null,
>   upload_method?: string | null,
>   assigned_to?: string | null,
>   is_website_visitor?: boolean | null,
>   timestamp_last_touch?: string | null,
>   esp_code?: number | null,
>   esg_code?: number | null
> } | {
>   parse_warning: string
> }
> ```

***

### removeFromSubsequence

`leads.removeFromSubsequence`

Take a lead out of the subsequence it is in; it stops getting that subsequence's emails

**Risk:** `destructive`

```ts theme={null}
await corsair.instantly.api.leads.removeFromSubsequence({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | The ID of the lead to remove from the subsequence. |

**Output:** `object`

> **Output full type**
>
> ```ts theme={null}
> {
>   id?: string | null,
>   timestamp_created?: string | null,
>   timestamp_updated?: string | null,
>   organization?: string | null,
>   campaign?: string | null,
>   status?: number | null,
>   email?: string | null,
>   personalization?: string | null,
>   website?: string | null,
>   last_name?: string | null,
>   first_name?: string | null,
>   company_name?: string | null,
>   job_title?: string | null,
>   phone?: string | null,
>   email_open_count?: number | null,
>   email_reply_count?: number | null,
>   email_click_count?: number | null,
>   company_domain?: string | null,
>   status_summary?: {
>   } | null,
>   payload?: {
>   } | null,
>   status_summary_subseq?: {
>   } | null,
>   last_step_from?: string | null,
>   last_step_id?: string | null,
>   last_step_timestamp_executed?: string | null,
>   email_opened_step?: number | null,
>   email_opened_variant?: number | null,
>   email_replied_step?: number | null,
>   email_replied_variant?: number | null,
>   email_clicked_step?: number | null,
>   email_clicked_variant?: number | null,
>   lt_interest_status?: number | null,
>   subsequence_id?: string | null,
>   verification_status?: number | null,
>   pl_value_lead?: string | null,
>   timestamp_added_subsequence?: string | null,
>   timestamp_last_contact?: string | null,
>   timestamp_last_open?: string | null,
>   timestamp_last_reply?: string | null,
>   timestamp_last_interest_change?: string | null,
>   timestamp_last_click?: string | null,
>   enrichment_status?: number | null,
>   list_id?: string | null,
>   last_contacted_from?: string | null,
>   uploaded_by_user?: string | null,
>   upload_method?: string | null,
>   assigned_to?: string | null,
>   is_website_visitor?: boolean | null,
>   timestamp_last_touch?: string | null,
>   esp_code?: number | null,
>   esg_code?: number | null
> } | {
>   parse_warning: string
> }
> ```

***

### update

`leads.update`

Update a lead's name, company, job title, phone, website, personalization or custom variables. Its status is read-only: to stop follow-ups use leads.updateInterestStatus

**Risk:** `write`

```ts theme={null}
await corsair.instantly.api.leads.update({ id: '01a181d1-c62c-745b-b842-870d0c3a11f4', job_title: 'CIO', custom_variables: { tier: 1 } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | Lead ID (UUID) |
| `first_name` | `string` | No | — |
| `last_name` | `string` | No | — |
| `company_name` | `string` | No | — |
| `job_title` | `string` | No | — |
| `phone` | `string` | No | — |
| `website` | `string` | No | — |
| `personalization` | `string` | No | — |
| `pl_value_lead` | `string` | No | — |
| `assigned_to` | `string` | No | — |
| `custom_variables` | `object` | No | Custom variables to add to the lead's payload |

> **custom\_variables full type**
>
> ```ts theme={null}
> {
> }
> ```

**Output:** `object`

> **Output full type**
>
> ```ts theme={null}
> {
>   id: string,
>   email?: string | null,
>   first_name?: string | null,
>   last_name?: string | null,
>   company_name?: string | null,
>   company_domain?: string | null,
>   job_title?: string | null,
>   phone?: string | null,
>   website?: string | null,
>   personalization?: string | null,
>   campaign?: string | null,
>   list_id?: string | null,
>   status?: number | null,
>   lt_interest_status?: number | null,
>   email_open_count?: number | null,
>   email_reply_count?: number | null,
>   email_click_count?: number | null,
>   verification_status?: number | null,
>   payload?: {
>   } | null,
>   timestamp_created?: string | null,
>   timestamp_updated?: string | null,
>   timestamp_last_contact?: string | null,
>   timestamp_last_reply?: string | null,
>   timestamp_last_interest_change?: string | null
> } | {
>   parse_warning: string
> }
> ```

***

### updateInterestStatus

`leads.updateInterestStatus`

Set a lead's interest status by email (Interested, Meeting booked, Not interested, Wrong person and so on, or null to reset). In a campaign this completes the lead, which stops its follow-ups: use it when a lead answered on another channel. Applied in the background

**Risk:** `write`

```ts theme={null}
await corsair.instantly.api.leads.updateInterestStatus({ lead_email: 'jordan@acme-logistics.com', interest_value: 2, campaign_id: '01a181d1-c62c-745b-b842-870ce5b29862' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `lead_email` | `string` | Yes | Email of the lead |
| `interest_value` | `number` | No | 1 Interested, 2 Meeting booked, 3 Meeting completed, 4 Won, 0 Out of office, -1 Not interested, -2 Wrong person, -3 Lost, -4 No show, a custom label value, or null to reset to plain Lead |
| `campaign_id` | `string` | No | Only in this campaign |
| `list_id` | `string` | No | Only in this list |
| `ai_interest_value` | `number` | No | — |
| `disable_auto_interest` | `boolean` | No | — |

**Output:** `object`

> **Output full type**
>
> ```ts theme={null}
> {
>   message?: string | null
> } | {
>   parse_warning: string
> }
> ```

***

## Subsequences

### create

`subsequences.create`

Create a subsequence: follow-up emails for a campaign's leads who meet its conditions (a reply, a lead status, an email opened...). While the campaign runs, matching leads get its emails

**Risk:** `write`

```ts theme={null}
await corsair.instantly.api.subsequences.create({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent_campaign` | `string` | Yes | ID of the parent campaign |
| `name` | `string` | Yes | Name of the subsequence |
| `conditions` | `object` | Yes | Conditions that trigger the subsequence |
| `subsequence_schedule` | `object` | No | Schedule for the subsequence; omit to use the parent campaign's. Time zones take the same aliases as campaigns (America/New\_York is sent as America/Detroit) |
| `sequences` | `object[]` | No | Exactly one sequence holding every step: Instantly reads only the first element |
| `auto_variant_select` | `object` | No | Automatically select the winning variant for each step using open, click, or reply rate. Set to `null` to disable automatic selection. |
| `daily_limit_mode` | `inherit \| custom \| unlimited` | No | Daily limit mode for the subsequence. "inherit" uses the parent campaign limit, "custom" uses a subsequence-specific limit, "unlimited" bypasses the campaign-level daily limit. |
| `daily_limit` | `number` | No | Custom daily limit for the subsequence. Only used when `daily_limit_mode` is "custom". |
| `ignore_account_daily_limit` | `boolean` | No | When enabled, the subsequence will send even when sending accounts have reached their daily limit. |

> **conditions full type**
>
> ```ts theme={null}
> {
>   crm_status?: number[],
>   lead_activity?: (
>     4 | 91 | 2
>   )[],
>   reply_contains?: string
> }
> ```

> **subsequence\_schedule full type**
>
> ```ts theme={null}
> {
>   schedules: {
>     name: string,
>     timing: {
>       from: string,
>       to: string
>     },
>     days: {
>       0?: boolean,
>       1?: boolean,
>       2?: boolean,
>       3?: boolean,
>       4?: boolean,
>       5?: boolean,
>       6?: boolean
>     },
>     timezone: Etc/GMT+12 | Etc/GMT+11 | Etc/GMT+10 | America/Anchorage | America/Dawson | America/Creston | America/Chihuahua | America/Boise | America/Belize | America/Chicago | America/Bahia_Banderas | America/Regina | America/Bogota | America/Detroit | America/Indiana/Marengo | America/Caracas | America/Asuncion | America/Glace_Bay | America/Campo_Grande | America/Anguilla | America/Santiago | America/St_Johns | America/Sao_Paulo | America/Argentina/La_Rioja | America/Araguaina | America/Godthab | America/Montevideo | America/Bahia | America/Noronha | America/Scoresbysund | Atlantic/Cape_Verde | Africa/Casablanca | America/Danmarkshavn | Europe/Isle_of_Man | Atlantic/Canary | Africa/Abidjan | Arctic/Longyearbyen | Europe/Belgrade | Africa/Ceuta | Europe/Sarajevo | Africa/Algiers | Africa/Windhoek | Asia/Nicosia | Asia/Beirut | Africa/Cairo | Asia/Damascus | Europe/Bucharest | Africa/Blantyre | Europe/Helsinki | Europe/Istanbul | Asia/Jerusalem | Africa/Tripoli | Asia/Amman | Asia/Baghdad | Europe/Kaliningrad | Asia/Aden | Africa/Addis_Ababa | Europe/Kirov | Europe/Astrakhan | Asia/Tehran | Asia/Dubai | Asia/Baku | Indian/Mahe | Asia/Tbilisi | Asia/Yerevan | Asia/Kabul | Antarctica/Mawson | Asia/Yekaterinburg | Asia/Karachi | Asia/Kolkata | Asia/Colombo | Asia/Kathmandu | Antarctica/Vostok | Asia/Dhaka | Asia/Rangoon | Antarctica/Davis | Asia/Novokuznetsk | Asia/Hong_Kong | Asia/Krasnoyarsk | Asia/Brunei | Australia/Perth | Asia/Taipei | Asia/Choibalsan | Asia/Irkutsk | Asia/Dili | Asia/Pyongyang | Australia/Adelaide | Australia/Darwin | Australia/Brisbane | Australia/Melbourne | Antarctica/DumontDUrville | Australia/Currie | Asia/Chita | Antarctica/Macquarie | Asia/Sakhalin | Pacific/Auckland | Etc/GMT-12 | Pacific/Fiji | Asia/Anadyr | Asia/Kamchatka | Etc/GMT-13 | Pacific/Apia | America/New_York | US/Eastern | America/Indiana/Indianapolis | America/Kentucky/Louisville | US/Central | America/Denver | US/Mountain | America/Phoenix | US/Arizona | US/Alaska | Pacific/Honolulu | US/Hawaii | America/Mexico_City | America/Lima | America/Argentina/Buenos_Aires | Europe/London | Europe/Dublin | Europe/Lisbon | Europe/Paris | Europe/Berlin | Europe/Madrid | Europe/Rome | Europe/Amsterdam | Europe/Brussels | Europe/Vienna | Europe/Zurich | Europe/Stockholm | Europe/Oslo | Europe/Copenhagen | Europe/Prague | Europe/Warsaw | Europe/Budapest | Europe/Athens | Europe/Kyiv | Europe/Kiev | Europe/Riga | Europe/Sofia | Europe/Moscow | Asia/Riyadh | Asia/Qatar | Asia/Kuwait | Asia/Tel_Aviv | Africa/Nairobi | Africa/Lagos | Africa/Johannesburg | Asia/Calcutta | Asia/Yangon | Asia/Bangkok | Asia/Jakarta | Asia/Ho_Chi_Minh | Asia/Singapore | Asia/Kuala_Lumpur | Asia/Shanghai | Asia/Manila | Asia/Tokyo | Asia/Seoul | Australia/Sydney | Australia/Canberra | Australia/Hobart | UTC | Etc/UTC | GMT | Etc/GMT
>   }[],
>   start_date?: string | null,
>   end_date?: string | null
> }
> ```

> **sequences full type**
>
> ```ts theme={null}
> {
>   steps: {
>     type: email,
>     delay: number,
>     delay_unit?: minutes | hours | days,
>     pre_delay?: number,
>     pre_delay_unit?: minutes | hours | days,
>     variants: {
>       subject: string,
>       body: string,
>       v_disabled?: boolean
>     }[]
>   }[]
> }[]
> ```

> **auto\_variant\_select full type**
>
> ```ts theme={null}
> {
>   trigger: reply_rate | click_rate | open_rate
> }
> ```

**Output:** `object`

> **Output full type**
>
> ```ts theme={null}
> {
>   id?: string | null,
>   timestamp_created?: string | null,
>   parent_campaign?: string | null,
>   workspace?: string | null,
>   status?: number | null,
>   timestamp_leads_updated?: string | null,
>   name?: string | null,
>   conditions?: {
>   } | null,
>   subsequence_schedule?: {
>   } | null,
>   sequences?: any[] | null,
>   auto_variant_select?: {
>   } | null,
>   daily_limit_mode?: string | null,
>   daily_limit?: number | null,
>   ignore_account_daily_limit?: boolean | null
> } | {
>   parse_warning: string
> }
> ```

***

### delete

`subsequences.delete`

Delete a subsequence; its leads stop getting its emails

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

```ts theme={null}
await corsair.instantly.api.subsequences.delete({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | The ID of the item to delete |

**Output:** `object`

> **Output full type**
>
> ```ts theme={null}
> {
>   id?: string | null,
>   timestamp_created?: string | null,
>   parent_campaign?: string | null,
>   workspace?: string | null,
>   status?: number | null,
>   timestamp_leads_updated?: string | null,
>   name?: string | null,
>   conditions?: {
>   } | null,
>   subsequence_schedule?: {
>   } | null,
>   sequences?: any[] | null,
>   auto_variant_select?: {
>   } | null,
>   daily_limit_mode?: string | null,
>   daily_limit?: number | null,
>   ignore_account_daily_limit?: boolean | null
> } | {
>   parse_warning: string
> }
> ```

***

### duplicate

`subsequences.duplicate`

Copy a subsequence, with the same trigger conditions, into a campaign

**Risk:** `write`

```ts theme={null}
await corsair.instantly.api.subsequences.duplicate({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | The ID of the subsequence to duplicate. |
| `parent_campaign` | `string` | Yes | The ID of the campaign to duplicate the subsequence to. |
| `name` | `string` | No | The name of the duplicate subsequence. Defaults to the source subsequence name when omitted. |

**Output:** `object`

> **Output full type**
>
> ```ts theme={null}
> {
>   id?: string | null,
>   timestamp_created?: string | null,
>   parent_campaign?: string | null,
>   workspace?: string | null,
>   status?: number | null,
>   timestamp_leads_updated?: string | null,
>   name?: string | null,
>   conditions?: {
>   } | null,
>   subsequence_schedule?: {
>   } | null,
>   sequences?: any[] | null,
>   auto_variant_select?: {
>   } | null,
>   daily_limit_mode?: string | null,
>   daily_limit?: number | null,
>   ignore_account_daily_limit?: boolean | null
> } | {
>   parse_warning: string
> }
> ```

***

### get

`subsequences.get`

Get one subsequence with its conditions, schedule and steps

**Risk:** `read`

```ts theme={null}
await corsair.instantly.api.subsequences.get({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | The ID of the requested item |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | No | Unique identifier for the subsequence |
| `timestamp_created` | `string` | No | Timestamp when the subsequence was created |
| `parent_campaign` | `string` | No | ID of the parent campaign |
| `workspace` | `string` | No | ID of the workspace this subsequence belongs to |
| `status` | `number` | No | Status of the subsequence; 0 Draft - The subsequence is in draft mode and not yet active, 1 Active - The subsequence is currently running, 2 Paused - The subsequence has been manually paused, 3 Completed - The subsequence has f |
| `timestamp_leads_updated` | `string` | No | Timestamp when the leads were last updated |
| `name` | `string` | No | Name of the subsequence |
| `conditions` | `object` | No | Conditions that trigger the subsequence |
| `subsequence_schedule` | `object` | No | Schedule configuration for the subsequence. When omitted on create, inherits the parent campaign's schedule. |
| `sequences` | `any[]` | No | — |
| `auto_variant_select` | `object` | No | Automatically select the winning variant for each step using open, click, or reply rate. Set to `null` to disable automatic selection. |
| `daily_limit_mode` | `string` | No | Daily limit mode for the subsequence. "inherit" uses the parent campaign limit, "custom" uses a subsequence-specific limit, "unlimited"... |
| `daily_limit` | `number` | No | Custom daily limit for the subsequence. Only used when `daily_limit_mode` is "custom". |
| `ignore_account_daily_limit` | `boolean` | No | When enabled, the subsequence will send even when sending accounts have reached their daily limit. |

> **conditions full type**
>
> ```ts theme={null}
> {
> }
> ```

> **subsequence\_schedule full type**
>
> ```ts theme={null}
> {
> }
> ```

> **auto\_variant\_select full type**
>
> ```ts theme={null}
> {
> }
> ```

***

### getAnalytics

`subsequences.getAnalytics`

Emails sent, unique opens and unique replies for each of a campaign's subsequences

**Risk:** `read`

```ts theme={null}
await corsair.instantly.api.subsequences.getAnalytics({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `campaign_id` | `string` | Yes | The ID of the campaign to fetch subsequence analytics for. |

**Output:** `object[]`

> **Output full type**
>
> ```ts theme={null}
> {
>   subsequence_id?: string | null,
>   emails_sent?: number | null,
>   unique_opens?: number | null,
>   unique_replies?: number | null
> }[]
> ```

***

### getSendingStatus

`subsequences.getSendingStatus`

Explain why a subsequence is not sending, or sending slower than expected

**Risk:** `read`

```ts theme={null}
await corsair.instantly.api.subsequences.getSendingStatus({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | Subsequence ID |
| `with_ai_summary` | `boolean` | No | Include AI-generated summary |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `diagnostics` | `object` | No | Raw sending status data. Some fields may be missing when campaign is out of schedule. |
| `summary` | `object` | No | Human-readable summary of the sending status |

> **diagnostics full type**
>
> ```ts theme={null}
> {
> }
> ```

> **summary full type**
>
> ```ts theme={null}
> {
> }
> ```

***

### getStepAnalytics

`subsequences.getStepAnalytics`

Sent, opens, replies and clicks per step and A/B variant of one subsequence

**Risk:** `read`

```ts theme={null}
await corsair.instantly.api.subsequences.getStepAnalytics({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | The ID of the subsequence to analyze. |
| `start_date` | `string` | No | Inclusive start of the analytics range. Accepts a date-only value (`YYYY-MM-DD`) or an ISO 8601 timestamp. Timestamps are normalized to their UTC calendar date. |
| `end_date` | `string` | No | Inclusive end of the analytics range. Accepts a date-only value (`YYYY-MM-DD`) or an ISO 8601 timestamp. Timestamps are normalized to their UTC calendar date. |

**Output:** `object[]`

> **Output full type**
>
> ```ts theme={null}
> {
>   step?: string | null,
>   variant?: string | null,
>   sent?: number | null,
>   opened?: number | null,
>   unique_opened?: number | null,
>   replies?: number | null,
>   unique_replies?: number | null,
>   replies_automatic?: number | null,
>   unique_replies_automatic?: number | null,
>   clicks?: number | null,
>   unique_clicks?: number | null
> }[]
> ```

***

### list

`subsequences.list`

List subsequences, by parent campaign or name

**Risk:** `read`

```ts theme={null}
await corsair.instantly.api.subsequences.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `limit` | `number` | No | The number of items to return |
| `starting_after` | `string` | No | The ID of the last item in the previous page - used for pagination. You can use the value of the `next_starting_after` field from the previous response. |
| `parent_campaign` | `string` | No | The ID of the campaign to list the subsequences of. |
| `parent_campaign_not` | `string` | No | The ID of a campaign to exclude subsequences of, returning reusable subsequences from the workspace's other campaigns instead. |
| `search` | `string` | No | The search query to filter the subsequences by. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[]` | Yes | — |
| `next_starting_after` | `string` | No | Pass as starting\_after to get the next page; absent on the last page |

> **items full type**
>
> ```ts theme={null}
> {
>   id?: string | null,
>   timestamp_created?: string | null,
>   parent_campaign?: string | null,
>   workspace?: string | null,
>   status?: number | null,
>   timestamp_leads_updated?: string | null,
>   name?: string | null,
>   conditions?: {
>   } | null,
>   subsequence_schedule?: {
>   } | null,
>   sequences?: any[] | null,
>   auto_variant_select?: {
>   } | null,
>   daily_limit_mode?: string | null,
>   daily_limit?: number | null,
>   ignore_account_daily_limit?: boolean | null
> }[]
> ```

***

### pause

`subsequences.pause`

Pause a subsequence: it stops sending until resumed

**Risk:** `write`

```ts theme={null}
await corsair.instantly.api.subsequences.pause({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | Subsequence ID |

**Output:** `object`

> **Output full type**
>
> ```ts theme={null}
> {
>   id?: string | null,
>   timestamp_created?: string | null,
>   parent_campaign?: string | null,
>   workspace?: string | null,
>   status?: number | null,
>   timestamp_leads_updated?: string | null,
>   name?: string | null,
>   conditions?: {
>   } | null,
>   subsequence_schedule?: {
>   } | null,
>   sequences?: any[] | null,
>   auto_variant_select?: {
>   } | null,
>   daily_limit_mode?: string | null,
>   daily_limit?: number | null,
>   ignore_account_daily_limit?: boolean | null
> } | {
>   parse_warning: string
> }
> ```

***

### resume

`subsequences.resume`

Resume a paused subsequence. This SENDS REAL EMAIL to the leads that meet its conditions

**Risk:** `write`

```ts theme={null}
await corsair.instantly.api.subsequences.resume({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | The ID of the subsequence to resume. |

**Output:** `object`

> **Output full type**
>
> ```ts theme={null}
> {
>   id?: string | null,
>   timestamp_created?: string | null,
>   parent_campaign?: string | null,
>   workspace?: string | null,
>   status?: number | null,
>   timestamp_leads_updated?: string | null,
>   name?: string | null,
>   conditions?: {
>   } | null,
>   subsequence_schedule?: {
>   } | null,
>   sequences?: any[] | null,
>   auto_variant_select?: {
>   } | null,
>   daily_limit_mode?: string | null,
>   daily_limit?: number | null,
>   ignore_account_daily_limit?: boolean | null
> } | {
>   parse_warning: string
> }
> ```

***

### update

`subsequences.update`

Change a subsequence's name, conditions, schedule, steps or daily limit

**Risk:** `write`

```ts theme={null}
await corsair.instantly.api.subsequences.update({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | The ID of the item to update |
| `name` | `string` | No | Name of the subsequence |
| `conditions` | `object` | No | Conditions that trigger the subsequence |
| `subsequence_schedule` | `object` | No | Schedule for the subsequence; omit to use the parent campaign's. Time zones take the same aliases as campaigns (America/New\_York is sent as America/Detroit) |
| `sequences` | `object[]` | No | Exactly one sequence holding every step: Instantly reads only the first element |
| `auto_variant_select` | `object` | No | Automatically select the winning variant for each step using open, click, or reply rate. Set to `null` to disable automatic selection. |
| `daily_limit_mode` | `inherit \| custom \| unlimited` | No | Daily limit mode for the subsequence. "inherit" uses the parent campaign limit, "custom" uses a subsequence-specific limit, "unlimited" bypasses the campaign-level daily limit. |
| `daily_limit` | `number` | No | Custom daily limit for the subsequence. Only used when `daily_limit_mode` is "custom". |
| `ignore_account_daily_limit` | `boolean` | No | When enabled, the subsequence will send even when sending accounts have reached their daily limit. |

> **conditions full type**
>
> ```ts theme={null}
> {
>   crm_status?: number[],
>   lead_activity?: (
>     4 | 91 | 2
>   )[],
>   reply_contains?: string
> }
> ```

> **subsequence\_schedule full type**
>
> ```ts theme={null}
> {
>   schedules: {
>     name: string,
>     timing: {
>       from: string,
>       to: string
>     },
>     days: {
>       0?: boolean,
>       1?: boolean,
>       2?: boolean,
>       3?: boolean,
>       4?: boolean,
>       5?: boolean,
>       6?: boolean
>     },
>     timezone: Etc/GMT+12 | Etc/GMT+11 | Etc/GMT+10 | America/Anchorage | America/Dawson | America/Creston | America/Chihuahua | America/Boise | America/Belize | America/Chicago | America/Bahia_Banderas | America/Regina | America/Bogota | America/Detroit | America/Indiana/Marengo | America/Caracas | America/Asuncion | America/Glace_Bay | America/Campo_Grande | America/Anguilla | America/Santiago | America/St_Johns | America/Sao_Paulo | America/Argentina/La_Rioja | America/Araguaina | America/Godthab | America/Montevideo | America/Bahia | America/Noronha | America/Scoresbysund | Atlantic/Cape_Verde | Africa/Casablanca | America/Danmarkshavn | Europe/Isle_of_Man | Atlantic/Canary | Africa/Abidjan | Arctic/Longyearbyen | Europe/Belgrade | Africa/Ceuta | Europe/Sarajevo | Africa/Algiers | Africa/Windhoek | Asia/Nicosia | Asia/Beirut | Africa/Cairo | Asia/Damascus | Europe/Bucharest | Africa/Blantyre | Europe/Helsinki | Europe/Istanbul | Asia/Jerusalem | Africa/Tripoli | Asia/Amman | Asia/Baghdad | Europe/Kaliningrad | Asia/Aden | Africa/Addis_Ababa | Europe/Kirov | Europe/Astrakhan | Asia/Tehran | Asia/Dubai | Asia/Baku | Indian/Mahe | Asia/Tbilisi | Asia/Yerevan | Asia/Kabul | Antarctica/Mawson | Asia/Yekaterinburg | Asia/Karachi | Asia/Kolkata | Asia/Colombo | Asia/Kathmandu | Antarctica/Vostok | Asia/Dhaka | Asia/Rangoon | Antarctica/Davis | Asia/Novokuznetsk | Asia/Hong_Kong | Asia/Krasnoyarsk | Asia/Brunei | Australia/Perth | Asia/Taipei | Asia/Choibalsan | Asia/Irkutsk | Asia/Dili | Asia/Pyongyang | Australia/Adelaide | Australia/Darwin | Australia/Brisbane | Australia/Melbourne | Antarctica/DumontDUrville | Australia/Currie | Asia/Chita | Antarctica/Macquarie | Asia/Sakhalin | Pacific/Auckland | Etc/GMT-12 | Pacific/Fiji | Asia/Anadyr | Asia/Kamchatka | Etc/GMT-13 | Pacific/Apia | America/New_York | US/Eastern | America/Indiana/Indianapolis | America/Kentucky/Louisville | US/Central | America/Denver | US/Mountain | America/Phoenix | US/Arizona | US/Alaska | Pacific/Honolulu | US/Hawaii | America/Mexico_City | America/Lima | America/Argentina/Buenos_Aires | Europe/London | Europe/Dublin | Europe/Lisbon | Europe/Paris | Europe/Berlin | Europe/Madrid | Europe/Rome | Europe/Amsterdam | Europe/Brussels | Europe/Vienna | Europe/Zurich | Europe/Stockholm | Europe/Oslo | Europe/Copenhagen | Europe/Prague | Europe/Warsaw | Europe/Budapest | Europe/Athens | Europe/Kyiv | Europe/Kiev | Europe/Riga | Europe/Sofia | Europe/Moscow | Asia/Riyadh | Asia/Qatar | Asia/Kuwait | Asia/Tel_Aviv | Africa/Nairobi | Africa/Lagos | Africa/Johannesburg | Asia/Calcutta | Asia/Yangon | Asia/Bangkok | Asia/Jakarta | Asia/Ho_Chi_Minh | Asia/Singapore | Asia/Kuala_Lumpur | Asia/Shanghai | Asia/Manila | Asia/Tokyo | Asia/Seoul | Australia/Sydney | Australia/Canberra | Australia/Hobart | UTC | Etc/UTC | GMT | Etc/GMT
>   }[],
>   start_date?: string | null,
>   end_date?: string | null
> }
> ```

> **sequences full type**
>
> ```ts theme={null}
> {
>   steps: {
>     type: email,
>     delay: number,
>     delay_unit?: minutes | hours | days,
>     pre_delay?: number,
>     pre_delay_unit?: minutes | hours | days,
>     variants: {
>       subject: string,
>       body: string,
>       v_disabled?: boolean
>     }[]
>   }[]
> }[]
> ```

> **auto\_variant\_select full type**
>
> ```ts theme={null}
> {
>   trigger: reply_rate | click_rate | open_rate
> }
> ```

**Output:** `object`

> **Output full type**
>
> ```ts theme={null}
> {
>   id?: string | null,
>   timestamp_created?: string | null,
>   parent_campaign?: string | null,
>   workspace?: string | null,
>   status?: number | null,
>   timestamp_leads_updated?: string | null,
>   name?: string | null,
>   conditions?: {
>   } | null,
>   subsequence_schedule?: {
>   } | null,
>   sequences?: any[] | null,
>   auto_variant_select?: {
>   } | null,
>   daily_limit_mode?: string | null,
>   daily_limit?: number | null,
>   ignore_account_daily_limit?: boolean | null
> } | {
>   parse_warning: string
> }
> ```

***

## Webhook Events

### get

`webhookEvents.get`

Get one webhook delivery with its payload and response

**Risk:** `read`

```ts theme={null}
await corsair.instantly.api.webhookEvents.get({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | The ID of the requested item |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | No | Unique identifier for the webhook event (UUID) |
| `timestamp_created` | `string` | No | Timestamp when the webhook event was created |
| `timestamp_created_date` | `string` | No | Date when the webhook event was created (for partitioning) |
| `organization_id` | `string` | No | Organization (workspace) UUID that owns this webhook event |
| `payload` | `object` | No | JSON payload that was sent/attempted to be sent |
| `success` | `boolean` | No | Whether the webhook call was successful |
| `retry_count` | `number` | No | Number of retry attempts made |
| `will_retry` | `boolean` | No | Whether the webhook will be retried |
| `webhook_url` | `string` | No | Target URL where the webhook was sent |
| `status_code` | `number` | No | HTTP status code received from the webhook endpoint (if any) |
| `error_message` | `string` | No | Error message if the webhook failed |
| `timestamp_next_retry` | `string` | No | Timestamp for the next retry attempt (if applicable) |
| `retry_group_id` | `string` | No | UUID for grouping retry attempts |
| `retry_successful` | `boolean` | No | Whether the retry was successful (for retry events) |
| `lead_email` | `string` | No | Email address of the lead associated with this webhook event |
| `response_time_ms` | `number` | No | Response time in milliseconds for the webhook call |

> **payload full type**
>
> ```ts theme={null}
> {
> }
> ```

***

### getSummary

`webhookEvents.getSummary`

Totals and success rate of webhook deliveries, optionally in a date range

**Risk:** `read`

```ts theme={null}
await corsair.instantly.api.webhookEvents.getSummary({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `from` | `string` | No | Inclusive start of the window (YYYY-MM-DD). |
| `to` | `string` | No | Inclusive end of the window (YYYY-MM-DD). |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `total_events` | `number` | No | Total number of webhook events |
| `successful_events` | `number` | No | Total number of successful webhook events |
| `failed_events` | `number` | No | Total number of failed webhook events |
| `success_rate` | `number` | No | Percentage (0-100) of successful webhook calls |
| `failure_rate` | `number` | No | Percentage (0-100) of failed webhook calls |

***

### getSummaryByDate

`webhookEvents.getSummaryByDate`

Webhook delivery totals and success rate per day

**Risk:** `read`

```ts theme={null}
await corsair.instantly.api.webhookEvents.getSummaryByDate({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `from` | `string` | No | Inclusive start of the window (YYYY-MM-DD). |
| `to` | `string` | No | Inclusive end of the window (YYYY-MM-DD). |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[]` | Yes | — |
| `next_starting_after` | `string` | No | Pass as starting\_after to get the next page; absent on the last page |

> **items full type**
>
> ```ts theme={null}
> {
>   date?: string | null,
>   total_events?: number | null,
>   successful_events?: number | null,
>   failed_events?: number | null,
>   success_rate?: number | null
> }[]
> ```

***

### list

`webhookEvents.list`

List webhook deliveries with their payload, status code and retries; filter by success, date or search

**Risk:** `read`

```ts theme={null}
await corsair.instantly.api.webhookEvents.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `limit` | `number` | No | The number of items to return |
| `starting_after` | `string` | No | The ID of the last item in the previous page - used for pagination. You can use the value of the `next_starting_after` field from the previous response. |
| `success` | `boolean` | No | Filter by success status |
| `from` | `string` | No | Inclusive start of the window (YYYY-MM-DD). |
| `to` | `string` | No | Inclusive end of the window (YYYY-MM-DD). |
| `search` | `string` | No | Search by exact webhook URL or lead email match |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[]` | Yes | — |
| `next_starting_after` | `string` | No | Pass as starting\_after to get the next page; absent on the last page |

> **items full type**
>
> ```ts theme={null}
> {
>   id?: string | null,
>   timestamp_created?: string | null,
>   timestamp_created_date?: string | null,
>   organization_id?: string | null,
>   payload?: {
>   } | null,
>   success?: boolean | null,
>   retry_count?: number | null,
>   will_retry?: boolean | null,
>   webhook_url?: string | null,
>   status_code?: number | null,
>   error_message?: string | null,
>   timestamp_next_retry?: string | null,
>   retry_group_id?: string | null,
>   retry_successful?: boolean | null,
>   lead_email?: string | null,
>   response_time_ms?: number | null
> }[]
> ```

***

## Webhooks

### create

`webhooks.create`

Subscribe a URL to an event (reply\_received, email\_bounced, lead\_interested...) or all\_events, for one campaign or all. Attaches the plugin's webhook secret so Corsair can verify deliveries. Webhooks need Instantly's Hypergrowth plan or higher

**Risk:** `write`

```ts theme={null}
await corsair.instantly.api.webhooks.create({ target_hook_url: 'https://app.example.com/api/webhook', event_type: 'reply_received' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `target_hook_url` | `string` | Yes | Where Instantly POSTs events, e.g. your Corsair webhook URL |
| `event_type` | `all_events \| email_sent \| email_opened \| email_link_clicked \| reply_received \| email_bounced \| lead_unsubscribed \| campaign_completed \| account_error \| lead_neutral \| lead_interested \| lead_not_interested \| lead_meeting_booked \| lead_meeting_completed \| lead_closed \| lead_out_of_office \| lead_wrong_person \| lead_no_show \| supersearch_enrichment_completed` | No | One event, all\_events (includes custom labels), or null with custom\_interest\_value for one custom label |
| `campaign` | `string` | No | Only this campaign; omit for every campaign |
| `name` | `string` | No | — |
| `custom_interest_value` | `number` | No | Custom label value, when event\_type is null |
| `headers` | `object` | No | Extra headers sent with each delivery |
| `attach_secret` | `boolean` | Yes | Send the plugin's webhook secret as the x-corsair-webhook-secret header so Corsair can verify deliveries (default true). If no secret is set, the call fails before anything is created; pass false for a URL outside Corsair |

> **headers full type**
>
> ```ts theme={null}
> {
> }
> ```

**Output:** `object`

> **Output full type**
>
> ```ts theme={null}
> {
>   id: string,
>   name?: string | null,
>   target_hook_url?: string | null,
>   event_type?: string | null,
>   campaign?: string | null,
>   custom_interest_value?: number | null,
>   headers?: {
>   } | null,
>   status?: number | null,
>   timestamp_error?: string | null,
>   timestamp_created?: string | null,
>   organization?: string | null
> } | {
>   parse_warning: string
> }
> ```

***

### delete

`webhooks.delete`

Delete a webhook subscription; Instantly stops sending its events

**Risk:** `destructive`

```ts theme={null}
await corsair.instantly.api.webhooks.delete({ id: '01a181d1-c62c-745b-b842-870a582f48f0' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | Webhook ID (UUID) |

**Output:** `object`

> **Output full type**
>
> ```ts theme={null}
> {
>   id?: string,
>   name?: string | null,
>   target_hook_url?: string | null,
>   event_type?: string | null,
>   campaign?: string | null,
>   custom_interest_value?: number | null,
>   headers?: {
>   } | null,
>   status?: number | null,
>   timestamp_error?: string | null,
>   timestamp_created?: string | null,
>   organization?: string | null
> } | {
>   parse_warning: string
> }
> ```

***

### get

`webhooks.get`

Get one webhook subscription (header values redacted)

**Risk:** `read`

```ts theme={null}
await corsair.instantly.api.webhooks.get({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | The ID of the requested item |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | No | Unique identifier for the webhook (UUID) |
| `organization` | `string` | No | Organization (workspace) UUID that owns this webhook |
| `campaign` | `string` | No | Optional campaign UUID to filter events (null = all campaigns in workspace) |
| `name` | `string` | No | Optional user-defined name for the webhook |
| `target_hook_url` | `string` | No | Target URL to send webhook payloads |
| `event_type` | `string` | No | Type of event to trigger the webhook (null for custom label events). Set to "all\_events" to subscribe to all events - including custom... |
| `custom_interest_value` | `number` | No | Custom interest value - corresponds to LeadLabel.interest\_status (used for custom label events) |
| `headers` | `object` | No | Optional HTTP headers to include when delivering webhook payloads (key-value pairs) |
| `timestamp_created` | `string` | No | Timestamp when the webhook was created |
| `status` | `number` | No | Webhook status: 1 = active, -1 = error (disabled due to delivery failures) |
| `timestamp_error` | `string` | No | Timestamp when webhook was disabled due to delivery failures (null if active) |

> **headers full type**
>
> ```ts theme={null}
> {
> }
> ```

***

### list

`webhooks.list`

List webhook subscriptions with their URL, event type, campaign and status (header values redacted)

**Risk:** `read`

```ts theme={null}
await corsair.instantly.api.webhooks.list({ event_type: 'reply_received' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `limit` | `number` | No | Items per page, 1 to 100 |
| `starting_after` | `string` | No | Cursor: `next_starting_after` from the previous page |
| `campaign` | `string` | No | — |
| `event_type` | `all_events \| email_sent \| email_opened \| email_link_clicked \| reply_received \| email_bounced \| lead_unsubscribed \| campaign_completed \| account_error \| lead_neutral \| lead_interested \| lead_not_interested \| lead_meeting_booked \| lead_meeting_completed \| lead_closed \| lead_out_of_office \| lead_wrong_person \| lead_no_show \| supersearch_enrichment_completed` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[]` | Yes | — |
| `next_starting_after` | `string` | No | Pass as starting\_after to get the next page; absent on the last page |

> **items full type**
>
> ```ts theme={null}
> {
>   id: string,
>   name?: string | null,
>   target_hook_url?: string | null,
>   event_type?: string | null,
>   campaign?: string | null,
>   custom_interest_value?: number | null,
>   headers?: {
>   } | null,
>   status?: number | null,
>   timestamp_error?: string | null,
>   timestamp_created?: string | null,
>   organization?: string | null
> }[]
> ```

***

### listEventTypes

`webhooks.listEventTypes`

List the event types a webhook can subscribe to, including the workspace's custom labels

**Risk:** `read`

```ts theme={null}
await corsair.instantly.api.webhooks.listEventTypes({});
```

**Input:** *empty object*

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `event_types` | `object[]` | No | — |

> **event\_types full type**
>
> ```ts theme={null}
> {
>   id: string,
>   label?: string | null,
>   type?: string | null
> }[]
> ```

***

### resume

`webhooks.resume`

Turn a webhook back on after Instantly disabled it for failed deliveries

**Risk:** `write`

```ts theme={null}
await corsair.instantly.api.webhooks.resume({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | id of the webhooks item |

**Output:** `object`

> **Output full type**
>
> ```ts theme={null}
> {
>   id?: string | null,
>   organization?: string | null,
>   campaign?: string | null,
>   name?: string | null,
>   target_hook_url?: string | null,
>   event_type?: string | null,
>   custom_interest_value?: number | null,
>   headers?: {
>   } | null,
>   timestamp_created?: string | null,
>   status?: number | null,
>   timestamp_error?: string | null
> } | {
>   parse_warning: string
> }
> ```

***

### test

`webhooks.test`

Send a test payload to the webhook's URL

**Risk:** `write`

```ts theme={null}
await corsair.instantly.api.webhooks.test({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | id of the webhooks item |

**Output:** `object`

> **Output full type**
>
> ```ts theme={null}
> {
>   success?: boolean | null,
>   message?: string | null,
>   response_time_ms?: number | null,
>   status_code?: number | null,
>   error?: string | null
> } | {
>   parse_warning: string
> }
> ```

***

### update

`webhooks.update`

Change a webhook's URL, event type, campaign or headers. Passing headers replaces them all, including the x-corsair-webhook-secret Corsair verifies deliveries with

**Risk:** `write`

```ts theme={null}
await corsair.instantly.api.webhooks.update({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | The ID of the item to update |
| `campaign` | `string` | No | Optional campaign UUID to filter events (null = all campaigns in workspace) |
| `name` | `string` | No | Optional user-defined name for the webhook |
| `target_hook_url` | `string` | No | Target URL to send webhook payloads |
| `event_type` | `all_events \| email_sent \| email_opened \| email_link_clicked \| reply_received \| email_bounced \| lead_unsubscribed \| campaign_completed \| account_error \| lead_neutral \| lead_interested \| lead_not_interested \| lead_meeting_booked \| lead_meeting_completed \| lead_closed \| lead_out_of_office \| lead_wrong_person \| lead_no_show \| supersearch_enrichment_completed` | No | Type of event to trigger the webhook (null for custom label events). Set to "all\_events" to subscribe to all events - including custom label events |
| `custom_interest_value` | `number` | No | Custom interest value - corresponds to LeadLabel.interest\_status (used for custom label events) |
| `headers` | `object` | No | Optional HTTP headers to include when delivering webhook payloads (key-value pairs) |

> **headers full type**
>
> ```ts theme={null}
> {
> }
> ```

**Output:** `object`

> **Output full type**
>
> ```ts theme={null}
> {
>   id?: string | null,
>   organization?: string | null,
>   campaign?: string | null,
>   name?: string | null,
>   target_hook_url?: string | null,
>   event_type?: string | null,
>   custom_interest_value?: number | null,
>   headers?: {
>   } | null,
>   timestamp_created?: string | null,
>   status?: number | null,
>   timestamp_error?: string | null
> } | {
>   parse_warning: string
> }
> ```

***

## Workspace

### cancelRemoval

`workspace.cancelRemoval`

Cancel a scheduled workspace deletion

**Risk:** `write`

```ts theme={null}
await corsair.instantly.api.workspace.cancelRemoval({});
```

**Input:** *empty object*

**Output:** `object`

> **Output full type**
>
> ```ts theme={null}
> {
>   id?: string | null,
>   timestamp_created?: string | null,
>   timestamp_updated?: string | null,
>   scheduled_for_removal_at?: string | null,
>   owner?: string | null,
>   name?: string | null,
>   plan_id?: string | null,
>   plan_id_bundle?: string | null,
>   add_unsub_to_block?: boolean | null,
>   default_opportunity_value?: number | null,
>   plan_id_leadfinder?: string | null,
>   plan_id_verification?: {
>   } | null,
>   org_logo_url?: string | null,
>   org_client_domain?: string | null,
>   plan_id_crm?: string | null,
>   plan_id_website_visitor?: string | null,
>   plan_id_inbox_placement?: string | null
> } | {
>   parse_warning: string
> }
> ```

***

### changeOwner

`workspace.changeOwner`

Make another user the owner of the workspace. The current owner loses ownership, so this cannot be undone from this API key

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

```ts theme={null}
await corsair.instantly.api.workspace.changeOwner({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `email` | `string` | Yes | — |
| `sec` | `string` | Yes | — |

**Output:** `object`

> **Output full type**
>
> ```ts theme={null}
> {
>   id?: string | null,
>   timestamp_created?: string | null,
>   timestamp_updated?: string | null,
>   scheduled_for_removal_at?: string | null,
>   owner?: string | null,
>   name?: string | null,
>   plan_id?: string | null,
>   plan_id_bundle?: string | null,
>   add_unsub_to_block?: boolean | null,
>   default_opportunity_value?: number | null,
>   plan_id_leadfinder?: string | null,
>   plan_id_verification?: {
>   } | null,
>   org_logo_url?: string | null,
>   org_client_domain?: string | null,
>   plan_id_crm?: string | null,
>   plan_id_website_visitor?: string | null,
>   plan_id_inbox_placement?: string | null
> } | {
>   parse_warning: string
> }
> ```

***

### deleteWhitelabelDomain

`workspace.deleteWhitelabelDomain`

Remove the agency (white-label) domain

**Risk:** `destructive`

```ts theme={null}
await corsair.instantly.api.workspace.deleteWhitelabelDomain({});
```

**Input:** *empty object*

**Output:** `object`

> **Output full type**
>
> ```ts theme={null}
> {
>   id?: string | null,
>   timestamp_created?: string | null,
>   timestamp_updated?: string | null,
>   scheduled_for_removal_at?: string | null,
>   owner?: string | null,
>   name?: string | null,
>   plan_id?: string | null,
>   plan_id_bundle?: string | null,
>   add_unsub_to_block?: boolean | null,
>   default_opportunity_value?: number | null,
>   plan_id_leadfinder?: string | null,
>   plan_id_verification?: {
>   } | null,
>   org_logo_url?: string | null,
>   org_client_domain?: string | null,
>   plan_id_crm?: string | null,
>   plan_id_website_visitor?: string | null,
>   plan_id_inbox_placement?: string | null
> } | {
>   parse_warning: string
> }
> ```

***

### get

`workspace.get`

Get the workspace this API key belongs to: ID, name and plan

**Risk:** `read`

```ts theme={null}
await corsair.instantly.api.workspace.get({});
```

**Input:** *empty object*

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | — |
| `name` | `string` | No | — |
| `owner` | `string` | No | — |
| `plan_id` | `string` | No | e.g. pid\_g\_v2 (Growth) |
| `plan_id_leadfinder` | `string` | No | — |
| `add_unsub_to_block` | `boolean` | No | — |
| `default_opportunity_value` | `number` | No | — |
| `timestamp_created` | `string` | No | — |
| `timestamp_updated` | `string` | No | — |

***

### getWhitelabelDomain

`workspace.getWhitelabelDomain`

Get the agency (white-label) domain and its verification state

**Risk:** `read`

```ts theme={null}
await corsair.instantly.api.workspace.getWhitelabelDomain({});
```

**Input:** *empty object*

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `verified` | `boolean` | No | Whether the domain is verified |
| `name` | `string` | No | The domain name |
| `verification` | `any[]` | No | — |

***

### scheduleRemoval

`workspace.scheduleRemoval`

Schedule the WHOLE WORKSPACE for deletion in 24 hours. workspace.cancelRemoval stops it before then

**Risk:** `destructive`

```ts theme={null}
await corsair.instantly.api.workspace.scheduleRemoval({});
```

**Input:** *empty object*

**Output:** `object`

> **Output full type**
>
> ```ts theme={null}
> {
>   id?: string | null,
>   timestamp_created?: string | null,
>   timestamp_updated?: string | null,
>   scheduled_for_removal_at?: string | null,
>   owner?: string | null,
>   name?: string | null,
>   plan_id?: string | null,
>   plan_id_bundle?: string | null,
>   add_unsub_to_block?: boolean | null,
>   default_opportunity_value?: number | null,
>   plan_id_leadfinder?: string | null,
>   plan_id_verification?: {
>   } | null,
>   org_logo_url?: string | null,
>   org_client_domain?: string | null,
>   plan_id_crm?: string | null,
>   plan_id_website_visitor?: string | null,
>   plan_id_inbox_placement?: string | null
> } | {
>   parse_warning: string
> }
> ```

***

### setWhitelabelDomain

`workspace.setWhitelabelDomain`

Set the agency (white-label) domain clients see

**Risk:** `write`

```ts theme={null}
await corsair.instantly.api.workspace.setWhitelabelDomain({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `domain` | `string` | Yes | The agency domain to set for the workspace |

**Output:** `object`

> **Output full type**
>
> ```ts theme={null}
> {
>   id?: string | null,
>   timestamp_created?: string | null,
>   timestamp_updated?: string | null,
>   scheduled_for_removal_at?: string | null,
>   owner?: string | null,
>   name?: string | null,
>   plan_id?: string | null,
>   plan_id_bundle?: string | null,
>   add_unsub_to_block?: boolean | null,
>   default_opportunity_value?: number | null,
>   plan_id_leadfinder?: string | null,
>   plan_id_verification?: {
>   } | null,
>   org_logo_url?: string | null,
>   org_client_domain?: string | null,
>   plan_id_crm?: string | null,
>   plan_id_website_visitor?: string | null,
>   plan_id_inbox_placement?: string | null
> } | {
>   parse_warning: string
> }
> ```

***

### update

`workspace.update`

Rename the workspace or change its logo

**Risk:** `write`

```ts theme={null}
await corsair.instantly.api.workspace.update({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | No | Name of the workspace |
| `org_logo_url` | `string` | No | URL to workspace logo |

**Output:** `object`

> **Output full type**
>
> ```ts theme={null}
> {
>   id?: string | null,
>   timestamp_created?: string | null,
>   timestamp_updated?: string | null,
>   scheduled_for_removal_at?: string | null,
>   owner?: string | null,
>   name?: string | null,
>   plan_id?: string | null,
>   plan_id_bundle?: string | null,
>   add_unsub_to_block?: boolean | null,
>   default_opportunity_value?: number | null,
>   plan_id_leadfinder?: string | null,
>   plan_id_verification?: {
>   } | null,
>   org_logo_url?: string | null,
>   org_client_domain?: string | null,
>   plan_id_crm?: string | null,
>   plan_id_website_visitor?: string | null,
>   plan_id_inbox_placement?: string | null
> } | {
>   parse_warning: string
> }
> ```

***

## Workspace Group Members

### create

`workspaceGroupMembers.create`

Invite another workspace into this admin workspace's group; it joins once its owner accepts

**Risk:** `write`

```ts theme={null}
await corsair.instantly.api.workspaceGroupMembers.create({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `sub_workspace_id` | `string` | Yes | The id of the sub workspace |

**Output:** `object`

> **Output full type**
>
> ```ts theme={null}
> {
>   id?: string | null,
>   admin_workspace_id?: string | null,
>   sub_workspace_id?: string | null,
>   status?: string | null,
>   timestamp_created?: string | null,
>   timestamp_updated?: string | null,
>   sub_workspace_name?: string | null,
>   admin_workspace_name?: string | null
> } | {
>   parse_warning: string
> }
> ```

***

### delete

`workspaceGroupMembers.delete`

Remove a workspace from this admin workspace's group

**Risk:** `destructive`

```ts theme={null}
await corsair.instantly.api.workspaceGroupMembers.delete({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | The ID of the item to delete |

**Output:** `object`

> **Output full type**
>
> ```ts theme={null}
> {
>   id?: string | null,
>   admin_workspace_id?: string | null,
>   sub_workspace_id?: string | null,
>   status?: string | null,
>   timestamp_created?: string | null,
>   timestamp_updated?: string | null,
>   sub_workspace_name?: string | null,
>   admin_workspace_name?: string | null
> } | {
>   parse_warning: string
> }
> ```

***

### get

`workspaceGroupMembers.get`

Get one workspace group member

**Risk:** `read`

```ts theme={null}
await corsair.instantly.api.workspaceGroupMembers.get({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | The ID of the requested item |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | No | The unique identifier of the workspace group member |
| `admin_workspace_id` | `string` | No | The id of the admin workspace |
| `sub_workspace_id` | `string` | No | The id of the sub workspace |
| `status` | `string` | No | pending The member has been invited to the workspace group but has not yet accepted the invitation., accepted The member has accepted the invitation to the workspace group., rejected The member has re |
| `timestamp_created` | `string` | No | — |
| `timestamp_updated` | `string` | No | — |
| `sub_workspace_name` | `string` | No | The name of the sub workspace. |
| `admin_workspace_name` | `string` | No | The name of the admin workspace. |

***

### getAdmin

`workspaceGroupMembers.getAdmin`

Get the admin workspace this workspace belongs to

**Risk:** `read`

```ts theme={null}
await corsair.instantly.api.workspaceGroupMembers.getAdmin({});
```

**Input:** *empty object*

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspace_name` | `string` | No | The workspace name of the admin workspace. When the current workspace has no admin workspace, the workspace name will be "Undefined". |
| `has_admin_workspace` | `boolean` | No | Whether the current workspace has an admin workspace |
| `workspace_group_member_id` | `string` | No | The id of the workspace group member. You can use it to leave the admin workspace by calling the DELETE /workspace-group-members/:id... |

***

### list

`workspaceGroupMembers.list`

List the workspaces in this admin workspace's group

**Risk:** `read`

```ts theme={null}
await corsair.instantly.api.workspaceGroupMembers.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `limit` | `number` | No | The number of items to return |
| `starting_after` | `string` | No | The ID of the last item in the previous page - used for pagination. You can use the value of the `next_starting_after` field from the previous response. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[]` | Yes | — |
| `next_starting_after` | `string` | No | Pass as starting\_after to get the next page; absent on the last page |

> **items full type**
>
> ```ts theme={null}
> {
>   id?: string | null,
>   admin_workspace_id?: string | null,
>   sub_workspace_id?: string | null,
>   status?: string | null,
>   timestamp_created?: string | null,
>   timestamp_updated?: string | null,
>   sub_workspace_name?: string | null,
>   admin_workspace_name?: string | null
> }[]
> ```

***

## Workspace Members

### create

`workspaceMembers.create`

Add a user to the workspace by email, with a role

**Risk:** `write`

```ts theme={null}
await corsair.instantly.api.workspaceMembers.create({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `email` | `string` | Yes | Email address of the workspace member |
| `user_email` | `string` | No | Email address of the user |
| `nickname` | `string` | No | Private workspace member nickname visible only to the workspace owner |
| `role` | `owner \| admin \| editor \| view \| client` | Yes | THe role of the workspace member defining their access level. While the "owner" role is listed in the enum, it cannot be created via the API, and is only assigned to the user who creates the workspace.; owner Owner - Full access and workspace management, admin Admin - Full access except workspace deletion, editor Editor - Can edit but not manage workspace settings, view View - Read-only access, clien |
| `permissions` | `dashboard.view \| campaigns.view \| campaigns.create \| campaigns.edit \| campaigns.delete \| organization.manage \| organization.integrations \| organization.billing \| organization.users.manage \| leadFinder.view \| customLeadLabels.create \| customLeadLabels.edit \| customLeadLabels.delete \| unibox.all \| analytics.view \| websiteChat.view \| websiteChat.manage \| agency.manage \| accounts.view \| accounts.manage \| leadManagement.view \| leads.move \| crm.view \| websiteVisitors.view \| blocklist.manage \| preferences.manage \| inboxPlacement.view \| aiAgents.manage \| workspaceGroupMembers.invite \| workspaceGroupMembers.remove \| workspaceGroupMembers.leave[]` | No | The permissions for this workspace member. Used in the app to restrict access to certain sections |

**Output:** `object`

> **Output full type**
>
> ```ts theme={null}
> {
>   id?: string | null,
>   email?: string | null,
>   user_id?: string | null,
>   user_email?: string | null,
>   nickname?: string | null,
>   name?: {
>   } | null,
>   picture_url?: string | null,
>   role?: string | null,
>   timestamp_created?: string | null,
>   workspace_id?: string | null,
>   accepted?: boolean | null,
>   issuer_id?: string | null,
>   permissions?: string[] | null
> } | {
>   parse_warning: string
> }
> ```

***

### delete

`workspaceMembers.delete`

Remove a member from the workspace

**Risk:** `destructive`

```ts theme={null}
await corsair.instantly.api.workspaceMembers.delete({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | The ID of the item to delete |

**Output:** `object`

> **Output full type**
>
> ```ts theme={null}
> {
>   id?: string | null,
>   email?: string | null,
>   user_id?: string | null,
>   user_email?: string | null,
>   nickname?: string | null,
>   name?: {
>   } | null,
>   picture_url?: string | null,
>   role?: string | null,
>   timestamp_created?: string | null,
>   workspace_id?: string | null,
>   accepted?: boolean | null,
>   issuer_id?: string | null,
>   permissions?: string[] | null
> } | {
>   parse_warning: string
> }
> ```

***

### get

`workspaceMembers.get`

Get one workspace member by ID

**Risk:** `read`

```ts theme={null}
await corsair.instantly.api.workspaceMembers.get({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | The ID of the requested item |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | No | Unique identifier for the workspace member |
| `email` | `string` | No | Email address of the workspace member |
| `user_id` | `string` | No | User ID of the workspace member |
| `user_email` | `string` | No | Email address of the user |
| `nickname` | `string` | No | Private workspace member nickname visible only to the workspace owner |
| `name` | `object` | No | — |
| `picture_url` | `string` | No | URL of the profile picture the user uploaded, if any. Returned when listing workspace members. |
| `role` | `string` | No | THe role of the workspace member defining their access level. While the "owner" role is listed in the enum, it cannot be created via the...; owner Owner - Full access and workspace management, admin Admin - Full access except workspace deletion, editor Editor - Can edit but not manage workspace settings, view View - Read-only access, clien |
| `timestamp_created` | `string` | No | Timestamp when the workspace member was created |
| `workspace_id` | `string` | No | ID of the workspace this member belongs to |
| `accepted` | `boolean` | No | Whether the member has accepted the workspace invitation |
| `issuer_id` | `string` | No | ID of the user who added this member to the workspace |
| `permissions` | `string[]` | No | — |

> **name full type**
>
> ```ts theme={null}
> {
> }
> ```

***

### list

`workspaceMembers.list`

List the workspace's members

**Risk:** `read`

```ts theme={null}
await corsair.instantly.api.workspaceMembers.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `limit` | `number` | No | The number of items to return |
| `starting_after` | `string` | No | The ID of the last item in the previous page - used for pagination. You can use the value of the `next_starting_after` field from the previous response. |
| `accepted` | `boolean` | No | Filter workspace members by invitation acceptance status |
| `search` | `string` | No | Search by name or email |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[]` | Yes | — |
| `next_starting_after` | `string` | No | Pass as starting\_after to get the next page; absent on the last page |

> **items full type**
>
> ```ts theme={null}
> {
>   id?: string | null,
>   email?: string | null,
>   user_id?: string | null,
>   user_email?: string | null,
>   nickname?: string | null,
>   name?: {
>   } | null,
>   picture_url?: string | null,
>   role?: string | null,
>   timestamp_created?: string | null,
>   workspace_id?: string | null,
>   accepted?: boolean | null,
>   issuer_id?: string | null,
>   permissions?: string[] | null
> }[]
> ```

***

### update

`workspaceMembers.update`

Change a member's nickname or role

**Risk:** `write`

```ts theme={null}
await corsair.instantly.api.workspaceMembers.update({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | The ID of the item to update |
| `nickname` | `string` | No | Private workspace member nickname visible only to the workspace owner |
| `role` | `owner \| admin \| editor \| view \| client` | No | THe role of the workspace member defining their access level. While the "owner" role is listed in the enum, it cannot be created via the API, and is only assigned to the user who creates the workspace.; owner Owner - Full access and workspace management, admin Admin - Full access except workspace deletion, editor Editor - Can edit but not manage workspace settings, view View - Read-only access, clien |

**Output:** `object`

> **Output full type**
>
> ```ts theme={null}
> {
>   id?: string | null,
>   email?: string | null,
>   user_id?: string | null,
>   user_email?: string | null,
>   nickname?: string | null,
>   name?: {
>   } | null,
>   picture_url?: string | null,
>   role?: string | null,
>   timestamp_created?: string | null,
>   workspace_id?: string | null,
>   accepted?: boolean | null,
>   issuer_id?: string | null,
>   permissions?: string[] | null
> } | {
>   parse_warning: string
> }
> ```

***


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.