> **Building with AI coding agents?** Install the authstack plugin with one command. This equips your agent with accurate Scalekit implementation patterns.
>
> **Recommended** (the `-y` flags skip prompts, so the command runs without an interactive terminal):
> ```bash
> npx -y @scalekit-inc/cli setup -y
> ```
>
> Global:
> ```bash
> npm install -g @scalekit-inc/cli
> scalekit setup -y
> ```
>
> Supports Claude Code, Cursor, GitHub Copilot, Codex + skills for other Agent Skills-compatible agents in `~/.agents/skills`.
> Skills: integrate-agentkit, implement-saaskit, add-mcp-oauth, implement-sso, implement-scim.
> [Full setup guide](https://docs.scalekit.com/dev-kit/build-with-ai/)

---

# Connect AI agents to Enginemailer

The Enginemailer connector lets your AI agent act in each user's Enginemailer account. Each user connects their own Enginemailer API key once, and Scalekit sends it with every call, so your agent never handles credentials. It comes with 26 tools.

**Authentication:** API Key
**Categories:** Marketing, Communication
**Tools:** 26: 9 read, 14 write, 3 destructive
**Users sign in with:** API key
**Built by:** Scalekit connector
**Try it:** [Playground in the Scalekit dashboard](https://app.scalekit.com/ws/signup?sk_intent=playground&provider=ENGINEMAILER)

## Setup

1. ### Install the SDK

   **Node.js**

   ```bash
   npm install @scalekit-sdk/node dotenv
   ```

   **Python**

   ```bash
   pip install scalekit-sdk-python python-dotenv
   ```

2. ### Set your credentials

   Add your Scalekit credentials to your `.env` file. Find values in **[app.scalekit.com](https://app.scalekit.com)** > **Developers** > **API Credentials**.

   ```sh title=".env"
   SCALEKIT_ENVIRONMENT_URL=<your-environment-url>
   SCALEKIT_CLIENT_ID=<your-client-id>
   SCALEKIT_CLIENT_SECRET=<your-client-secret>
   ```

3. ### Create the Enginemailer connection

   In **AgentKit > Connections**, create an Enginemailer connection. The name you give it is the `connection_name` your code passes. See [Configure connections](/agentkit/connections/).

4. ### Authorize a user and make your first call

   **Node.js** (`quickstart.mts`)

   ```typescript
   import { ScalekitClient } from '@scalekit-sdk/node'
   import 'dotenv/config'
   import { createInterface } from 'node:readline/promises'

   const scalekit = new ScalekitClient(
     process.env.SCALEKIT_ENVIRONMENT_URL,
     process.env.SCALEKIT_CLIENT_ID,
     process.env.SCALEKIT_CLIENT_SECRET,
   )
   const actions = scalekit.actions

   const connector = 'enginemailer'
   const identifier = 'user_123'

   // Generate an authorization link for the user
   const { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })
   console.log('Authorize Enginemailer:', link)
   const rl = createInterface({ input: process.stdin, output: process.stdout })
   await rl.question('Press Enter after authorizing...')
   rl.close()

   // Make your first call
   const result = await actions.executeTool({
     connector,
     identifier,
     toolName: 'enginemailer_campaign_categories_list',
     toolInput: {},
   })
   console.log(result)
   ```

   ```bash
   npx tsx quickstart.mts
   ```

   **Python** (`quickstart.py`)

   ```python
   import os
   from scalekit import ScalekitClient
   from dotenv import load_dotenv
   load_dotenv()

   scalekit_client = ScalekitClient(
       env_url=os.getenv("SCALEKIT_ENVIRONMENT_URL"),
       client_id=os.getenv("SCALEKIT_CLIENT_ID"),
       client_secret=os.getenv("SCALEKIT_CLIENT_SECRET"),
   )
   actions = scalekit_client.actions

   connection_name = "enginemailer"
   identifier = "user_123"

   # Generate an authorization link for the user
   link_response = actions.get_authorization_link(
       connection_name=connection_name,
       identifier=identifier,
   )
   print("Authorize Enginemailer:", link_response.link)
   input("Press Enter after authorizing...")

   # Make your first call
   result = actions.execute_tool(
       tool_input={},
       tool_name="enginemailer_campaign_categories_list",
       connection_name=connection_name,
       identifier=identifier,
   )
   print(result)
   ```

   ```bash
   python quickstart.py
   ```

   Each user opens the link once and enters their Enginemailer credentials there. See [Authorize a user](/agentkit/tools/authorize/) for the full flow and statuses.

## Tools

Pass the exact name to `execute_tool`, with an input like each tool's example. To ask for a tool that's missing, use the [request form](https://scalekitsupport.portal.usepylon.com/forms/request-a-connector-tool).

**Node.js**

```typescript
const result = await actions.executeTool({
  toolName: 'enginemailer_campaign_categories_list',
  toolInput: {},
  connector: 'enginemailer',
  identifier: 'user_123',
})
```

**Python**

```python
result = actions.execute_tool(
    tool_name="enginemailer_campaign_categories_list",
    tool_input={},
    connection_name="enginemailer",
    identifier="user_123",
)
```

`result.data` is the app's response as JSON, and `result.execution_id` (`executionId` in Node.js) is the ID of the call.

### `enginemailer_campaign_categories_list`

List Campaign Categories · Read-only

List the subscriber categories available for campaign targeting.
Returns categories with ID and name.
Use List Campaign Subcategories for a category's subcategories.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs: none.

Example input: `{}`

### `enginemailer_campaign_delivery_status_get`

Get Campaign Delivery Status · Read-only

Get delivery and engagement stats for a delivered campaign.
Returns emails sent, delivered, bounces, opens, unique opens, clicks, unique clicks, unsubscribes and spam complaints.
Only campaigns with status Delivered are eligible.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `campaign_id` (`integer`, required): Enginemailer campaign ID, from List Campaigns or Create Campaign. Example: 1234.

Example input: `{"campaign_id":1234}`

### `enginemailer_campaign_subcategories_list`

List Campaign Subcategories · Read-only

List the subcategories in one category, for campaign targeting.
Returns subcategories with ID and name.
Use the IDs in Assign Recipient List.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `category_id` (`integer`, required): Category ID, from List Campaign Categories. Example: 1.

Example input: `{"category_id":1}`

### `enginemailer_campaigns_list`

List Campaigns · Read-only

List the account's undelivered campaigns.
Returns the undelivered campaigns with their IDs and details.
Use Get Campaign Delivery Status for delivered campaigns' stats.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs: none.

Example input: `{}`

### `enginemailer_custom_fields_list`

List Custom Fields · Read-only

List the subscriber custom fields defined in the account.
Returns each field with its key and type.
Use the field keys in Insert Subscriber or Update Subscriber.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs: none.

Example input: `{}`

### `enginemailer_subcategories_get`

Get Subcategories · Read-only

List the subscriber categories and their subcategories (lists).
Returns the categories with their subcategory IDs and names.
Use the subcategory IDs in Insert Subscriber or Update Subscriber.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `include_active_subscriber_count` (`boolean`, optional): Include each subcategory's active subscriber count (whitelisted accounts only). Example: true.

Example input: `{}`

### `enginemailer_subscriber_get`

Get Subscriber · Read-only

Get one subscriber by email address.
Returns the subscriber ID, status and custom field values.
Use Insert Subscriber to add a new one.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `email` (`string`, required): The subscriber's email address. Example: jane@example.com.

Example input: `{"email":"<email>"}`

### `enginemailer_subscribers_batch_update_status`

Get Batch Update Status · Read-only

Get the status of a Batch Update Subscribers job.
Returns the job's status.
Use Batch Update Subscribers to start a job.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `import_id` (`integer`, required): ImportID returned by Batch Update Subscribers. Example: 1234.

Example input: `{"import_id":1234}`

### `enginemailer_transactional_report_export_status`

Get Transactional Export Status · Read-only

Check a transactional report export.
Returns its status (Processing or Complete) and, when complete, the CSV download URL.
Use Export Transactional Report first.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `export_id` (`integer`, required): ExportID returned by Export Transactional Report. Example: 9.

Example input: `{"export_id":9}`

### `enginemailer_campaign_create`

Create Campaign · Write

Create an email campaign with sender, subject and HTML content (paid accounts; 200 campaigns at most).
Returns the result with the new campaign's ID.
Then use Assign Recipient List and Send Campaign or Schedule Campaign.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `campaign_name` (`string`, required): Campaign name, up to 128 characters. Example: November newsletter.
- `content` (`string`, required): HTML content of the campaign, up to 256 KB. Example: <h1>Hello</h1>Our November news.
.
- `sender_email` (`string`, required): Sender email. Its domain must be verified in the Enginemailer account. Example: news@acme.com.
- `sender_name` (`string`, required): Sender name, up to 128 characters. Example: Acme Support.
- `subject` (`string`, required): Email subject, up to 256 characters. Example: What's new in November.
- `reply_to` (`string`, optional): Reply-to email address. Example: support@acme.com.

Example input: `{"campaign_name":"<campaign_name>","content":"<content>","sender_email":"<sender_email>","sender_name":"<sender_name>","subject":"<subject>"}`

### `enginemailer_campaign_pause`

Pause Campaign · Write

Pause a scheduled campaign that has not started delivering.
Returns a status result.
Use Schedule Campaign to reschedule it.

Read only: no. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `campaign_id` (`integer`, required): Enginemailer campaign ID, from List Campaigns or Create Campaign. Example: 1234.

Example input: `{"campaign_id":1234}`

### `enginemailer_campaign_recipient_list_assign`

Assign Recipient List · Write

Set a campaign's recipients: all subscribers, or those in given subcategories.
Returns a status result.
Use List Campaign Subcategories for IDs. Not allowed on scheduled or delivered campaigns.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `campaign_id` (`integer`, required): ID of the campaign. Example: 1234.
- `filter_by` (`integer`, required): 1 assigns all subscribers; 2 filters by subcategories. Example: 2. One of: `1`, `2`.
- `category_list` (`array`, optional): Subcategory IDs to filter by (from List Campaign Subcategories). Required when filter_by is 2. Example: [1, 2].
- `filter_type` (`string`, optional): AND sends to subscribers in all listed subcategories; OR to subscribers in any. Required when filter_by is 2. Example: OR. One of: `AND`, `OR`.

Example input: `{"campaign_id":1234,"filter_by":2}`

### `enginemailer_campaign_schedule`

Schedule Campaign · Write

Schedule a campaign to send at a future time on a 15-minute boundary.
Returns a status result. Insufficient credit marks it failed at send time.
Use Pause Campaign to stop a scheduled send.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `campaign_id` (`integer`, required): Enginemailer campaign ID, from List Campaigns or Create Campaign. Example: 1234.
- `schedule_time` (`string`, required): Send time as ddMMyyyy hh:mmtt, on a 15-minute boundary, in the future. Example: 01122026 12:15PM.

Example input: `{"campaign_id":1234,"schedule_time":"<schedule_time>"}`

### `enginemailer_campaign_send`

Send Campaign · Write

Send a campaign now to its recipient list. It needs at least one recipient.
Returns a status result. Emails go out to every recipient.
Use Schedule Campaign to send later.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `campaign_id` (`integer`, required): Enginemailer campaign ID, from List Campaigns or Create Campaign. Example: 1234.

Example input: `{"campaign_id":1234}`

### `enginemailer_campaign_update`

Update Campaign · Write

Update an undelivered campaign's name, sender, subject or content.
Returns a status result.
Use List Campaigns to find the ID.

Read only: no. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `campaign_id` (`integer`, required): ID of the campaign to update. Example: 1234.
- `campaign_name` (`string`, required): Campaign name, up to 128 characters. Example: November newsletter.
- `content` (`string`, required): HTML content of the campaign, up to 256 KB. Example: <h1>Hello</h1>Our November news.
.
- `sender_email` (`string`, required): Sender email. Its domain must be verified in the Enginemailer account. Example: news@acme.com.
- `sender_name` (`string`, required): Sender name, up to 128 characters. Example: Acme Support.
- `subject` (`string`, required): Email subject, up to 256 characters. Example: What's new in November.
- `reply_to` (`string`, optional): Reply-to email address. Example: support@acme.com.

Example input: `{"campaign_id":1234,"campaign_name":"<campaign_name>","content":"<content>","sender_email":"<sender_email>","sender_name":"<sender_name>","subject":"<subject>"}`

### `enginemailer_category_save`

Create or Update Category · Write

Create a subscriber category, or rename an existing one, and create or rename its subcategories.
Returns a status result.
Use Get Subcategories to see existing IDs.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `category_id` (`integer`, required): Category ID to update, or 0 to create a new category. Example: 0.
- `category_name` (`string`, required): Category name, up to 128 characters. Renames an existing category. Example: Festivals.
- `description` (`string`, optional): Category description, up to 128 characters. Example: Festive season lists.
- `isvisible` (`boolean`, optional): Whether the category is visible. Defaults to true. Example: true.
- `subcategories` (`array`, optional): Subcategories to create or rename. Each has subcategoryID (0 for new), subcategoryName and an optional description. Example: [{"subcategoryID": 0, "subcategoryName": "New Year"}].

Example input: `{"category_id":0,"category_name":"<category_name>"}`

### `enginemailer_subscriber_activate`

Activate Subscriber · Write

Reactivate a subscriber that was deactivated through the API or the portal.
Returns a status result.
Use Get Subscriber to check the status.

Read only: no. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `email` (`string`, required): The subscriber's email address. Example: jane@example.com.

Example input: `{"email":"<email>"}`

### `enginemailer_subscriber_insert`

Insert Subscriber · Write

Add a subscriber with optional subcategories and custom fields.
Returns a status result. Free accounts can add 50 a day and paid accounts 10,000.
Use Batch Update Subscribers for many at once.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `email` (`string`, required): Subscriber email address. Example: jane@example.com.
- `customfields` (`array`, optional): Custom field values. Each item has customfield_key (the field's FieldKey from List Custom Fields) and customfield_value, in the field's format: dates as dd MMM yyyy, phones with + and country code, multiple choices joined with |. Example: [{"customfield_key": "first_name", "customfield_value": "Jane"}].
- `sourcetype` (`string`, optional): Label for where the subscriber came from. Example: Website signup.
- `subcategories` (`array`, optional): IDs of the subcategories (lists) the subscriber belongs to. Get them from Get Subcategories. Example: [1, 2].

Example input: `{"email":"<email>"}`

### `enginemailer_subscriber_unsubscribe`

Unsubscribe Subscriber · Write

Unsubscribe a subscriber from the subscriber list.
Returns a status result.
Use Activate Subscriber to reactivate a deactivated subscriber.

Read only: no. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `email` (`string`, required): The subscriber's email address. Example: jane@example.com.

Example input: `{"email":"<email>"}`

### `enginemailer_subscriber_update`

Update Subscriber · Write

Update an existing subscriber's subcategories and custom fields.
Returns a status result.
Use Get Subscriber to read the current values.

Read only: no. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `email` (`string`, required): Email of the existing subscriber. Example: jane@example.com.
- `customfield_type` (`integer`, optional): How to apply custom fields: 0 update only the given fields, 1 replace all (default). Example: 0. One of: `0`, `1`.
- `customfields` (`array`, optional): Custom field values. Each item has customfield_key (the field's FieldKey from List Custom Fields) and customfield_value, in the field's format: dates as dd MMM yyyy, phones with + and country code, multiple choices joined with |. Example: [{"customfield_key": "first_name", "customfield_value": "Jane"}].
- `subcategories` (`array`, optional): IDs of the subcategories (lists) the subscriber belongs to. Get them from Get Subcategories. Example: [1, 2].
- `subcategories_type` (`integer`, optional): How to apply subcategories: 0 do nothing, 1 append (default), 2 remove the given ones, 3 replace all. Example: 1. One of: `0`, `1`, `2`, `3`.

Example input: `{"email":"<email>"}`

### `enginemailer_subscribers_batch_update`

Batch Update Subscribers · Write

Add or update up to 5000 subscribers in one job; invalid rows are skipped.
Returns an import ID for the job.
Use Get Batch Update Status to follow it.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `subscribers` (`array`, required): Up to 5000 subscribers, each with email and an optional customfields list (customfield_key and customfield_value). Example: [{"email": "jane@example.com", "customfields": [{"customfield_key": "first_name", "customfield_value": "Jane"}]}].
- `sourcetype` (`string`, optional): Label for where the subscribers came from. Example: CRM import.
- `subcategories` (`array`, optional): Subcategory IDs to assign to every subscriber in the batch. Example: [1, 2].

Example input: `{"subscribers":[]}`

### `enginemailer_transactional_email_send`

Send Transactional Email · Write

Send one transactional email, with your own content or an Enginemailer template and substitution tags.
Returns the submission result. Sends an email to the recipient.
Use Create Campaign for bulk marketing campaigns.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `sender_email` (`string`, required): Sender email. Its domain must be a verified sending domain; with a template it must match the template's sender. Example: noreply@acme.com.
- `to_email` (`string`, required): Recipient email address. Example: jane@example.com.
- `attachments` (`array`, optional): Files to attach, total 5 MB at most. Each has Filename (with extension) and Content (base64). Example: [{"Filename": "invoice.txt", "Content": "SGVsbG8="}].
- `bcc_emails` (`array`, optional): BCC addresses, up to 3. Example: ["archive@acme.com"].
- `campaign_name` (`string`, optional): Label to group sends in reports. Example: Order shipped.
- `cc_emails` (`array`, optional): CC addresses, up to 10. Example: ["ops@acme.com"].
- `reply_to` (`string`, optional): Reply-to email address. Example: support@acme.com.
- `sender_name` (`string`, optional): Sender name. Not needed with template_id. Example: Acme Store.
- `subject` (`string`, optional): Email subject. Not needed with template_id. Example: Your order has shipped.
- `submitted_content` (`string`, optional): Email body (HTML or text). Not needed with template_id. Example: Your order #1234 is on its way.
.
- `substitution_tags` (`array`, optional): Template variables to fill, each with Key and Value. Values cannot contain { } [ ]. Example: [{"Key": "order_id", "Value": "1234"}].
- `template_id` (`integer`, optional): ID of an Enginemailer template to send. Subject and sender name then come from the template. Example: 1023.

Example input: `{"sender_email":"<sender_email>","to_email":"<to_email>"}`

### `enginemailer_transactional_report_export`

Export Transactional Report · Write

Start a CSV export of transactional email activity for a date range.
Returns an ExportID and status Processing.
Use Get Transactional Export Status to get the download URL when it completes.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `period` (`string`, required): Date range of the report, as "d MMM yyyy - d MMM yyyy". The start can be at most 60 days ago. Example: 1 Nov 2026 - 15 Nov 2026.
- `domain_filter` (`string`, optional): Only include sends from this sender domain. Example: acme.com.
- `email_to_filter` (`string`, optional): Only include sends to this email address. Example: jane@example.com.

Example input: `{"period":"<period>"}`

### `enginemailer_campaign_delete`

Delete Campaign · Destructive

Delete an undelivered campaign. Scheduled, delivering and delivered campaigns cannot be deleted.
Returns a status result.
Use List Campaigns to find the ID.

Read only: no. Destructive: yes. Idempotent (safe to retry): yes.

Inputs:

- `campaign_id` (`integer`, required): Enginemailer campaign ID, from List Campaigns or Create Campaign. Example: 1234.

Example input: `{"campaign_id":1234}`

### `enginemailer_campaign_recipient_list_delete`

Delete Recipient List · Destructive

Remove the recipient list from an undelivered campaign.
Returns a status result.
Use Assign Recipient List to set a new one.

Read only: no. Destructive: yes. Idempotent (safe to retry): yes.

Inputs:

- `campaign_id` (`integer`, required): Enginemailer campaign ID, from List Campaigns or Create Campaign. Example: 1234.

Example input: `{"campaign_id":1234}`

### `enginemailer_subscriber_delete`

Delete Subscriber · Destructive

Delete a subscriber.
Returns a status result.
Use Unsubscribe Subscriber to keep the record but stop sending.

Read only: no. Destructive: yes. Idempotent (safe to retry): yes.

Inputs:

- `email` (`string`, required): Email of the subscriber to delete. Example: jane@example.com.

Example input: `{"email":"<email>"}`

## Related

Other Marketing connectors ([all 190](/agentkit/connectors/?category=marketing)):

- [HubSpot](/agentkit/connectors/hubspot/): Scalekit connector, OAuth, 457 tools
- [Mailchimp](/agentkit/connectors/mailchimp/): Scalekit connector, OAuth, 73 tools
- [Twitter / X](/agentkit/connectors/twitteroauth/): Scalekit connector, OAuth, 92 tools


---

## More Scalekit documentation

| Resource | What it contains | When to use it |
|----------|-----------------|----------------|
| [/llms.txt](/llms.txt) | Structured index with routing hints per product area | Start here — find which documentation set covers your topic before loading full content |
| [/llms-full.txt](/llms-full.txt) | Complete documentation for all Scalekit products in one file | Use when you need exhaustive context across multiple products or when the topic spans several areas |
| [sitemap-0.xml](https://docs.scalekit.com/sitemap-0.xml) | Full URL list of every documentation page | Use to discover specific page URLs you can fetch for targeted, page-level answers |
