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

# Connect an SMTP/IMAP mailbox

> Connects a mailbox by its SMTP and IMAP servers and password, as the app's SMTP option does: Fuse logs in to the SMTP server (and to the IMAP server while inbox syncing for SMTP mailboxes is on) before saving anything, stores the password encrypted and never returns or logs it, then syncs the inbox. Connecting an SMTP mailbox you already connected updates its servers and password and keeps its settings, which is how to reconnect one whose login stopped working. A new mailbox takes a place in your plan's mailbox pool. Answers 201 with the mailbox as its row in GET /business/accounts?channel=email. Rate limit: 20 requests per minute, 600 per day, shared by every route under /business/accounts/ except the SMTP import and its status.

Errors:
- `409` `EMAIL_ACCOUNT_ALREADY_CONNECTED` — The address is already connected to your workspace through another provider (Gmail, Outlook or SMTP).
- `403` `EMAIL_ACCOUNT_LIMIT_REACHED` — Every mailbox your plan's seats allow is connected, and this address is not one of them already.
- `422` `SMTP_HOST_NOT_ALLOWED` — `smtpHost` or `imapHost` resolves to a private or internal address.
- `422` `SMTP_HOST_NOT_FOUND` — `smtpHost` or `imapHost` does not resolve.
- `422` `GOOGLE_HOSTED_DOMAIN` — A host does not resolve and the domain's mail is hosted by Google: use Gmail's servers with an app password.
- `422` `MICROSOFT_OAUTH_REQUIRED` — A host does not resolve and the domain's mail is hosted by Microsoft, which refuses password logins.
- `422` `FORWARDING_ONLY_DOMAIN` — A host does not resolve and the domain only forwards mail, so there is no mailbox to connect.
- `422` `SMTP_LOGIN_REJECTED` — The mail server refused the login (`authUser` / `password`).
- `422` `SMTP_LOGIN_THROTTLED` — The mail server is limiting login attempts; the same settings work later.
- `422` `SMTP_BASIC_AUTH_DISABLED` — The mail server accepts no password logins (Microsoft 365 IMAP).
- `422` `SMTP_CONNECTION_FAILED` — No connection with these hosts, ports and TLS settings.
- `422` `VALIDATION_FAILED` — A required field is missing, a host is not a host name, a port is not a port, or an unknown field was sent.
- `429` `RATE_LIMITED` — The quota for the /business/accounts/ routes (20 per minute, 600 per day) is spent, or the LinkedIn service's own per-user limit refused the call. Retry after the Retry-After / RateLimit-Reset seconds when present, else after a minute.

Requires one of the following token scopes: accounts.



## OpenAPI

````yaml /openapi.json post /business/accounts/email/smtp
openapi: 3.1.0
info:
  title: Fuse Business API
  version: 1.0.0
  description: >-
    External API for lists, campaigns, prospect search and contacts.
    Authenticate with your API token as HTTP Basic. All paths are under /api/v1.
servers:
  - url: https://api.tryfuse.ai/api/v1
    description: Production
security:
  - basicAuth: []
tags:
  - name: Lists
  - name: Custom columns
  - name: Smart columns
  - name: Exports
  - name: Campaigns
  - name: Knowledge hubs
  - name: Analytics
  - name: Website intent
  - name: LinkedIn
  - name: Conversations
  - name: Account
  - name: Sending accounts
  - name: Data
  - name: Prospect search
  - name: Campaign steps
  - name: Scheduled sends
  - name: Campaign templates
  - name: Tracking domains
  - name: Agents
  - name: Research
  - name: Company search
  - name: Saved searches
  - name: Folders
  - name: Exclusions
  - name: Contacts
