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

# Smartlead: Upsert Email Account

> Add or update a Smartlead sending email account with its SMTP and IMAP settings. Includes inputs, outputs, SDK V2 examples, and Deepline cost.

Add or update a Smartlead sending email account with its SMTP and IMAP settings.

> [!NOTE]
>
> Tool ID: `smartlead_upsert_email_account`

## Run this action

Use the TypeScript SDK for one call. Use `ctx.tools.execute(...)` inside a Play for durable calls, scheduled calls, or CSV processing.

```ts theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
import { Deepline } from 'deepline';

const deepline = await Deepline.connect();
const result = await deepline.tools.execute(
  'smartlead_upsert_email_account',
  {
    "id": 1,
    "from_name": "Example",
    "from_email": "jane.doe@example.com",
    "user_name": "Example",
    "password": "YOUR_PASSWORD",
    "smtp_host": "api.example.com",
    "smtp_port": 123,
    "imap_host": "api.example.com",
    "imap_port": 123
  },
);

console.log(result.toolResponse.raw);
```

### CLI

```bash theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
deepline tools execute smartlead_upsert_email_account --input '{
  "id": 1,
  "from_name": "Example",
  "from_email": "jane.doe@example.com",
  "user_name": "Example",
  "password": "YOUR_PASSWORD",
  "smtp_host": "api.example.com",
  "smtp_port": 123,
  "imap_host": "api.example.com",
  "imap_port": 123
}' --json
```

## Example response

The static output schema lacks the details for a reliable example. Use `deepline describe smartlead_upsert_email_account --json` for the complete live contract.

## Input reference

Smartlead add/update email account input.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `payload.id` | `integer` | Yes | — | — |
| `payload.from_name` | `string` | Yes | — | Display name for outgoing emails. Minimum length: 1. |
| `payload.from_email` | `string` | Yes | — | From email address. Format: `email`. |
| `payload.user_name` | `string` | Yes | — | User name for SMTP/IMAP login. Minimum length: 1. |
| `payload.password` | `string` | Yes | — | Password for SMTP/IMAP login. Minimum length: 1. |
| `payload.smtp_host` | `string` | Yes | — | SMTP server hostname. Minimum length: 1. |
| `payload.smtp_port` | `integer` | Yes | — | SMTP server port. Minimum: 1. |
| `payload.imap_host` | `string` | Yes | — | IMAP server hostname. Minimum length: 1. |
| `payload.imap_port` | `integer` | Yes | — | IMAP server port. Minimum: 1. |
| `payload.max_email_per_day` | `integer` | No | — | — |
| `payload.custom_tracking_url` | `string` | No | — | — |
| `payload.bcc` | `string` | No | — | — |
| `payload.signature` | `string` | No | — | — |
| `payload.warmup_enabled` | `boolean` | No | — | — |
| `payload.total_warmup_per_day` | `integer` | No | — | — |
| `payload.daily_rampup` | `integer` | No | — | — |
| `payload.reply_rate_percentage` | `integer` | No | — | — |
| `payload.client_id` | `integer` | No | — | — |

<details>
  <summary>Show raw input schema</summary>

  ### Input JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "Smartlead add/update email account input.",
    "properties": {
      "id": {
        "type": [
          "integer",
          "null"
        ]
      },
      "from_name": {
        "type": "string",
        "description": "Display name for outgoing emails.",
        "minLength": 1
      },
      "from_email": {
        "type": "string",
        "description": "From email address.",
        "format": "email"
      },
      "user_name": {
        "type": "string",
        "description": "User name for SMTP/IMAP login.",
        "minLength": 1
      },
      "password": {
        "type": "string",
        "description": "Password for SMTP/IMAP login.",
        "minLength": 1
      },
      "smtp_host": {
        "type": "string",
        "description": "SMTP server hostname.",
        "minLength": 1
      },
      "smtp_port": {
        "type": "integer",
        "description": "SMTP server port.",
        "minimum": 1
      },
      "imap_host": {
        "type": "string",
        "description": "IMAP server hostname.",
        "minLength": 1
      },
      "imap_port": {
        "type": "integer",
        "description": "IMAP server port.",
        "minimum": 1
      },
      "max_email_per_day": {
        "type": "integer"
      },
      "custom_tracking_url": {
        "type": "string"
      },
      "bcc": {
        "type": "string"
      },
      "signature": {
        "type": "string"
      },
      "warmup_enabled": {
        "type": "boolean"
      },
      "total_warmup_per_day": {
        "type": [
          "integer",
          "null"
        ]
      },
      "daily_rampup": {
        "type": [
          "integer",
          "null"
        ]
      },
      "reply_rate_percentage": {
        "type": [
          "integer",
          "null"
        ]
      },
      "client_id": {
        "type": [
          "integer",
          "null"
        ]
      }
    },
    "required": [
      "id",
      "from_name",
      "from_email",
      "user_name",
      "password",
      "smtp_host",
      "smtp_port",
      "imap_host",
      "imap_port"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Output reference

Raw Smartlead upsert email account payload.

The static output schema is not available. Run `deepline describe smartlead_upsert_email_account --json` for the live contract.

<details>
  <summary>Show raw output schema</summary>

  ### Output JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "description": "Raw Smartlead upsert email account payload."
  }
  ```
</details>

## Deepline cost

* Pricing model: `fixed` (per call).
* Estimated Deepline credits: `0` per pricing unit.
* Provider-native pricing may still exist outside Deepline credit billing.

## Related documentation

* [SDK V2 quickstart](https://deepline.com/docs/sdk-v2/quickstart.md)
* [SDK reference](https://deepline.com/docs/sdk-v2/sdk-reference.md)
* [Run tools across a CSV](https://deepline.com/docs/sdk-v2/batch-csv.md)


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