---
title: "Connect new sending email accounts with SMTP and IMAP settings"
method: POST
path: "/v1/email-accounts/connect"
tags: ["email-accounts"]
---

# Connect new sending email accounts with SMTP and IMAP settings

`POST /v1/email-accounts/connect`

## Request

- Base URL: `https://developer.saleshandy.com` (the document declares no server; this is the origin it was published from)
- URL: `https://developer.saleshandy.com/v1/email-accounts/connect`
- Auth: API key in header `x-api-key`
- TypeScript: <https://skmtc.dev/saleshandy/apis/develop-with-saleshandy/docs/v1/email-accounts/connect/post.ts> (a function with typed inputs; its response is checked against the schema)

This can be a large request and may take some time to complete. But you will get response immediately after the request is submitted.

On request of this API, you will receive a **requestId** that can be used to check the status of the import process.

To check the status of the import process, you can use the `/v1/email-accounts/connect/status` API.

After completion you will receive a **CSV file link** containing the email account import details.

## Request body

- EmailAccountAddDto[]
  - `emailServiceProvider` 'gsuite' | 'microsoft' | 'o365' | 'yahoo' | 'zoho' | 'godaddy' | 'yandex' | 'sendgrid' | 'other', required: Email service provider : gsuite, microsoft, o365, yahoo, zoho, godaddy, yandex, sendgrid, other
  - `fromFirstName` string, required: First name of the sender
  - `fromLastName` string, required: Last name of the sender
  - `smtpEmailAddress` string, required: SMTP email address
  - `smtpUserName` string, required: SMTP username
  - `smtpPassword` string, required: SMTP password
  - `smtpHost` string, required: SMTP host
  - `smtpPort` number, required: SMTP port
  - `smtpEncryption` 'ssl' | 'tls' | 'none', required: SMTP encryption type (SSL/TLS/NONE)
  - `imapEmailAddress` string, required: IMAP email address
  - `imapUserName` string, required: IMAP username
  - `imapPassword` string, required: IMAP password
  - `imapHost` string, required: IMAP host
  - `imapPort` number, required: IMAP port
  - `imapEncryption` 'ssl' | 'tls' | 'none', required: IMAP encryption type (SSL/TLS/NONE)

## Response `200`

The email accounts connection process has been initiated successfully. Please wait while we connect your email accounts. You may check the status using this API `/v1/email-accounts/connect/status/{{requestId}}`.

- unknown

## Other responses

- `400`: 1001: Invalid token<br><br>
- `500`: 5001: Internal server error, please try again later<br><br>

---

[API](https://skmtc.dev/saleshandy/apis/develop-with-saleshandy.md) - [All operations](https://skmtc.dev/saleshandy/apis/develop-with-saleshandy/llms.txt) - [OpenAPI document](https://skmtc.dev/saleshandy/apis/develop-with-saleshandy/revisions/e7a29c931aa7?raw)
