Live Direct Marketing IMAP Orchestrator API

The IMAP Orchestrator API from Live Direct Marketing — 24 operation(s) for imap orchestrator.

Operations 28

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/imap-orchestrator/stats Show the IMAP orchestrator dashboard stats · Get IMAP orchestrator dashboard stats #
Ask an LLM
“What do the overall inbox-fetching dashboard numbers look like right now?”
“Can I get a summary of how the IMAP orchestrator is performing for my workspace?”
Tell an agent
Show me the IMAP orchestrator dashboard stats.
Give me the headline numbers for mailbox fetching.
GET /api/imap-orchestrator/jobs List recent IMAP fetch jobs · List recent IMAP orchestrator jobs #
Ask an LLM
“Which IMAP fetch jobs ran recently for one of my mailboxes?”
“Can I filter the recent mailbox fetch jobs by status, like only failed ones?”
Tell an agent
List the last {limit} IMAP jobs for email account {accountId} with status {status}.
Show recent IMAP orchestrator jobs for account {accountId}.
POST /api/imap-orchestrator/fetch/{accountId} Fetch new mail for one email account now · Manually trigger an IMAP fetch for a specific account #
Ask an LLM
“Can I force an immediate IMAP fetch for a single mailbox instead of waiting for the schedule?”
“Is there a way to pull new replies into one sending account right away?”
Tell an agent
Trigger an IMAP fetch for email account {accountId} now.
Pull new inbound mail for mailbox {accountId} manually.
GET /api/imap-orchestrator/attention List mailboxes that need manual attention · List email accounts needing manual intervention #
Ask an LLM
“Which of my email accounts are stuck and need someone to fix them by hand?”
“Are any connected mailboxes flagged as needing manual intervention?”
Tell an agent
List the email accounts that need manual intervention.
Show me mailboxes flagged for attention by the IMAP orchestrator.
GET /api/imap-orchestrator/sync-health Check inbound mail sync health and quarantine · Get lossless mail sync cursor, staging and quarantine health #
Ask an LLM
“Is any inbound mail stuck in staging or quarantine for one of my mailboxes?”
“How healthy is the lossless mail sync cursor for my accounts?”
Tell an agent
Show mail sync health for account {accountId}, up to {limit} rows.
Check the sync cursor, staging and quarantine status for mailbox {accountId}.
POST /api/imap-orchestrator/sync-health/{id}/retry Retry a failed or quarantined inbound message · Retry a failed durable inbound message, or force a re-fetch of an exhausted… #
Ask an LLM
“Can I retry an inbound message that failed to sync or got stuck in quarantine?”
“What happens if I force a re-fetch of an exhausted quarantine row?”
Tell an agent
Retry the failed inbound message {id}.
Force a re-fetch of quarantined sync row {id}.
POST /api/imap-orchestrator/heal Auto-heal stuck mailbox locks in my workspace · Auto-heal stuck GAS accounts and IMAP locks for the current tenant #
Ask an LLM
“Can I automatically unstick frozen GAS accounts and IMAP locks for just my workspace?”
“My mailbox fetching seems stuck for this tenant; is there a self-heal action?”
Tell an agent
Auto-heal the stuck GAS accounts and IMAP locks for my tenant.
Run the IMAP self-heal for the current workspace only.
POST /api/imap-orchestrator/heal-all Auto-heal stuck IMAP state across all tenants · Auto-heal stuck IMAP/GAS state across all tenants #
Ask an LLM
“Is there a platform-wide action to heal stuck IMAP and GAS state for every tenant?”
“As an operator, can I clear stuck mailbox locks across all workspaces at once?”
Tell an agent
Heal stuck IMAP and GAS state across all tenants.
Run the platform-wide IMAP auto-heal for every workspace.
POST /api/imap-orchestrator/fetch-all Fetch new mail for every active account · Trigger an IMAP fetch for every active account in the tenant #
Ask an LLM
“Can I trigger an inbox fetch for all active mailboxes in my workspace at once?”
“What is the quickest way to pull new replies into every sending account I have?”
Tell an agent
Trigger an IMAP fetch for every active account in my tenant.
Fetch new mail for all of my active mailboxes now.
GET /api/imap-orchestrator/tech-log Read the latest IMAP job log entries · Get the latest N IMAP job log entries for monitoring #
Ask an LLM
“Where can I see the raw technical log of recent IMAP jobs for monitoring?”
“Can I tail the last few IMAP job log entries?”
Tell an agent
Show the latest {limit} IMAP job log entries.
Pull the IMAP tech log for monitoring.
GET /api/imap-orchestrator/recent-dialogs List recently received inbound dialogs · List recently inserted inbound dialogs #
Ask an LLM
“Which inbound conversations were inserted most recently from my mailboxes?”
“Can I see the newest reply threads that came in for one account?”
Tell an agent
List the {limit} most recent inbound dialogs for account {accountId}.
Show recently inserted inbound dialogs for mailbox {accountId}.
DELETE /api/imap-orchestrator/jobs/{id} Cancel an IMAP fetch job · Cancel an IMAP orchestrator job #
Ask an LLM
“Can I stop an IMAP orchestrator job that is queued or running?”
“What happens to a mailbox fetch job if I cancel it?”
Tell an agent destructive · confirm first
Cancel IMAP job {id}.
Stop the IMAP orchestrator job with id {id}.
GET /api/imap-orchestrator/marking-overrides List dialog marking override rules · List dialog marking override rules #
Ask an LLM
“Which override rules currently change how incoming dialogs get marked?”
“Can I review all the dialog marking overrides set up in my workspace?”
Tell an agent
List my dialog marking override rules.
Show every marking override applied to inbound dialogs.
POST /api/imap-orchestrator/marking-overrides Create a dialog marking override rule · Create a dialog marking override rule #
Ask an LLM
“Can I add an override so certain inbound dialogs are always marked a specific way?”
“Is it possible to define a new rule that overrides automatic reply marking?”
Tell an agent
Create a new dialog marking override rule.
Add a marking override for inbound dialogs.
POST /api/imap-orchestrator/marking-overrides/{id} Update a dialog marking override rule · Update a dialog marking override rule #
Ask an LLM
“Can I change an existing dialog marking override without deleting it?”
“What can I edit on a marking override rule I already created?”
Tell an agent
Update dialog marking override {id}.
Edit the existing marking override rule {id}.
DELETE /api/imap-orchestrator/marking-overrides/{id} Delete a dialog marking override rule · Delete a dialog marking override rule #
Ask an LLM
“Can I remove a dialog marking override that is no longer needed?”
“What happens to inbound dialog marking once I delete an override rule?”
Tell an agent destructive · confirm first
Delete dialog marking override {id}.
Remove the marking override rule {id}.
GET /api/imap-orchestrator/marking-patterns List dialog marking regex patterns · List dialog marking regex patterns #
Ask an LLM
“Which regex patterns are used to classify and mark inbound dialogs?”
“Can I see all the marking patterns configured for reply detection?”
Tell an agent
List the dialog marking regex patterns.
Show me every regex used for marking dialogs.
POST /api/imap-orchestrator/marking-patterns Create a dialog marking regex pattern · Create a dialog marking regex pattern #
Ask an LLM
“Can I add a new regex that marks inbound dialogs matching certain text?”
“Is there a way to teach the dialog marker a new pattern?”
Tell an agent
Create a new dialog marking regex pattern.
Add a regex pattern for marking inbound dialogs.
POST /api/imap-orchestrator/marking-patterns/{id} Update a dialog marking regex pattern · Update a dialog marking regex pattern #
Ask an LLM
“Can I tweak the regex of an existing dialog marking pattern?”
“What fields can I change on a marking pattern that already exists?”
Tell an agent
Update dialog marking pattern {id}.
Edit the regex on marking pattern {id}.
DELETE /api/imap-orchestrator/marking-patterns/{id} Delete a dialog marking regex pattern · Delete a dialog marking regex pattern #
Ask an LLM
“Can I remove a regex pattern that is mis-marking inbound dialogs?”
“Is deleting a dialog marking pattern permanent?”
Tell an agent destructive · confirm first
Delete dialog marking pattern {id}.
Remove the regex marking pattern {id}.
GET /api/imap-orchestrator/health-accounts List all email accounts for admin health checks · Admin: list all email accounts across every tenant for health checks #
Ask an LLM
“As an admin, can I see every email account across all tenants to check their health?”
“Which mailboxes exist platform-wide that I could run a connection test on?”
Tell an agent
List all email accounts across every tenant for health checks.
Show the admin health-check roster of mailboxes.
POST /api/imap-orchestrator/health-test Run an SMTP/IMAP connection test for an account · Admin: run SMTP/IMAP connection test (or round-trip) for a specific account #
Ask an LLM
“Can I test whether a mailbox's SMTP and IMAP connections actually work?”
“Is there a round-trip test that sends and receives through one email account?”
Tell an agent
Run an SMTP and IMAP connection test for an email account.
Do a round-trip mail test on a specific mailbox.
POST /api/imap-orchestrator/admin/kill Emergency-stop the IMAP cron · Emergency stop for IMAP cron triggers (#6 Layer 4). #
Ask an LLM
“Is there a kill switch that pauses all scheduled IMAP fetch cycles?”
“Can I halt the IMAP cron in an emergency and record a reason?”
Tell an agent
Emergency-stop the IMAP cron triggers.
Pause all IMAP fetch cycles with the kill switch.
POST /api/imap-orchestrator/admin/resume Resume the IMAP cron after a kill · Resume IMAP cron after a kill (#6 Layer 4) #
Ask an LLM
“After hitting the IMAP kill switch, how can I turn scheduled fetching back on?”
“Can I resume the IMAP cron once the emergency is over?”
Tell an agent
Resume the IMAP cron after the kill switch.
Turn scheduled IMAP fetching back on.
GET /api/imap-orchestrator/admin/health Check the IMAP kill-switch state and queues · IMAP orchestrator kill-switch state + queue counts (#6 Layer 4). #
Ask an LLM
“Is the IMAP cron currently paused, and why?”
“What are the IMAP queue counts alongside the kill-switch status?”
Tell an agent
Show the IMAP kill-switch state and queue counts.
Tell me whether the IMAP cron is paused right now.
GET /api/imap-orchestrator/conveyor-health Check inbound conveyor health per step · Per-step inbound conveyor health for this tenant (#336): fetch quarantine… #
Ask an LLM
“Which step of the inbound mail conveyor is backing up for my workspace?”
“Are there delivery reports that the classify pass never covered?”
Tell an agent
Show per-step inbound conveyor health for my tenant.
Check fetch quarantine, relay silence and staging backlog for this workspace.
POST /api/imap-orchestrator/conveyor-watchdog/run Run the inbound conveyor watchdog now · Run the conveyor watchdog tick across all tenants NOW (#336): measure every… #
Ask an LLM
“Can I run the conveyor watchdog immediately so it self-heals stalled inbound steps?”
“Is there a way to force the watchdog to re-enqueue stalled links and send alerts now?”
Tell an agent
Run the conveyor watchdog tick across all tenants now.
Trigger the inbound conveyor self-heal immediately.
GET /api/imap-orchestrator/conveyor-watchdog/last Show the last conveyor watchdog result · Result of the last conveyor watchdog tick across all tenants (#336), without… #
Ask an LLM
“What did the most recent conveyor watchdog tick find, without rerunning it?”
“Can I see the previous watchdog run's results across all tenants?”
Tell an agent
Show the result of the last conveyor watchdog tick.
Get the previous watchdog run without recomputing it.

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-imap-orchestrator-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-imap-orchestrator-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: LDM v3 IMAP Orchestrator 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: IMAP Orchestrator
paths:
  /api/imap-orchestrator/stats:
    get:
      operationId: ImapOrchestratorController_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 IMAP orchestrator dashboard stats
      tags:
      - IMAP Orchestrator
      x-required-scope:
      - imap:read
  /api/imap-orchestrator/jobs:
    get:
      operationId: ImapOrchestratorController_getJobs
      parameters:
      - name: accountId
        required: true
        in: query
        schema:
          type: string
      - name: status
        required: true
        in: query
        schema:
          type: string
      - name: limit
        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 recent IMAP orchestrator jobs
      tags:
      - IMAP Orchestrator
      x-required-scope:
      - imap:read
  /api/imap-orchestrator/fetch/{accountId}:
    post:
      operationId: ImapOrchestratorController_fetchAccount
      parameters:
      - name: accountId
        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: Manually trigger an IMAP fetch for a specific account
      tags:
      - IMAP Orchestrator
  /api/imap-orchestrator/attention:
    get:
      operationId: ImapOrchestratorController_getAttention
      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 accounts needing manual intervention
      tags:
      - IMAP Orchestrator
      x-required-scope:
      - imap:read
  /api/imap-orchestrator/sync-health:
    get:
      operationId: ImapOrchestratorController_getSyncHealth
      parameters:
      - name: accountId
        required: true
        in: query
        schema:
          type: string
      - name: limit
        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: Get lossless mail sync cursor, staging and quarantine health
      tags:
      - IMAP Orchestrator
      x-required-scope:
      - imap:read
  /api/imap-orchestrator/sync-health/{id}/retry:
    post:
      operationId: ImapOrchestratorController_retryStagedMessage
      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: Retry a failed durable inbound message, or force a re-fetch of an exhausted…
      tags:
      - IMAP Orchestrator
  /api/imap-orchestrator/heal:
    post:
      operationId: ImapOrchestratorController_heal
      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: Auto-heal stuck GAS accounts and IMAP locks for the current tenant
      tags:
      - IMAP Orchestrator
      x-required-scope:
      - imap:write
  /api/imap-orchestrator/heal-all:
    post:
      operationId: ImapOrchestratorController_healAll
      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: Auto-heal stuck IMAP/GAS state across all tenants
      tags:
      - IMAP Orchestrator
      x-required-scope:
      - imap:write
  /api/imap-orchestrator/fetch-all:
    post:
      operationId: ImapOrchestratorController_fetchAll
      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: Trigger an IMAP fetch for every active account in the tenant
      tags:
      - IMAP Orchestrator
      x-required-scope:
      - imap:write
  /api/imap-orchestrator/tech-log:
    get:
      operationId: ImapOrchestratorController_getTechLog
      parameters:
      - name: limit
        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: Get the latest N IMAP job log entries for monitoring
      tags:
      - IMAP Orchestrator
      x-required-scope:
      - imap:read
  /api/imap-orchestrator/recent-dialogs:
    get:
      operationId: ImapOrchestratorController_getRecentDialogs
      parameters:
      - name: accountId
        required: true
        in: query
        schema:
          type: string
      - name: limit
        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 recently inserted inbound dialogs
      tags:
      - IMAP Orchestrator
      x-required-scope:
      - imap:read
  /api/imap-orchestrator/jobs/{id}:
    delete:
      operationId: ImapOrchestratorController_cancelJob
      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: Cancel an IMAP orchestrator job
      tags:
      - IMAP Orchestrator
  /api/imap-orchestrator/marking-overrides:
    get:
      operationId: ImapOrchestratorController_getOverrides
      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 dialog marking override rules
      tags:
      - IMAP Orchestrator
      x-required-scope:
      - imap:read
    post:
      operationId: ImapOrchestratorController_createOverride
      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 a dialog marking override rule
      tags:
      - IMAP Orchestrator
      x-required-scope:
      - imap:write
  /api/imap-orchestrator/marking-overrides/{id}:
    post:
      operationId: ImapOrchestratorController_updateOverride
      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: Update a dialog marking override rule
      tags:
      - IMAP Orchestrator
    delete:
      operationId: ImapOrchestratorController_deleteOverride
      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 a dialog marking override rule
      tags:
      - IMAP Orchestrator
  /api/imap-orchestrator/marking-patterns:
    get:
      operationId: ImapOrchestratorController_getPatterns
      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 dialog marking regex patterns
      tags:
      - IMAP Orchestrator
      x-required-scope:
      - imap:read
    post:
      operationId: ImapOrchestratorController_createPattern
      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 a dialog marking regex pattern
      tags:
      - IMAP Orchestrator
      x-required-scope:
      - imap:write
  /api/imap-orchestrator/marking-patterns/{id}:
    post:
      operationId: ImapOrchestratorController_updatePattern
      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: Update a dialog marking regex pattern
      tags:
      - IMAP Orchestrator
    delete:
      operationId: ImapOrchestratorController_deletePattern
      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 a dialog marking regex pattern
      tags:
      - IMAP Orchestrator
  /api/imap-orchestrator/health-accounts:
    get:
      operationId: ImapOrchestratorController_getHealthAccounts
      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: 'Admin: list all email accounts across every tenant for health checks'
      tags:
      - IMAP Orchestrator
      x-required-scope:
      - imap:read
  /api/imap-orchestrator/health-test:
    post:
      operationId: ImapOrchestratorController_healthTest
      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: 'Admin: run SMTP/IMAP connection test (or round-trip) for a specific account'
      tags:
      - IMAP Orchestrator
      x-required-scope:
      - imap:write
  /api/imap-orchestrator/admin/kill:
    post:
      operationId: ImapOrchestratorController_killImapCron
      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: Emergency stop for IMAP cron triggers (#6 Layer 4).
      tags:
      - IMAP Orchestrator
      x-required-scope:
      - admin:write
  /api/imap-orchestrator/admin/resume:
    post:
      operationId: ImapOrchestratorController_resumeImapCron
      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: Resume IMAP cron after a kill (#6 Layer 4)
      tags:
      - IMAP Orchestrator
      x-required-scope:
      - admin:write
  /api/imap-orchestrator/admin/health:
    get:
      operationId: ImapOrchestratorController_getImapHealth
      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: IMAP orchestrator kill-switch state + queue counts (#6 Layer 4).
      tags:
      - IMAP Orchestrator
      x-required-scope:
      - admin:read
  /api/imap-orchestrator/conveyor-health:
    get:
      operationId: ImapOrchestratorController_getConveyorHealth
      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: 'Per-step inbound conveyor health for this tenant (#336): fetch quarantine…'
      tags:
      - IMAP Orchestrator
      x-required-scope:
      - imap:read
  /api/imap-orchestrator/conveyor-watchdog/run:
    post:
      operationId: ImapOrchestratorController_runConveyorWatchdog
      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: 'Run the conveyor watchdog tick across all tenants NOW (#336): measure every…'
      tags:
      - IMAP Orchestrator
      x-required-scope:
      - admin:write
  /api/imap-orchestrator/conveyor-watchdog/last:
    get:
      operationId: ImapOrchestratorController_getConveyorWatchdogLast
      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: Result of the last conveyor watchdog tick across all tenants (#336), without…
      tags:
      - IMAP Orchestrator
      x-required-scope:
      - admin:read
components:
  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.