LeadFlowXLeadFlowX

AI-Powered B2B CRM

API: Email

Manage email accounts and verify connections.

List Accounts

GET
/api/email-accounts

List all email accounts (passwords masked)

Auth: Session

Add Account

POST
/api/email-accounts

Add a new email account

Auth: Session

ParameterTypeDescription
emailstringEmail address(required)
smtpPassstringSMTP password (encrypted at rest)(required)
providerstringgmail, outlook, yahoo, or smtp (default)
smtpHoststringSMTP host (auto from provider)
smtpPortnumberSMTP port (auto from provider)
smtpUserstringSMTP user (defaults to email)
imapHoststringIMAP host
imapPortnumberIMAP port
imapUserstringIMAP user
imapPassstringIMAP password

Test Connection

POST
/api/email-accounts/test

Verify SMTP connection (does not send email)

Auth: None

Request
{ "accountId": "clx..." }
Response
{ "success": true, "message": "SMTP connection verified successfully" }

Send Test Email

POST
/api/email-accounts/send-test

Send a test email to verify full pipeline

Auth: None

Request
{ "accountId": "clx...", "toEmail": "you@example.com" }

IMAP Auto-Detect

POST
/api/email-accounts/imap-detect

Detect IMAP host/port from email domain

Auth: None

Request
{ "email": "user@gmail.com" }
Response
{ "imapHost": "imap.gmail.com", "imapPort": 993, "reachable": true, "source": "known-provider" }