Connect an account via IMAP/SMTP

Creates or updates an account by authenticating it against the provided IMAP and SMTP servers. Use this endpoint to onboard accounts that are not using OAuth (Gmail / Microsoft).

Looking to batch-connect OAuth accounts instead? Outlook / Office 365 and Google Workspace accounts should be onboarded through an Email Workspace rather than IMAP/SMTP. See the email_workspaces endpoints to create and manage workspaces, then follow the matching setup guide:

Body·
required
application/json

Connect an account via IMAP/SMTP

  • email
    Type: string
    required
  • first_name
    Type: string
    required
  • last_name
    Type: string
    required
  • provider
    Type: stringenum
    required
    values
    • gmail
    • outlook
    • custom
  • id
    Type: integerFormat: int32

    Signed 32-bit integers (commonly used integer type).

  • imap_issue
    Type: boolean
  • imap_server
    Type: string
  • imap_server_password
    Type: string
  • imap_server_port
    Type: integerFormat: int32

    Signed 32-bit integers (commonly used integer type).

  • imap_server_username
    Type: string
  • password
    Type: string
  • smtp_only
    Type: boolean

Connect an account via IMAP/SMTP

Responses
  • application/json
  • application/json
  • application/json
Request Example for post/v1/imap_auth
curl http://api.mailreach.co/api/v1/imap_auth \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'X-Api-Key: YOUR_SECRET_TOKEN' \
  --data '{
  "email": "",
  "password": "",
  "first_name": "",
  "last_name": "",
  "provider": "gmail",
  "id": 1,
  "imap_server": "",
  "imap_server_port": 1,
  "imap_server_username": "",
  "imap_server_password": "",
  "smtp_server": "",
  "smtp_server_port": 1,
  "smtp_server_username": "",
  "smtp_server_password": "",
  "smtp_server_auth_type": "plain",
  "smtp_server_starttls": true,
  "smtp_only": true,
  "imap_issue": true,
  "spamchecker_only": true,
  "test": true
}'
{
  "id": 1234,
  "created_at": "2026-02-14T09:30:00.000Z",
  "email": "john@acme.com",
  "first_name": "John",
  "last_name": "Doe",
  "provider": "gmail",
  "alive": true,
  "suspended": false,
  "warming_enabled": true,
  "spamchecker_enabled": false,
  "score": 92,
  "score_gmail": 95,
  "score_outlook": 88,
  "score_custom": 91,
  "total_messages_sent": 1240,
  "total_messages_received": 1187,
  "config_rampup_target": 25,
  "config_rampup_increase": 2,
  "config_max_conversation_running": 10,
  "config_current_conversation_running": 8,
  "config_smtp_append_after_sent": true,
  "time_zone": "Europe/Paris",
  "autopilot": true,
  "copilot_enabled": false,
  "has_refresh_token": true,
  "has_notifications": false,
  "imap_issue": false,
  "current_warming_recipe": "default",
  "detected_sending_provider": "google",
  "sending_reverse_dns_value": "mail-sor-f41.google.com",
  "sending_ip": "209.85.220.41",
  "signature": "Best,<br/>John Doe",
  "tags": [
    {
      "id": 7,
      "name": "sales-team"
    }
  ],
  "domain": {
    "id": 1041,
    "created_at": "2021-06-24T16:38:44.425Z",
    "updated_at": "2026-04-23T20:06:02.847Z",
    "domain": "acme.com",
    "creation_date": "2021-06-23T14:11:34.000Z",
    "last_check_at": "2026-04-20T23:46:39.081Z",
    "spf_valid": true,
    "spf_value": "v=spf1 include:spf.protection.outlook.com -all",
    "dkim_valid": true,
    "dkim_selector": "20251104",
    "dkim_value": "",
    "dmarc_valid": true,
    "dmarc_value": "v=DMARC1; p=none; rua=mailto:postmaster@acme.com",
    "domain_http_response": false,
    "domain_https": false,
    "avg_score": 99,
    "expire_at": "2026-06-23T14:11:34.000Z",
    "score_change": 0.75,
    "mx_records": [
      [
        "acme-com.mail.protection.outlook.com",
        "52.101.166.1",
        "0"
      ]
    ]
  }
}