Live Direct Marketing Email Accounts API

The Email Accounts API from Live Direct Marketing — 34 operation(s) for email accounts.

Operations 40

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

GET /api/email-accounts/lookup Look up SMTP/IMAP settings for an address · Look up provider SMTP/IMAP settings for an email address #
Ask an LLM
“What SMTP and IMAP server settings should I use for a given email address?”
“Can the platform detect the mail host and ports for an address before I add the mailbox?”
Tell an agent
Look up the SMTP and IMAP settings for {email}.
Find which mail provider hosts {email} and its server ports.
POST /api/email-accounts/test-unsaved Test mailbox credentials before saving · Test SMTP/IMAP credentials without saving the account #
Ask an LLM
“Can I check SMTP and IMAP credentials work before I save a new mailbox?”
“Is there a way to dry-run a login to a mail server without creating the account?”
Tell an agent
Test these SMTP/IMAP credentials without saving the mailbox.
Check that the unsaved mailbox login details connect before I add it.
GET /api/email-accounts List sending email accounts · List email accounts with filters and pagination #
Ask an LLM
“Which email accounts do I have connected for sending?”
“Can I filter my mailboxes by status, service or send method?”
Tell an agent
List my email accounts with status {status}.
Show the mailboxes in account list {listId}.
POST /api/email-accounts Add a new email account · Create a new email account. #
Ask an LLM
“How do I add a new mailbox for sending campaigns?”
“Can I set daily and hourly send limits when I connect a new email account?”
Tell an agent
Add a new email account for {email} with SMTP host {smtpHost}.
Connect mailbox {email} with a daily send limit of {dailySendLimit}.
GET /api/email-accounts/stats Get totals across all email accounts · Get aggregated stats across all email accounts #
Ask an LLM
“What are the aggregated stats across all my email accounts?”
“How many mailboxes do I have in total and in what state?”
Tell an agent
Show aggregate statistics across all my email accounts.
Summarize my whole mailbox fleet in one set of numbers.
GET /api/email-accounts/check-duplicate Check if an email address is already added · Check if an email address is already registered #
Ask an LLM
“Is this email address already registered as a mailbox?”
“Can I check for a duplicate before adding an account?”
Tell an agent
Check whether {email} is already registered as an email account.
Tell me if {email} would be a duplicate mailbox.
GET /api/email-accounts/relay-health-summary Summarize relay health across the tenant · Relay health across the whole tenant (#337): how many relays are sending right… #
Ask an LLM
“How many of my relays are sending right now and how many dropped out?”
“Why did relays drop out of sending, such as bounce limits or auth errors?”
Tell an agent
Give me the tenant-wide relay health summary.
Show how many relays are active and the reasons the others dropped out.
GET /api/email-accounts/relay-health/attention List relays that need a human to fix · Relays that automation can no longer recover (#356): status=ERROR relays where… #
Ask an LLM
“Which relays has automation given up recovering?”
“What relays in error state need manual attention, and why did probing fail?”
Tell an agent
List the relays escalated for human attention.
Show the error relays that repeated re-probing could not recover.
POST /api/email-accounts/relay-health/probe Re-probe failed relays now · Re-probe ERROR relays of this tenant right now (#356) instead of waiting for… #
Ask an LLM
“Can I re-check my errored relays now instead of waiting for the scheduled cron?”
“Does re-probing failed relays send a test email?”
Tell an agent
Re-probe all my errored relays right now.
Run the relay recovery probe immediately and tell me how many came back into the pool.
GET /api/email-accounts/{id}/stats Get sending stats for one email account · Get per-account email statistics #
Ask an LLM
“How many emails has one specific mailbox sent?”
“Where can I see per-account email statistics?”
Tell an agent
Show email statistics for account {id}.
Get the per-mailbox send stats for {id}.
GET /api/email-accounts/{id} Get an email account's details · Get an email account by id #
Ask an LLM
“What settings does a particular email account have configured?”
“Can I fetch a single mailbox record by its id?”
Tell an agent
Get email account {id}.
Show the configuration of mailbox {id}.
PATCH /api/email-accounts/{id} Update an email account · Update an email account. #
Ask an LLM
“Can I change the settings of a mailbox I already added?”
“Why can't I set an errored or suspended account to paused?”
Tell an agent
Update the settings of email account {id}.
Edit mailbox {id} I already connected.
DELETE /api/email-accounts/{id} Delete an email account · Delete an email account #
Ask an LLM
“How do I remove a mailbox I no longer use?”
“Can I permanently delete an email account from my workspace?”
Tell an agent destructive · confirm first
Delete email account {id}.
Remove mailbox {id} from my accounts.
POST /api/email-accounts/import-oauth Import one Outlook account from an OAuth combo · Import an Outlook/Hotmail account from an OAuth combo… #
Ask an LLM
“Can I import a single Outlook or Hotmail account using a refresh token combo?”
“Does the platform refresh the Outlook access token itself after import?”
Tell an agent
Import the Outlook account from combo {combo}.
Add Hotmail account {email} using refresh token {refreshToken} and client id {clientId}.
POST /api/email-accounts/import-oauth/bulk Bulk-import Outlook accounts from OAuth combos · Bulk-import Outlook/Hotmail accounts from OAuth combo strings (one per array… #
Ask an LLM
“How do I import many Outlook or Hotmail accounts at once?”
“Can I put a batch of imported OAuth mailboxes straight into one list?”
Tell an agent
Bulk-import these Outlook combos: {combos}.
Import the OAuth combo list {combos} into account list {listId}.
POST /api/email-accounts/{id}/fetch-imap Fetch new mail over IMAP for an account · Trigger an IMAP fetch for an account (queue or fast-lane) #
Ask an LLM
“Can I pull new messages for a mailbox right now instead of waiting?”
“How do I trigger an IMAP fetch on one account?”
Tell an agent
Trigger an IMAP fetch for account {id}.
Pull the latest inbox messages for mailbox {id} now.
POST /api/email-accounts/{id}/test Test a saved account's SMTP/IMAP connection · Test SMTP and/or IMAP connectivity for an account #
Ask an LLM
“Is my saved mailbox still able to connect to its SMTP and IMAP servers?”
“Can I run a basic connectivity check on an existing account?”
Tell an agent
Test SMTP and IMAP connectivity for saved account {id}.
Check whether mailbox {id} can still reach its mail servers.
POST /api/email-accounts/{id}/test-receive Run the universal receive test on an account · Universal Receive Test (#4). #
Ask an LLM
“Can this mailbox actually receive mail through its real transport?”
“Which receive path, such as Graph or IMAP via agent, does my account use and does it work?”
Tell an agent
Run the receive test on account {id}.
Probe the real inbound transport for mailbox {id}.
POST /api/email-accounts/{id}/test-send Run the universal send test on an account · Universal Send Test (#5). #
Ask an LLM
“Will this mailbox be able to send through its real transport?”
“Can I dry-run the send path of an account without mailing anyone?”
Tell an agent
Run the send test on account {id}.
Dry-run the outbound transport for mailbox {id}.
GET /api/email-accounts/{id}/dns-check Check DNS health of an account's domain · Run DNS health check for the account domain #
Ask an LLM
“Are the DNS records for my mailbox's domain set up correctly?”
“Can I check SPF and other DNS health for the domain an account sends from?”
Tell an agent
Run a DNS health check for account {id}.
Check the sending domain DNS of mailbox {id}.
POST /api/email-accounts/{id}/reset-counters Reset an account's daily send counters · Reset daily send counters for an account #
Ask an LLM
“Can I reset the daily send count on a mailbox that hit its limit?”
“How do I zero out today's sending counters for one account?”
Tell an agent
Reset the daily send counters for account {id}.
Clear today's send count on mailbox {id}.
POST /api/email-accounts/{id}/warmup/start Start warm-up for a mailbox · Start mailbox warm-up for an account #
Ask an LLM
“How do I begin warming up a new mailbox?”
“Can I turn on warm-up for one email account?”
Tell an agent
Start warm-up for account {id}.
Begin warming up mailbox {id}.
POST /api/email-accounts/{id}/warmup/stop Stop warm-up for a mailbox · Stop mailbox warm-up for an account #
Ask an LLM
“Can I halt warm-up on a mailbox that is already warming?”
“What turns off warm-up for one account?”
Tell an agent
Stop warm-up for account {id}.
End the warm-up running on mailbox {id}.
GET /api/email-accounts/{id}/warmup Get warm-up stats for a mailbox · Get mailbox warm-up stats for an account #
Ask an LLM
“How is the warm-up progressing on my mailbox?”
“Where can I see warm-up statistics for one account?”
Tell an agent
Show warm-up stats for account {id}.
Get the warm-up progress of mailbox {id}.
PATCH /api/email-accounts/{id}/warmup Configure warm-up settings for a mailbox · Configure mailbox warm-up parameters #
Ask an LLM
“Can I change the warm-up parameters for a mailbox?”
“How do I tune warm-up settings on one account?”
Tell an agent
Change the warm-up configuration of account {id}.
Adjust warm-up parameters for mailbox {id}.
POST /api/email-accounts/{id}/suspend Suspend an email account · Suspend an email account #
Ask an LLM
“Can I suspend a mailbox so it stops sending?”
“What happens when I suspend an email account?”
Tell an agent
Suspend email account {id}.
Put mailbox {id} into suspended state.
POST /api/email-accounts/{id}/unsuspend Unsuspend an email account · Unsuspend an email account #
Ask an LLM
“How do I bring a suspended mailbox back into service?”
“Can I lift the suspension on an account?”
Tell an agent
Unsuspend email account {id}.
Reactivate suspended mailbox {id}.
PATCH /api/email-accounts/{id}/work-status Set an account's work status to idle or in progress · Update the work status (IDLE / IN_PROGRESS) of an account #
Ask an LLM
“Can I mark a mailbox as in progress or idle?”
“How do I flag that someone is currently working an account?”
Tell an agent
Set the work status of account {id} to in progress.
Mark mailbox {id} as idle.
POST /api/email-accounts/{id}/gas/setup Generate Google Apps Script setup steps · Generate GAS setup instructions for the account #
Ask an LLM
“How do I set up a Google Apps Script web app for a Gmail account?”
“Can the platform generate GAS setup instructions for my mailbox?”
Tell an agent
Generate GAS setup instructions for account {id}.
Give me the Apps Script setup steps for mailbox {id}.
POST /api/email-accounts/{id}/gas/verify Verify a deployed Apps Script web app URL · Verify a deployed GAS web app URL for the account #
Ask an LLM
“Can I confirm my deployed Apps Script web app URL is correct?”
“What checks my GAS deployment after I publish it?”
Tell an agent
Verify the deployed GAS web app for account {id}.
Validate the Apps Script URL I deployed for mailbox {id}.
POST /api/email-accounts/{id}/gas/ping Ping an account's Apps Script web app · Ping the GAS web app to verify connectivity #
Ask an LLM
“Is my Apps Script web app still reachable?”
“Can I ping the GAS endpoint to check connectivity?”
Tell an agent
Ping the GAS web app of account {id}.
Check that the Apps Script endpoint for mailbox {id} responds.
POST /api/email-accounts/{id}/gas/test-send Send a test email through Apps Script · Send a test email via GAS #
Ask an LLM
“Can I send a real test email through the Apps Script integration?”
“Does sending via GAS work for my Gmail account?”
Tell an agent
Send a test email via GAS from account {id}.
Mail a test message through the Apps Script of mailbox {id}.
POST /api/email-accounts/{id}/gas/test-fetch Run a test inbox fetch through Apps Script · Run a test fetch via GAS #
Ask an LLM
“Can the Apps Script integration fetch messages from my inbox?”
“How do I test reading mail through GAS?”
Tell an agent
Run a test fetch via GAS for account {id}.
Try pulling inbox mail through the Apps Script of mailbox {id}.
PATCH /api/email-accounts/{id}/gas/disable Disable the Apps Script integration · Disable GAS integration for an account #
Ask an LLM
“How do I turn off the Google Apps Script integration on a mailbox?”
“Can I stop an account from using GAS?”
Tell an agent destructive · confirm first
Disable the GAS integration for account {id}.
Switch off Apps Script on mailbox {id}.
GET /api/email-accounts/{id}/gas/labels List Gmail labels via Apps Script · List Gmail labels available via GAS #
Ask an LLM
“Which Gmail labels can the Apps Script integration see?”
“Can I list a Gmail account's labels through GAS?”
Tell an agent
List the Gmail labels for account {id}.
Show the labels available through Apps Script on mailbox {id}.
GET /api/email-account-lists List email account lists · List email account lists #
Ask an LLM
“What lists or pools have I grouped my mailboxes into?”
“Can I see all my email account lists?”
Tell an agent
List my email account lists.
Show every mailbox group I've created.
POST /api/email-account-lists Create an email account list · Create an email account list #
Ask an LLM
“How do I create a new group to organize my mailboxes?”
“Can I make a new relay pool list for accounts?”
Tell an agent
Create a new email account list.
Make a new mailbox group for my accounts.
PATCH /api/email-account-lists/{id} Update an email account list · Update an email account list #
Ask an LLM
“Can I rename or edit an existing mailbox group?”
“How do I change the settings of an email account list?”
Tell an agent
Update email account list {id}.
Edit mailbox group {id}.
DELETE /api/email-account-lists/{id} Delete an email account list · Delete an email account list #
Ask an LLM
“Can I delete a mailbox group I no longer need?”
“What happens when I remove an email account list?”
Tell an agent destructive · confirm first
Delete email account list {id}.
Remove mailbox group {id}.
GET /api/email-account-lists/{id}/relay-health Check health of one relay pool · Relay pool health (#40) for an email-account-list / relay-pool id (not an… #
Ask an LLM
“Which accounts in a relay pool are eligible to send right now?”
“Is my relay pool starving, and which relay goes next?”
Tell an agent
Show relay pool health for list {id}.
Check eligibility and recent dispatches in relay pool {id}.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/live-direct-marketing-online:live-direct-marketing-online-email-accounts-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

live-direct-marketing-online-email-accounts-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: LDM v3 Email Accounts API
  description: 'Multi-tenant B2B outreach automation platform. Auth: JWT Bearer (15-min) or tenant API key (ldm_*) managed in CRM Settings → API Keys. All tenant-scoped endpoints require the X-Tenant-Id header.'
  version: 1.0.0
  contact: {}
servers:
- url: https://api.live-direct-marketing.online
  description: Production
- url: https://api.dev.live-direct-marketing.online
  description: Development
- url: http://127.0.0.1:3000
  description: Local
tags:
- name: Email Accounts
paths:
  /api/email-accounts/lookup:
    get:
      operationId: EmailAccountsController_lookupProvider
      parameters:
      - name: email
        required: true
        in: query
        schema:
          type: string
      - name: X-Tenant-Id
        in: header
        required: false
        schema:
          type: string
          format: uuid
        description: Tenant UUID — required for all tenant-scoped endpoints
      responses:
        '200':
          description: ''
      security:
      - jwt: []
      summary: Look up provider SMTP/IMAP settings for an email address
      tags:
      - Email Accounts
      x-required-scope:
      - accounts:read
  /api/email-accounts/test-unsaved:
    post:
      operationId: EmailAccountsController_testUnsaved
      parameters:
      - name: X-Tenant-Id
        in: header
        required: false
        schema:
          type: string
          format: uuid
        description: Tenant UUID — required for all tenant-scoped endpoints
      responses:
        '201':
          description: ''
      security:
      - jwt: []
      summary: Test SMTP/IMAP credentials without saving the account
      tags:
      - Email Accounts
      x-required-scope:
      - accounts:write
  /api/email-accounts:
    get:
      operationId: EmailAccountsController_findAll
      parameters:
      - name: page
        required: true
        in: query
        schema:
          type: string
      - name: pageSize
        required: true
        in: query
        schema:
          type: string
      - name: listId
        required: true
        in: query
        schema:
          type: string
      - name: status
        required: true
        in: query
        schema:
          type: string
      - name: service
        required: true
        in: query
        schema:
          type: string
      - name: type
        required: true
        in: query
        schema:
          type: string
      - name: sendMethod
        required: true
        in: query
        schema:
          type: string
      - name: imapMode
        required: true
        in: query
        schema:
          type: string
      - name: search
        required: true
        in: query
        schema:
          type: string
      - name: X-Tenant-Id
        in: header
        required: false
        schema:
          type: string
          format: uuid
        description: Tenant UUID — required for all tenant-scoped endpoints
      responses:
        '200':
          description: ''
      security:
      - jwt: []
      summary: List email accounts with filters and pagination
      tags:
      - Email Accounts
      x-required-scope:
      - accounts:read
    post:
      operationId: EmailAccountsController_create
      parameters:
      - name: X-Tenant-Id
        in: header
        required: false
        schema:
          type: string
          format: uuid
        description: Tenant UUID — required for all tenant-scoped endpoints
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateEmailAccountDto'
      responses:
        '201':
          description: ''
      security:
      - jwt: []
      summary: Create a new email account.
      tags:
      - Email Accounts
      x-required-scope:
      - accounts:write
  /api/email-accounts/stats:
    get:
      operationId: EmailAccountsController_getStats
      parameters:
      - name: X-Tenant-Id
        in: header
        required: false
        schema:
          type: string
          format: uuid
        description: Tenant UUID — required for all tenant-scoped endpoints
      responses:
        '200':
          description: ''
      security:
      - jwt: []
      summary: Get aggregated stats across all email accounts
      tags:
      - Email Accounts
      x-required-scope:
      - accounts:read
  /api/email-accounts/check-duplicate:
    get:
      operationId: EmailAccountsController_checkDuplicate
      parameters:
      - name: email
        required: true
        in: query
        schema:
          type: string
      - name: X-Tenant-Id
        in: header
        required: false
        schema:
          type: string
          format: uuid
        description: Tenant UUID — required for all tenant-scoped endpoints
      responses:
        '200':
          description: ''
      security:
      - jwt: []
      summary: Check if an email address is already registered
      tags:
      - Email Accounts
      x-required-scope:
      - accounts:read
  /api/email-accounts/relay-health-summary:
    get:
      operationId: EmailAccountsController_relayHealthSummary
      parameters:
      - name: X-Tenant-Id
        in: header
        required: false
        schema:
          type: string
          format: uuid
        description: Tenant UUID — required for all tenant-scoped endpoints
      responses:
        '200':
          description: ''
      security:
      - jwt: []
      summary: 'Relay health across the whole tenant (#337): how many relays are sending right…'
      tags:
      - Email Accounts
      x-required-scope:
      - accounts:read
  /api/email-accounts/relay-health/attention:
    get:
      operationId: EmailAccountsController_relayAttention
      parameters:
      - name: X-Tenant-Id
        in: header
        required: false
        schema:
          type: string
          format: uuid
        description: Tenant UUID — required for all tenant-scoped endpoints
      responses:
        '200':
          description: ''
      security:
      - jwt: []
      summary: 'Relays that automation can no longer recover (#356): status=ERROR relays where…'
      tags:
      - Email Accounts
      x-required-scope:
      - accounts:read
  /api/email-accounts/relay-health/probe:
    post:
      operationId: EmailAccountsController_relayProbe
      parameters:
      - name: X-Tenant-Id
        in: header
        required: false
        schema:
          type: string
          format: uuid
        description: Tenant UUID — required for all tenant-scoped endpoints
      responses:
        '201':
          description: ''
      security:
      - jwt: []
      summary: Re-probe ERROR relays of this tenant right now (#356) instead of waiting for…
      tags:
      - Email Accounts
      x-required-scope:
      - accounts:write
  /api/email-accounts/{id}/stats:
    get:
      operationId: EmailAccountsController_getAccountStats
      parameters:
      - name: id
        required: true
        in: path
        schema:
          type: string
      - name: X-Tenant-Id
        in: header
        required: false
        schema:
          type: string
          format: uuid
        description: Tenant UUID — required for all tenant-scoped endpoints
      responses:
        '200':
          description: ''
      security:
      - jwt: []
      summary: Get per-account email statistics
      tags:
      - Email Accounts
  /api/email-accounts/{id}:
    get:
      operationId: EmailAccountsController_findById
      parameters:
      - name: id
        required: true
        in: path
        schema:
          type: string
      - name: X-Tenant-Id
        in: header
        required: false
        schema:
          type: string
          format: uuid
        description: Tenant UUID — required for all tenant-scoped endpoints
      responses:
        '200':
          description: ''
      security:
      - jwt: []
      summary: Get an email account by id
      tags:
      - Email Accounts
    patch:
      operationId: EmailAccountsController_update
      parameters:
      - name: id
        required: true
        in: path
        schema:
          type: string
      - name: X-Tenant-Id
        in: header
        required: false
        schema:
          type: string
          format: uuid
        description: Tenant UUID — required for all tenant-scoped endpoints
      responses:
        '200':
          description: ''
      security:
      - jwt: []
      summary: Update an email account.
      tags:
      - Email Accounts
    delete:
      operationId: EmailAccountsController_remove
      parameters:
      - name: id
        required: true
        in: path
        schema:
          type: string
      - name: X-Tenant-Id
        in: header
        required: false
        schema:
          type: string
          format: uuid
        description: Tenant UUID — required for all tenant-scoped endpoints
      responses:
        '200':
          description: ''
      security:
      - jwt: []
      summary: Delete an email account
      tags:
      - Email Accounts
  /api/email-accounts/import-oauth:
    post:
      operationId: EmailAccountsController_importOauth
      parameters:
      - name: X-Tenant-Id
        in: header
        required: false
        schema:
          type: string
          format: uuid
        description: Tenant UUID — required for all tenant-scoped endpoints
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ImportOauthDto'
      responses:
        '201':
          description: ''
      security:
      - jwt: []
      summary: Import an Outlook/Hotmail account from an OAuth combo…
      tags:
      - Email Accounts
      x-required-scope:
      - accounts:write
  /api/email-accounts/import-oauth/bulk:
    post:
      operationId: EmailAccountsController_importOauthBulk
      parameters:
      - name: X-Tenant-Id
        in: header
        required: false
        schema:
          type: string
          format: uuid
        description: Tenant UUID — required for all tenant-scoped endpoints
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ImportOauthBulkDto'
      responses:
        '201':
          description: ''
      security:
      - jwt: []
      summary: Bulk-import Outlook/Hotmail accounts from OAuth combo strings (one per array…
      tags:
      - Email Accounts
      x-required-scope:
      - accounts:write
  /api/email-accounts/{id}/fetch-imap:
    post:
      operationId: EmailAccountsController_fetchImap
      parameters:
      - name: id
        required: true
        in: path
        schema:
          type: string
      - name: X-Tenant-Id
        in: header
        required: false
        schema:
          type: string
          format: uuid
        description: Tenant UUID — required for all tenant-scoped endpoints
      responses:
        '201':
          description: ''
      security:
      - jwt: []
      summary: Trigger an IMAP fetch for an account (queue or fast-lane)
      tags:
      - Email Accounts
  /api/email-accounts/{id}/test:
    post:
      operationId: EmailAccountsController_testConnection
      parameters:
      - name: id
        required: true
        in: path
        schema:
          type: string
      - name: X-Tenant-Id
        in: header
        required: false
        schema:
          type: string
          format: uuid
        description: Tenant UUID — required for all tenant-scoped endpoints
      responses:
        '201':
          description: ''
      security:
      - jwt: []
      summary: Test SMTP and/or IMAP connectivity for an account
      tags:
      - Email Accounts
  /api/email-accounts/{id}/test-receive:
    post:
      operationId: EmailAccountsController_testReceive
      parameters:
      - name: id
        required: true
        in: path
        schema:
          type: string
      - name: X-Tenant-Id
        in: header
        required: false
        schema:
          type: string
          format: uuid
        description: Tenant UUID — required for all tenant-scoped endpoints
      responses:
        '201':
          description: ''
      security:
      - jwt: []
      summary: Universal Receive Test (#4).
      tags:
      - Email Accounts
  /api/email-accounts/{id}/test-send:
    post:
      operationId: EmailAccountsController_testSend
      parameters:
      - name: id
        required: true
        in: path
        schema:
          type: string
      - name: X-Tenant-Id
        in: header
        required: false
        schema:
          type: string
          format: uuid
        description: Tenant UUID — required for all tenant-scoped endpoints
      responses:
        '201':
          description: ''
      security:
      - jwt: []
      summary: Universal Send Test (#5).
      tags:
      - Email Accounts
  /api/email-accounts/{id}/dns-check:
    get:
      operationId: EmailAccountsController_checkDns
      parameters:
      - name: id
        required: true
        in: path
        schema:
          type: string
      - name: X-Tenant-Id
        in: header
        required: false
        schema:
          type: string
          format: uuid
        description: Tenant UUID — required for all tenant-scoped endpoints
      responses:
        '200':
          description: ''
      security:
      - jwt: []
      summary: Run DNS health check for the account domain
      tags:
      - Email Accounts
  /api/email-accounts/{id}/reset-counters:
    post:
      operationId: EmailAccountsController_resetCounters
      parameters:
      - name: id
        required: true
        in: path
        schema:
          type: string
      - name: X-Tenant-Id
        in: header
        required: false
        schema:
          type: string
          format: uuid
        description: Tenant UUID — required for all tenant-scoped endpoints
      responses:
        '201':
          description: ''
      security:
      - jwt: []
      summary: Reset daily send counters for an account
      tags:
      - Email Accounts
  /api/email-accounts/{id}/warmup/start:
    post:
      operationId: EmailAccountsController_warmupStart
      parameters:
      - name: id
        required: true
        in: path
        schema:
          type: string
      - name: X-Tenant-Id
        in: header
        required: false
        schema:
          type: string
          format: uuid
        description: Tenant UUID — required for all tenant-scoped endpoints
      responses:
        '201':
          description: ''
      security:
      - jwt: []
      summary: Start mailbox warm-up for an account
      tags:
      - Email Accounts
  /api/email-accounts/{id}/warmup/stop:
    post:
      operationId: EmailAccountsController_warmupStop
      parameters:
      - name: id
        required: true
        in: path
        schema:
          type: string
      - name: X-Tenant-Id
        in: header
        required: false
        schema:
          type: string
          format: uuid
        description: Tenant UUID — required for all tenant-scoped endpoints
      responses:
        '201':
          description: ''
      security:
      - jwt: []
      summary: Stop mailbox warm-up for an account
      tags:
      - Email Accounts
  /api/email-accounts/{id}/warmup:
    get:
      operationId: EmailAccountsController_warmupStats
      parameters:
      - name: id
        required: true
        in: path
        schema:
          type: string
      - name: X-Tenant-Id
        in: header
        required: false
        schema:
          type: string
          format: uuid
        description: Tenant UUID — required for all tenant-scoped endpoints
      responses:
        '200':
          description: ''
      security:
      - jwt: []
      summary: Get mailbox warm-up stats for an account
      tags:
      - Email Accounts
    patch:
      operationId: EmailAccountsController_warmupConfigure
      parameters:
      - name: id
        required: true
        in: path
        schema:
          type: string
      - name: X-Tenant-Id
        in: header
        required: false
        schema:
          type: string
          format: uuid
        description: Tenant UUID — required for all tenant-scoped endpoints
      responses:
        '200':
          description: ''
      security:
      - jwt: []
      summary: Configure mailbox warm-up parameters
      tags:
      - Email Accounts
  /api/email-accounts/{id}/suspend:
    post:
      operationId: EmailAccountsController_suspend
      parameters:
      - name: id
        required: true
        in: path
        schema:
          type: string
      - name: X-Tenant-Id
        in: header
        required: false
        schema:
          type: string
          format: uuid
        description: Tenant UUID — required for all tenant-scoped endpoints
      responses:
        '201':
          description: ''
      security:
      - jwt: []
      summary: Suspend an email account
      tags:
      - Email Accounts
  /api/email-accounts/{id}/unsuspend:
    post:
      operationId: EmailAccountsController_unsuspend
      parameters:
      - name: id
        required: true
        in: path
        schema:
          type: string
      - name: X-Tenant-Id
        in: header
        required: false
        schema:
          type: string
          format: uuid
        description: Tenant UUID — required for all tenant-scoped endpoints
      responses:
        '201':
          description: ''
      security:
      - jwt: []
      summary: Unsuspend an email account
      tags:
      - Email Accounts
  /api/email-accounts/{id}/work-status:
    patch:
      operationId: EmailAccountsController_updateWorkStatus
      parameters:
      - name: id
        required: true
        in: path
        schema:
          type: string
      - name: X-Tenant-Id
        in: header
        required: false
        schema:
          type: string
          format: uuid
        description: Tenant UUID — required for all tenant-scoped endpoints
      responses:
        '200':
          description: ''
      security:
      - jwt: []
      summary: Update the work status (IDLE / IN_PROGRESS) of an account
      tags:
      - Email Accounts
  /api/email-accounts/{id}/gas/setup:
    post:
      operationId: EmailAccountsController_gasSetup
      parameters:
      - name: id
        required: true
        in: path
        schema:
          type: string
      - name: X-Tenant-Id
        in: header
        required: false
        schema:
          type: string
          format: uuid
        description: Tenant UUID — required for all tenant-scoped endpoints
      responses:
        '201':
          description: ''
      security:
      - jwt: []
      summary: Generate GAS setup instructions for the account
      tags:
      - Email Accounts
  /api/email-accounts/{id}/gas/verify:
    post:
      operationId: EmailAccountsController_gasVerify
      parameters:
      - name: id
        required: true
        in: path
        schema:
          type: string
      - name: X-Tenant-Id
        in: header
        required: false
        schema:
          type: string
          format: uuid
        description: Tenant UUID — required for all tenant-scoped endpoints
      responses:
        '201':
          description: ''
      security:
      - jwt: []
      summary: Verify a deployed GAS web app URL for the account
      tags:
      - Email Accounts
  /api/email-accounts/{id}/gas/ping:
    post:
      operationId: EmailAccountsController_gasPing
      parameters:
      - name: id
        required: true
        in: path
        schema:
          type: string
      - name: X-Tenant-Id
        in: header
        required: false
        schema:
          type: string
          format: uuid
        description: Tenant UUID — required for all tenant-scoped endpoints
      responses:
        '201':
          description: ''
      security:
      - jwt: []
      summary: Ping the GAS web app to verify connectivity
      tags:
      - Email Accounts
  /api/email-accounts/{id}/gas/test-send:
    post:
      operationId: EmailAccountsController_gasTestSend
      parameters:
      - name: id
        required: true
        in: path
        schema:
          type: string
      - name: X-Tenant-Id
        in: header
        required: false
        schema:
          type: string
          format: uuid
        description: Tenant UUID — required for all tenant-scoped endpoints
      responses:
        '201':
          description: ''
      security:
      - jwt: []
      summary: Send a test email via GAS
      tags:
      - Email Accounts
  /api/email-accounts/{id}/gas/test-fetch:
    post:
      operationId: EmailAccountsController_gasTestFetch
      parameters:
      - name: id
        required: true
        in: path
        schema:
          type: string
      - name: X-Tenant-Id
        in: header
        required: false
        schema:
          type: string
          format: uuid
        description: Tenant UUID — required for all tenant-scoped endpoints
      responses:
        '201':
          description: ''
      security:
      - jwt: []
      summary: Run a test fetch via GAS
      tags:
      - Email Accounts
  /api/email-accounts/{id}/gas/disable:
    patch:
      operationId: EmailAccountsController_gasDisable
      parameters:
      - name: id
        required: true
        in: path
        schema:
          type: string
      - name: X-Tenant-Id
        in: header
        required: false
        schema:
          type: string
          format: uuid
        description: Tenant UUID — required for all tenant-scoped endpoints
      responses:
        '200':
          description: ''
      security:
      - jwt: []
      summary: Disable GAS integration for an account
      tags:
      - Email Accounts
  /api/email-accounts/{id}/gas/labels:
    get:
      operationId: EmailAccountsController_gasLabels
      parameters:
      - name: id
        required: true
        in: path
        schema:
          type: string
      - name: X-Tenant-Id
        in: header
        required: false
        schema:
          type: string
          format: uuid
        description: Tenant UUID — required for all tenant-scoped endpoints
      responses:
        '200':
          description: ''
      security:
      - jwt: []
      summary: List Gmail labels available via GAS
      tags:
      - Email Accounts
  /api/email-account-lists:
    get:
      operationId: EmailAccountsController_findAllLists
      parameters:
      - name: X-Tenant-Id
        in: header
        required: false
        schema:
          type: string
          format: uuid
        description: Tenant UUID — required for all tenant-scoped endpoints
      responses:
        '200':
          description: ''
      security:
      - jwt: []
      summary: List email account lists
      tags:
      - Email Accounts
      x-required-scope:
      - accounts:read
    post:
      operationId: EmailAccountsController_createList
      parameters:
      - name: X-Tenant-Id
        in: header
        required: false
        schema:
          type: string
          format: uuid
        description: Tenant UUID — required for all tenant-scoped endpoints
      responses:
        '201':
          description: ''
      security:
      - jwt: []
      summary: Create an email account list
      tags:
      - Email Accounts
      x-required-scope:
      - accounts:write
  /api/email-account-lists/{id}:
    patch:
      operationId: EmailAccountsController_updateList
      parameters:
      - name: id
        required: true
        in: path
        schema:
          type: string
      - name: X-Tenant-Id
        in: header
        required: false
        schema:
          type: string
          format: uuid
        description: Tenant UUID — required for all tenant-scoped endpoints
      responses:
        '200':
          description: ''
      security:
      - jwt: []
      summary: Update an email account list
      tags:
      - Email Accounts
    delete:
      operationId: EmailAccountsController_removeList
      parameters:
      - name: id
        required: true
        in: path
        schema:
          type: string
      - name: X-Tenant-Id
        in: header
        required: false
        schema:
          type: string
          format: uuid
        description: Tenant UUID — required for all tenant-scoped endpoints
      responses:
        '200':
          description: ''
      security:
      - jwt: []
      summary: Delete an email account list
      tags:
      - Email Accounts
  /api/email-account-lists/{id}/relay-health:
    get:
      operationId: EmailAccountsController_relayHealth
      parameters:
      - name: id
        required: true
        in: path
        schema:
          type: string
      - name: X-Tenant-Id
        in: header
        required: false
        schema:
          type: string
          format: uuid
        description: Tenant UUID — required for all tenant-scoped endpoints
      responses:
        '200':
          description: ''
      security:
      - jwt: []
      summary: Relay pool health (#40) for an email-account-list / relay-pool id (not an…
      tags:
      - Email Accounts
components:
  schemas:
    ImportOauthDto:
      type: object
      properties:
        combo:
          type: string
        email:
          type: string
        password:
          type: string
        refreshToken:
          type: string
        clientId:
          type: string
        listId:
          type: string
    ImportOauthBulkDto:
      type: object
      properties:
        combos:
          type: array
          items:
            type: string
        listId:
          type: string
      required:
      - combos
    CreateEmailAccountDto:
      type: object
      properties:
        email:
          type: string
          format: email
        name:
          type: string
        displayName:
          type: string
        signature:
          type: string
        notes:
          type: string
        smtpHost:
          type: string
        smtpPort:
          type: number
          minimum: 1
        smtpLogin:
          type: string
        smtpPassword:
          type: string
        smtpSsl:
          type: boolean
        imapHost:
          type: string
        imapPort:
          type: number
          minimum: 1
        imapLogin:
          type: string
        imapPassword:
          type: string
        imapSsl:
          type: boolean
        imapMode:
          type: string
        type:
          type: object
        service:
          type: object
        provider:
          type: string
          description: 'Lower-case provider key (`gmail`, `yandex`, `mailru`, `outlook`, ...).

            Not stored on EmailAccount — service normalizes it to {@link service}

            when `service` is not explicitly set.'
        status:
          type: string
        dailySendLimit:
          type: number
          minimum: 0
        hourlySendLimit:
          type: number
          minimum: 0
        minSendIntervalSeconds:
          type: number
          minimum: 0
        sendMethod:
          type: string
        fetchPriority:
          type: string
        webPassword:
          type: string
        isRelay:
          type: boolean
        oauthClientAlias:
          type: string
        folderId:
          type: string
        profileId:
          type: string
        profilePlatform:
          type: string
        listId:
          type: string
        _confirmDuplicate:
          type: boolean
      required:
      - email
  securitySchemes:
    jwt:
      scheme: bearer
      bearerFormat: JWT
      type: http
      description: JWT access token from /auth/login (Bearer <token>)
    tenant-api-key:
      scheme: bearer
      bearerFormat: JWT
      type: http
      description: Tenant API key (Bearer ldm_*) for MCP/A2A clients. Issued via CRM Settings → API Keys.
    rpa-service:
      scheme: bearer
      bearerFormat: JWT
      type: http
      description: Dedicated RPA service key. No tenant API-key or query-key authentication.