Email Accounts

Connect Email Account

POST /v1/email-accounts/smtp-imap/connect

POST/v1/email-accounts/smtp-imap/connect
POST
/v1/email-accounts/smtp-imap/connect

Connect an SMTP/IMAP email account

Connects a new SMTP/IMAP email account for use as a sending mailbox in sequences.

The account is always saved to the database, even if the connection test fails — inspect the smtpConnection and imapConnection fields in the response.

  • status: 0 — created but connection unverified (check smtpConnection.error/imapConnection.error).
  • status: 1 — connected and verified.
emailServiceProvider must be lowercase (e.g. "zoho"). Valid values: zoho, gmail, yahoo, sendgrid, mailgun, ses, outlook.

fromName is the full display name shown in the From header; it is independent of fromFirstName/fromLastName — all three must be supplied.

Authorization

x-api-key<token>

API key for Open API authentication

In: header

Request Body

application/jsonRequired

emailServiceProviderstring

Email service provider identifier. Accepted values: gmail, microsoft, gsuite, o365, yahoo, zoho, godaddy, yandex, sendgrid, other.

Example: "zoho"Value in: "gmail" | "microsoft" | "gsuite" | "o365" | "yahoo" | "zoho" | "godaddy" | "yandex" | "sendgrid" | "other"

fromNamestring

Full display name shown as the sender.

Example: "Sarah Chen"

fromFirstNamestring

Sender's first name.

Example: "Sarah"

fromLastNamestring

Sender's last name.

Example: "Chen"

payloadobject

SMTP + IMAP connection settings.

Responses

200
Email account connected successfully

Request

curl -X POST \
  "https://open-api.saleshandy.com/v1/email-accounts/smtp-imap/connect" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "emailServiceProvider": "zoho",
  "fromName": "Sarah Chen",
  "fromFirstName": "Sarah",
  "fromLastName": "Chen",
  "payload": {
    "smtp": {
      "emailAddress": "[email protected]",
      "password": "AppPassword123",
      "host": "smtp.zoho.com",
      "port": 587,
      "encryption": "TLS",
      "userName": "[email protected]"
    },
    "imap": {
      "emailAddress": "[email protected]",
      "password": "AppPassword123",
      "host": "imap.zoho.com",
      "port": 993,
      "encryption": "SSL"
    }
  }
}'

Response

No response body