paths:
  /business/accounts/email/smtp:
    post:
      tags:
        - Sending accounts
      summary: Connect an SMTP/IMAP mailbox
      description: >-
        Connects a mailbox by its SMTP and IMAP servers and password, as the
        app's SMTP option does: Fuse logs in to the SMTP server (and to the IMAP
        server while inbox syncing for SMTP mailboxes is on) before saving
        anything, stores the password encrypted and never returns or logs it,
        then syncs the inbox. Connecting an SMTP mailbox you already connected
        updates its servers and password and keeps its settings, which is how to
        reconnect one whose login stopped working. A new mailbox takes a place
        in your plan's mailbox pool. Answers 201 with the mailbox as its row in
        GET /business/accounts?channel=email. Rate limit: 20 requests per
        minute, 600 per day, shared by every route under /business/accounts/
        except the SMTP import and its status.


        Errors:

        - `409` `EMAIL_ACCOUNT_ALREADY_CONNECTED` — The address is already
        connected to your workspace through another provider (Gmail, Outlook or
        SMTP).

        - `403` `EMAIL_ACCOUNT_LIMIT_REACHED` — Every mailbox your plan's seats
        allow is connected, and this address is not one of them already.

        - `422` `SMTP_HOST_NOT_ALLOWED` — `smtpHost` or `imapHost` resolves to a
        private or internal address.

        - `422` `SMTP_HOST_NOT_FOUND` — `smtpHost` or `imapHost` does not
        resolve.

        - `422` `GOOGLE_HOSTED_DOMAIN` — A host does not resolve and the
        domain's mail is hosted by Google: use Gmail's servers with an app
        password.

        - `422` `MICROSOFT_OAUTH_REQUIRED` — A host does not resolve and the
        domain's mail is hosted by Microsoft, which refuses password logins.

        - `422` `FORWARDING_ONLY_DOMAIN` — A host does not resolve and the
        domain only forwards mail, so there is no mailbox to connect.

        - `422` `SMTP_LOGIN_REJECTED` — The mail server refused the login
        (`authUser` / `password`).

        - `422` `SMTP_LOGIN_THROTTLED` — The mail server is limiting login
        attempts; the same settings work later.

        - `422` `SMTP_BASIC_AUTH_DISABLED` — The mail server accepts no password
        logins (Microsoft 365 IMAP).

        - `422` `SMTP_CONNECTION_FAILED` — No connection with these hosts, ports
        and TLS settings.

        - `422` `VALIDATION_FAILED` — A required field is missing, a host is not
        a host name, a port is not a port, or an unknown field was sent.

        - `429` `RATE_LIMITED` — The quota for the /business/accounts/ routes
        (20 per minute, 600 per day) is spent, or the LinkedIn service's own
        per-user limit refused the call. Retry after the Retry-After /
        RateLimit-Reset seconds when present, else after a minute.


        Requires one of the following token scopes: accounts.
      operationId: connectSmtpMailbox
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                emailAddress:
                  type: string
                  format: email
                  maxLength: 320
                  description: >-
                    The mailbox's address. Stored trimmed and lower-cased; it
                    becomes the account's `id`.
                name:
                  type: string
                  maxLength: 200
                  description: >-
                    Sender name for a new mailbox, up to 200 characters.
                    Reconnecting an existing mailbox keeps its current name.
                smtpHost:
                  type: string
                  description: >-
                    Outgoing (SMTP) server host name, for example
                    `smtp.zoho.com`.
                smtpPort:
                  type: number
                  default: 465
                  description: >-
                    Outgoing server port: 465 for implicit TLS (default), 587
                    for STARTTLS.
                smtpSecure:
                  type: boolean
                  default: true
                  description: >-
                    true (default) for implicit TLS (port 465), false for
                    STARTTLS (port 587).
                imapHost:
                  type: string
                  description: >-
                    Incoming (IMAP) server host name, for example
                    `imap.zoho.com`.
                imapPort:
                  type: number
                  default: 993
                  description: 'Incoming server port: 993 (default) for implicit TLS.'
                imapSecure:
                  type: boolean
                  default: true
                  description: true (default) for implicit TLS.
                authUser:
                  type: string
                  maxLength: 320
                  description: >-
                    Login user name when it differs from `emailAddress`; omitted
                    or empty logs in as `emailAddress`.
                password:
                  type: string
                  minLength: 1
                  maxLength: 1024
                  description: >-
                    The mailbox password, or an app password where the provider
                    requires one (2-step verification on). Verified with a live
                    login, stored encrypted, never returned or logged.
              required:
                - emailAddress
                - smtpHost
                - imapHost
                - password
      responses:
        '201':
          description: Success
          headers:
            RateLimit-Limit:
              schema:
                type: integer
              description: Requests permitted in the current window.
            RateLimit-Remaining:
              schema:
                type: integer
              description: Requests remaining in the current window.
            RateLimit-Reset:
              schema:
                type: integer
              description: Seconds until the current window resets.
          content:
            application/json:
              schema:
                type: object
                properties:
                  channel:
                    type: string
                    enum:
                      - email
                  account:
                    type: object
                    title: EmailAccount
                    properties:
                      id:
                        type: string
                        description: >-
                          The mailbox's address: the `accountId` of the
                          single-account routes.
                      emailAddress:
                        type: string
                      name:
                        type:
                          - string
                          - 'null'
                        description: The sender name.
                      provider:
                        type: string
                        enum:
                          - gmail
                          - outlook
                          - smtp
                      isActive:
                        type: boolean
                        description: Whether campaigns may send from it.
                      isConnected:
                        type: boolean
                      dailyCapacity:
                        type: integer
                        description: Emails it may send per day.
                      availableCapacity:
                        type: integer
                        description: Emails it may still send today.
                      needsReauthAt:
                        type:
                          - string
                          - 'null'
                        description: >-
                          When the provider invalidated the connection; null
                          while it works.
                      needsReauthReason:
                        type:
                          - string
                          - 'null'
                      warmup:
                        type:
                          - object
                          - 'null'
                        title: MailboxWarmup
                        description: >-
                          The mailbox's warmup (managed deliverability, run by
                          the warmup service Mailivery), as the app's accounts
                          table shows it; null when it could not be read. Warmup
                          is kept per person: a mailbox a teammate shared with
                          you shows the warmup you started on it.
                        properties:
                          status:
                            type: string
                            enum:
                              - new
                              - warming
                              - warmed
                              - paused
                              - issue
                            description: >-
                              `new`: never started. `warming`: running, under 21
                              active days. `warmed`: running for 21 active days
                              or more. `paused`. `issue`: the warmup service
                              lost its connection to the mailbox; POST
                              /business/accounts/email/{accountId}/warmup/start
                              sets it up again.
                          startedAt:
                            type:
                              - string
                              - 'null'
                            description: >-
                              When warmup first started on the mailbox (ISO
                              8601).
                          daysActive:
                            type:
                              - integer
                              - 'null'
                            description: >-
                              Days the warmup has run, paused days left out;
                              refreshed daily.
                          last7Days:
                            type:
                              - object
                              - 'null'
                            description: >-
                              Warmup emails over the last 7 days, refreshed
                              daily: `sent` counts the mailbox's warmup emails
                              and replies, `inbox` and `spam` where they landed.
                            properties:
                              sent:
                                type: integer
                              inbox:
                                type: integer
                              spam:
                                type: integer
                            required:
                              - sent
                              - inbox
                              - spam
                          dnsGrade:
                            type:
                              - string
                              - 'null'
                            description: >-
                              The mailbox domain's DNS grade, A to F, from the
                              warmup service's health score; refreshed daily.
                        required:
                          - status
                          - startedAt
                          - daysActive
                          - last7Days
                          - dnsGrade
                    required:
                      - id
                      - emailAddress
                      - name
                      - provider
                      - isActive
                      - isConnected
                      - dailyCapacity
                      - availableCapacity
                      - needsReauthAt
                      - needsReauthReason
                      - warmup
                required:
                  - channel
                  - account
              example:
                channel: email
                account:
                  id: outreach@brightpay.com
                  emailAddress: outreach@brightpay.com
                  name: BrightPay Outreach
                  provider: smtp
                  isActive: true
                  isConnected: true
                  dailyCapacity: 15
                  availableCapacity: 15
                  needsReauthAt: null
                  needsReauthReason: null
                  warmup:
                    status: new
                    startedAt: null
                    daysActive: null
                    last7Days: null
                    dnsGrade: null
        '400':
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '402':
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - basicAuth: []
components:
  schemas:
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
            param:
              type:
                - string
                - 'null'
            doc_url:
              type:
                - string
                - 'null'
            request_id:
              type:
                - string
                - 'null'
          required:
            - code
            - message
      required:
        - error
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
      description: >-
        Your API token (`af_…`) as the Basic-auth username, with an empty
        password.

````

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