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

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

## Campaigns

### assignRecipientList

`campaigns.assignRecipientList`

Assign a recipient list to a campaign

**Risk:** `write`

```ts theme={null}
await corsair.enginemailer.api.campaigns.assignRecipientList({ campaignid: 2200, FilterBy: 2, data: { CategoryList: [12, 13], FilterType: 'OR' } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `campaignid` | `number` | Yes | — |
| `data` | `object` | No | — |
| `FilterBy` | `1 \| 2` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   CategoryList: number[],
>   FilterType: AND | OR
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `Result` | `object` | Yes | — |

> [accordion] Result full type
>
> ```ts theme={null}
> {
> }
> ```

***

### createCampaign

`campaigns.createCampaign`

Create an email campaign

**Risk:** `write`

```ts theme={null}
await corsair.enginemailer.api.campaigns.createCampaign({
	CampaignName: 'November news',
	SenderName: 'Acme',
	SenderEmail: 'news@acme.example',
	Subject: 'What is new in November',
	Content: '<p>Hello</p>',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `CampaignName` | `string` | Yes | — |
| `SenderName` | `string` | Yes | — |
| `SenderEmail` | `string` | Yes | — |
| `ReplyTo` | `string` | No | — |
| `Subject` | `string` | Yes | — |
| `Content` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `Result` | `object` | Yes | — |

> [accordion] Result full type
>
> ```ts theme={null}
> {
> }
> ```

***

### deleteCampaign

`campaigns.deleteCampaign`

Delete an email campaign

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

```ts theme={null}
await corsair.enginemailer.api.campaigns.deleteCampaign({ campaignid: 2200 });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `campaignid` | `number` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `Result` | `object` | Yes | — |

> [accordion] Result full type
>
> ```ts theme={null}
> {
> }
> ```

***

### deleteRecipientList

`campaigns.deleteRecipientList`

Remove a recipient list from a campaign

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

```ts theme={null}
await corsair.enginemailer.api.campaigns.deleteRecipientList({ campaignid: 2200 });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `campaignid` | `number` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `Result` | `object` | Yes | — |

> [accordion] Result full type
>
> ```ts theme={null}
> {
> }
> ```

***

### listCampaigns

`campaigns.listCampaigns`

List campaigns

**Risk:** `read`

```ts theme={null}
await corsair.enginemailer.api.campaigns.listCampaigns({});
```

**Input:** *empty object*

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `Result` | `object` | Yes | — |

> [accordion] Result full type
>
> ```ts theme={null}
> {
> }
> ```

***

### pauseCampaign

`campaigns.pauseCampaign`

Pause an email campaign

**Risk:** `write`

```ts theme={null}
await corsair.enginemailer.api.campaigns.pauseCampaign({ campaignid: 2200 });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `campaignid` | `number` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `Result` | `object` | Yes | — |

> [accordion] Result full type
>
> ```ts theme={null}
> {
> }
> ```

***

### sendCampaign

`campaigns.sendCampaign`

Send an email campaign to its recipient list now

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

```ts theme={null}
await corsair.enginemailer.api.campaigns.sendCampaign({ campaignid: 2200 });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `campaignid` | `number` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `Result` | `object` | Yes | — |

> [accordion] Result full type
>
> ```ts theme={null}
> {
> }
> ```

***

### updateCampaign

`campaigns.updateCampaign`

Update an email campaign

**Risk:** `write`

```ts theme={null}
await corsair.enginemailer.api.campaigns.updateCampaign({
	CampaignID: 2200,
	CampaignName: 'November news',
	SenderName: 'Acme',
	SenderEmail: 'news@acme.example',
	Subject: 'What is new in November',
	Content: '<p>Hello again</p>',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `CampaignName` | `string` | Yes | — |
| `SenderName` | `string` | Yes | — |
| `SenderEmail` | `string` | Yes | — |
| `ReplyTo` | `string` | No | — |
| `Subject` | `string` | Yes | — |
| `Content` | `string` | Yes | — |
| `CampaignID` | `string \| number` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `Result` | `object` | Yes | — |

> [accordion] Result full type
>
> ```ts theme={null}
> {
> }
> ```

***

## N8n

### addOrUpdateSubscriber

`n8n.addOrUpdateSubscriber`

Add or update a subscriber through Enginemailer N8N

**Risk:** `write`

```ts theme={null}
await corsair.enginemailer.api.n8n.addOrUpdateSubscriber({ email: 'ada@example.com', subcategories: [12], updatetype: 'Append' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `email` | `string` | Yes | — |
| `sourcetype` | `string` | No | — |
| `subcategories` | `number[]` | No | — |
| `customfields` | `object[]` | No | — |
| `updatetype` | `Overwrite \| Append \| Ignore` | No | — |

> [accordion] customfields full type
>
> ```ts theme={null}
> {
>   customfield_key: string,
>   customfield_value: string | number
> }[]
> ```

**Output:** `any`

***

### autoresponderCompleted

`n8n.autoresponderCompleted`

List subscribers who completed an autoresponder

**Risk:** `read`

```ts theme={null}
await corsair.enginemailer.api.n8n.autoresponderCompleted({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `limit` | `number` | No | — |
| `lastpollingdate` | `string` | No | — |
| `filter_autoresponder` | `number \| All` | No | — |

**Output:** `any[]`

***

### autoresponderTriggered

`n8n.autoresponderTriggered`

List subscribers who triggered an autoresponder

**Risk:** `read`

```ts theme={null}
await corsair.enginemailer.api.n8n.autoresponderTriggered({ filter_autoresponder: 3, limit: 50 });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `limit` | `number` | No | — |
| `lastpollingdate` | `string` | No | — |
| `filter_autoresponder` | `number \| All` | No | — |

**Output:** `any[]`

***

### connect

`n8n.connect`

Test the Enginemailer N8N connection

**Risk:** `read`

```ts theme={null}
await corsair.enginemailer.api.n8n.connect({});
```

**Input:** *empty object*

**Output:** `any`

***

### deactivateSubscriber

`n8n.deactivateSubscriber`

Unsubscribe a subscriber through Enginemailer N8N

**Risk:** `write`

```ts theme={null}
await corsair.enginemailer.api.n8n.deactivateSubscriber({ email: 'ada@example.com' });
```

**Input**

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

**Output:** `any`

***

### deletedSubscribers

`n8n.deletedSubscribers`

List deleted subscribers through Enginemailer N8N

**Risk:** `read`

```ts theme={null}
await corsair.enginemailer.api.n8n.deletedSubscribers({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `limit` | `number` | No | — |
| `lastpollingdate` | `string` | No | — |

**Output:** `any[]`

***

### deleteN8nSubscriber

`n8n.deleteN8nSubscriber`

Delete a subscriber through Enginemailer N8N

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

```ts theme={null}
await corsair.enginemailer.api.n8n.deleteN8nSubscriber({ email: 'ada@example.com' });
```

**Input**

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

**Output:** `any`

***

### findSubscriber

`n8n.findSubscriber`

Find a subscriber through Enginemailer N8N

**Risk:** `read`

```ts theme={null}
await corsair.enginemailer.api.n8n.findSubscriber({ email: 'ada@example.com' });
```

**Input**

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

**Output:** `any`

***

### listForms

`n8n.listForms`

List Enginemailer forms through N8N

**Risk:** `read`

```ts theme={null}
await corsair.enginemailer.api.n8n.listForms({});
```

**Input:** *empty object*

**Output:** `any[]`

***

### listPages

`n8n.listPages`

List Enginemailer pages through N8N

**Risk:** `read`

```ts theme={null}
await corsair.enginemailer.api.n8n.listPages({});
```

**Input:** *empty object*

**Output:** `any[]`

***

### listPopups

`n8n.listPopups`

List Enginemailer popups through N8N

**Risk:** `read`

```ts theme={null}
await corsair.enginemailer.api.n8n.listPopups({});
```

**Input:** *empty object*

**Output:** `any[]`

***

### modifiedSubscribers

`n8n.modifiedSubscribers`

List modified subscribers through Enginemailer N8N

**Risk:** `read`

```ts theme={null}
await corsair.enginemailer.api.n8n.modifiedSubscribers({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `limit` | `number` | No | — |
| `lastpollingdate` | `string` | No | — |

**Output:** `any[]`

***

### newSubscribers

`n8n.newSubscribers`

List new subscribers through Enginemailer N8N

**Risk:** `read`

```ts theme={null}
await corsair.enginemailer.api.n8n.newSubscribers({ source: 'Form', filter_form: 7, limit: 50, lastpollingdate: '2026-11-01 00:00:00' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `limit` | `number` | No | — |
| `lastpollingdate` | `string` | No | — |
| `source` | `All \| API \| Form \| Import \| LandingPage \| Manual \| Popup \| WhatsApp` | No | — |
| `filter_form` | `number \| All` | No | — |
| `filter_page` | `number \| All` | No | — |
| `filter_popups` | `number \| All` | No | — |

**Output:** `any[]`

***

### sendEmail

`n8n.sendEmail`

Send an email through Enginemailer N8N

**Risk:** `write`

```ts theme={null}
await corsair.enginemailer.api.n8n.sendEmail({ email: 'ada@example.com', type: 'template', template_id: 42, substitution_tags: [{ Key: 'firstname', Value: 'Ada' }] });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `email` | `string` | Yes | — |
| `type` | `html \| template` | Yes | — |
| `html` | `string` | No | — |
| `subject` | `string` | No | — |
| `sender_email` | `string` | No | — |
| `sender_name` | `string` | No | — |
| `template_id` | `number` | No | — |
| `substitution_tags` | `object[]` | No | — |
| `cc_emails` | `string \| string[]` | No | — |

> [accordion] substitution\_tags full type
>
> ```ts theme={null}
> {
>   Key: string,
>   Value: string | number
> }[]
> ```

**Output:** `any`

***

### taggedSubscribers

`n8n.taggedSubscribers`

List tagged subscribers through Enginemailer N8N

**Risk:** `read`

```ts theme={null}
await corsair.enginemailer.api.n8n.taggedSubscribers({ filter_subcategory: 12, limit: 50 });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `limit` | `number` | No | — |
| `lastpollingdate` | `string` | No | — |
| `filter_subcategory` | `number \| All` | No | — |

**Output:** `any[]`

***

### tagSubscriber

`n8n.tagSubscriber`

Tag a subscriber through Enginemailer N8N

**Risk:** `write`

```ts theme={null}
await corsair.enginemailer.api.n8n.tagSubscriber({
	email: 'ada@example.com',
	subcategories: [12],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `email` | `string` | Yes | — |
| `subcategories` | `number[]` | Yes | — |

**Output:** `any`

***

### unsubscribedSubscribers

`n8n.unsubscribedSubscribers`

List unsubscribed subscribers through Enginemailer N8N

**Risk:** `read`

```ts theme={null}
await corsair.enginemailer.api.n8n.unsubscribedSubscribers({ filter: 'Campaign', filter_campaign: 2200, limit: 50 });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `limit` | `number` | No | — |
| `lastpollingdate` | `string` | No | — |
| `filter` | `All \| Autoresponder \| Campaign` | No | — |
| `filter_autoresponder` | `number \| All` | No | — |
| `filter_campaign` | `number \| All` | No | — |

**Output:** `any[]`

***

### untaggedSubscribers

`n8n.untaggedSubscribers`

List untagged subscribers through Enginemailer N8N

**Risk:** `read`

```ts theme={null}
await corsair.enginemailer.api.n8n.untaggedSubscribers({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `limit` | `number` | No | — |
| `lastpollingdate` | `string` | No | — |
| `filter_subcategory` | `number \| All` | No | — |

**Output:** `any[]`

***

### untagSubscriber

`n8n.untagSubscriber`

Remove a tag from a subscriber through Enginemailer N8N

**Risk:** `write`

```ts theme={null}
await corsair.enginemailer.api.n8n.untagSubscriber({
	email: 'ada@example.com',
	subcategories: [12],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `email` | `string` | Yes | — |
| `subcategories` | `number[]` | Yes | — |

**Output:** `any`

***

## Subscribers

### activate

`subscribers.activate`

Activate a subscriber

**Risk:** `write`

```ts theme={null}
await corsair.enginemailer.api.subscribers.activate({ email: 'ada@example.com' });
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `Result` | `object` | Yes | — |

> [accordion] Result full type
>
> ```ts theme={null}
> {
> }
> ```

***

### batchUpdateStatus

`subscribers.batchUpdateStatus`

Update subscriber status in a batch

**Risk:** `write`

```ts theme={null}
await corsair.enginemailer.api.subscribers.batchUpdateStatus({ ID: 12345 });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `ID` | `number` | Yes | — |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   Status: string,
>   StatusCode: string
> } | {
>   Result: {
>   }
> }
> ```

***

### batchUpdateSubscribers

`subscribers.batchUpdateSubscribers`

Update subscribers in a batch

**Risk:** `write`

```ts theme={null}
await corsair.enginemailer.api.subscribers.batchUpdateSubscribers({
	subscribers: [{
		email: 'ada@example.com',
		customfields: [{ customfield_key: 'first_name', customfield_value: 'Ada' }],
	}],
	subcategories: [12],
	sourcetype: 'Import',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `subscribers` | `object[]` | Yes | — |
| `subcategories` | `number[]` | No | — |
| `sourcetype` | `string` | No | — |

> [accordion] subscribers full type
>
> ```ts theme={null}
> {
>   email: string,
>   customfields?: {
>     customfield_key: string,
>     customfield_value: string | number
>   }[]
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `Result` | `object` | Yes | — |

> [accordion] Result full type
>
> ```ts theme={null}
> {
> }
> ```

***

### deleteSubscriber

`subscribers.deleteSubscriber`

Delete a subscriber

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

```ts theme={null}
await corsair.enginemailer.api.subscribers.deleteSubscriber({ email: 'ada@example.com' });
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `Result` | `object` | Yes | — |

> [accordion] Result full type
>
> ```ts theme={null}
> {
> }
> ```

***

### get

`subscribers.get`

Retrieve a subscriber by email address

**Risk:** `read`

```ts theme={null}
await corsair.enginemailer.api.subscribers.get({ email: 'ada@example.com' });
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `Result` | `object` | Yes | — |

> [accordion] Result full type
>
> ```ts theme={null}
> {
> }
> ```

***

### getCustomFields

`subscribers.getCustomFields`

List subscriber custom fields

**Risk:** `read`

```ts theme={null}
await corsair.enginemailer.api.subscribers.getCustomFields({});
```

**Input:** *empty object*

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `Result` | `object` | Yes | — |

> [accordion] Result full type
>
> ```ts theme={null}
> {
> }
> ```

***

### getSubcategories

`subscribers.getSubcategories`

List subscriber subcategories

**Risk:** `read`

```ts theme={null}
await corsair.enginemailer.api.subscribers.getSubcategories({ includeActiveSubscriberCount: true });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `includeActiveSubscriberCount` | `boolean` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `Result` | `object` | Yes | — |

> [accordion] Result full type
>
> ```ts theme={null}
> {
> }
> ```

***

### insert

`subscribers.insert`

Insert a subscriber into Enginemailer

**Risk:** `write`

```ts theme={null}
await corsair.enginemailer.api.subscribers.insert({
	email: 'ada@example.com',
	subcategories: [12],
	customfields: [{ customfield_key: 'first_name', customfield_value: 'Ada' }],
	sourcetype: 'Website sign-up',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `email` | `string` | Yes | — |
| `subcategories` | `number[]` | No | — |
| `customfields` | `object[]` | No | — |
| `sourcetype` | `string` | No | — |
| `subcategories_type` | `number` | No | — |
| `customfield_type` | `number` | No | — |

> [accordion] customfields full type
>
> ```ts theme={null}
> {
>   customfield_key: string,
>   customfield_value: string | number
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `Result` | `object` | Yes | — |

> [accordion] Result full type
>
> ```ts theme={null}
> {
> }
> ```

***

### unsubscribe

`subscribers.unsubscribe`

Unsubscribe a subscriber

**Risk:** `write`

```ts theme={null}
await corsair.enginemailer.api.subscribers.unsubscribe({ email: 'ada@example.com' });
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `Result` | `object` | Yes | — |

> [accordion] Result full type
>
> ```ts theme={null}
> {
> }
> ```

***

### update

`subscribers.update`

Update a subscriber record

**Risk:** `write`

```ts theme={null}
await corsair.enginemailer.api.subscribers.update({
	email: 'ada@example.com',
	subcategories: [12, 13],
	subcategories_type: 1,
	customfields: [{ customfield_key: 'branch', customfield_value: 'KL' }],
	customfield_type: 0,
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `email` | `string` | Yes | — |
| `subcategories` | `number[]` | No | — |
| `customfields` | `object[]` | No | — |
| `sourcetype` | `string` | No | — |
| `subcategories_type` | `number` | No | — |
| `customfield_type` | `number` | No | — |

> [accordion] customfields full type
>
> ```ts theme={null}
> {
>   customfield_key: string,
>   customfield_value: string | number
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `Result` | `object` | Yes | — |

> [accordion] Result full type
>
> ```ts theme={null}
> {
> }
> ```

***

### updateCategory

`subscribers.updateCategory`

Create or update a subscriber category

**Risk:** `write`

```ts theme={null}
await corsair.enginemailer.api.subscribers.updateCategory({
	categoryID: 0,
	categoryName: 'Interests',
	subcategories: [{ subcategoryID: 0, subcategoryName: 'Hiking' }],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `categoryID` | `number` | Yes | — |
| `categoryName` | `string` | Yes | — |
| `description` | `string` | No | — |
| `isvisible` | `boolean` | No | — |
| `subcategories` | `object[]` | No | — |

> [accordion] subcategories full type
>
> ```ts theme={null}
> {
>   subcategoryID: number,
>   subcategoryName: string,
>   description?: string
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `Result` | `object` | Yes | — |

> [accordion] Result full type
>
> ```ts theme={null}
> {
> }
> ```

***


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