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

# Connect a mailbox over SMTP

> Logs in to the SMTP server first (no email is sent) and only saves the mailbox if the login works. If the email already exists in the workspace it is overwritten with the new credentials and set active; otherwise a new SMTP mailbox is created with warmup pool off. Refuses: invalid email, missing host or password, failed login (flash with the reason). Also verifies an IMAP login (default: same host, 993 SSL, same credentials) and refuses to save if it fails.

**Minimum role:** `edit` (`x-min-role`). **Destructive:** `false` (`x-destructive`).



## OpenAPI

````yaml /openapi.json post /mailboxes/connect-smtp
openapi: 3.0.3
info:
  title: Sales Sequencer API
  version: '1'
  description: >-
    Every Sales Sequencer action over HTTP. Each call runs as the API key's
    creator, with that user's role, in the key's workspace. Auth: X-API-Key
    header.
servers:
  - url: https://api.salessequencer.com/api/v1
security:
  - key: []
paths:
  /mailboxes/connect-smtp:
    post:
      tags:
        - Mailboxes
      summary: Connect a mailbox over SMTP
      description: >-
        Logs in to the SMTP server first (no email is sent) and only saves the
        mailbox if the login works. If the email already exists in the workspace
        it is overwritten with the new credentials and set active; otherwise a
        new SMTP mailbox is created with warmup pool off. Refuses: invalid
        email, missing host or password, failed login (flash with the reason).
        Also verifies an IMAP login (default: same host, 993 SSL, same
        credentials) and refuses to save if it fails.


        **Minimum role:** `edit` (`x-min-role`). **Destructive:** `false`
        (`x-destructive`).
      operationId: mailboxes_connect_smtp
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              properties:
                email:
                  description: Mailbox address (lowercased).
                  type: string
                first_name:
                  description: Sender first name.
                  type: string
                imap_host:
                  description: 'IMAP host for replies/bounces. Default: the SMTP host.'
                  type: string
                imap_password:
                  description: 'IMAP password. Default: the SMTP password.'
                  type: string
                imap_port:
                  description: IMAP port. Default 993.
                  type: integer
                imap_security:
                  description: ssl, starttls or none. Default ssl.
                  type: string
                imap_username:
                  description: 'IMAP login. Default: the SMTP login.'
                  type: string
                last_name:
                  description: Sender last name.
                  type: string
                smtp_host:
                  description: SMTP server host.
                  type: string
                smtp_password:
                  description: SMTP password (stored encrypted).
                  type: string
                smtp_port:
                  description: Port. Default 587.
                  type: integer
                smtp_security:
                  description: >-
                    ssl, starttls or none. Default starttls; anything else
                    becomes starttls.
                  type: string
                smtp_username:
                  description: Login name. Defaults to the email.
                  type: string
              required:
                - email
                - smtp_host
                - smtp_password
              type: object
      responses:
        '200':
          description: >-
            Redirect to the mailbox list; flash 'Connected <email> over SMTP.'
            or 'Reconnected ...'.
components:
  securitySchemes:
    key:
      in: header
      name: X-API-Key
      type: apiKey

````

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