Live Direct Marketing Mailing API

The Mailing API from Live Direct Marketing — 39 operation(s) for mailing.

Operations 41

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/mailing/overview Get an overview of all mailing campaigns · Get a global overview of all mailing campaigns (admin dashboard) — merges… #
Ask an LLM
“Where can I see every mailing campaign at once on an admin dashboard?”
“Does the campaign overview include both legacy mailing tasks and conveyor campaigns?”
Tell an agent
Show me the admin overview of all mailing campaigns.
Give me the global mailing dashboard with each row's legacy or campaign source.
GET /api/mailing/bounce-overview Get global bounce statistics · Get global bounce statistics: legacy mailing tasks (per-task + per-domain) AND… #
Ask an LLM
“What are my bounce rates across all mailings, split into hard and soft bounces?”
“Which recipient domains are bouncing the most across my mailing tasks?”
Tell an agent
Show global bounce statistics across all mailings.
Break down campaign bounces by nature: dead addresses versus retryable soft bounces.
GET /api/mailing/warmup-overview List email accounts in warmup · Get an overview of all email accounts currently in warmup mode #
Ask an LLM
“Which of my email accounts are currently warming up?”
“Is there a single view of every sending mailbox still in warmup mode?”
Tell an agent
Show me all email accounts currently in warmup.
Give me the warmup overview for my sending mailboxes.
GET /api/mailing/pending-approvals List campaigns awaiting approval · List campaigns awaiting admin approval (cross-tenant for SUPER) #
Ask an LLM
“Which mailing campaigns are waiting for admin approval?”
“Can a super admin see pending approvals across all tenants?”
Tell an agent
List the campaigns waiting for my approval.
Show the mailing approval queue.
POST /api/mailing/{taskId}/approve Approve a pending mailing campaign · Approve a pending mailing campaign (admin) #
Ask an LLM
“How do I approve a mailing campaign that is waiting for review?”
“Does approving a campaign start sending it right away, or is that a separate step?”
Tell an agent
Approve mailing campaign {task}.
Sign off on pending campaign {task} so it can be sent.
POST /api/mailing/{taskId}/reject Reject a pending mailing campaign · Reject a pending mailing campaign (admin) #
Ask an LLM
“Can an admin turn down a mailing campaign submitted for approval?”
“What happens when I decline a campaign in the approval queue?”
Tell an agent destructive · confirm first
Reject pending mailing campaign {task}.
Decline approval for campaign {task}.
GET /api/mailing/creative-preview/{creativeId} Preview a creative for approval · Preview a creative for approval (cross-tenant for SUPER) #
Ask an LLM
“Can I see what a campaign's email creative looks like before approving it?”
“Which database do I need to name to preview a creative under review?”
Tell an agent
Preview creative {creative} from database {db} before I approve it.
Show me creative {creative} in {db} for approval review.
GET /api/mailing/{taskId}/config Get a campaign's mailing configuration · Get the mailing configuration for a campaign #
Ask an LLM
“Where can I check how a mailing campaign is configured?”
“What sending settings are saved on a campaign right now?”
Tell an agent
Show the mailing configuration for campaign {task}.
Get the current send settings of mailing {task}.
PATCH /api/mailing/{taskId}/config Update a campaign's mailing configuration · Update the mailing configuration for a campaign #
Ask an LLM
“Can I change the sending settings of a mailing campaign after it's created?”
“How do I edit a campaign's mailing configuration?”
Tell an agent
Update the mailing configuration of campaign {task}.
Change the send settings saved on mailing {task}.
POST /api/mailing/{taskId}/start Start a mailing campaign · Start a mailing campaign #
Ask an LLM
“How do I kick off a mailing campaign?”
“Can I launch a campaign directly from its task id?”
Tell an agent
Start mailing campaign {task}.
Launch campaign {task} now.
POST /api/mailing/{taskId}/start-sending Start sending an approved campaign · Issue #180: start sending an APPROVED campaign (status=APPROVED). #
Ask an LLM
“Once my campaign is approved, how do I actually begin sending it?”
“Why would starting an approved campaign fail if I edited the creative after approval?”
Tell an agent
Start sending approved campaign {task} and launch its streams.
Begin delivery of {task} now that it has been approved.
POST /api/mailing/batch-stats Get stats for many mailing tasks at once · Get stats for a batch of mailing tasks in one call #
Ask an LLM
“Can I pull statistics for several mailing tasks in a single call?”
“Is there a bulk way to compare stats across a batch of mailings?”
Tell an agent
Get batch stats for my mailing tasks in one request.
Fetch combined statistics for a set of mailing tasks.
GET /api/mailing/{taskId}/start-list-stats Get a campaign's start-list statistics · Get start-list statistics for a mailing campaign #
Ask an LLM
“How big was the starting recipient list for a mailing campaign?”
“Where can I see statistics about the list a campaign started with?”
Tell an agent
Show start-list statistics for campaign {task}.
Get the starting audience numbers of mailing {task}.
GET /api/mailing/{taskId}/stats Get aggregate stats for a campaign · Get aggregate stats for a mailing campaign #
Ask an LLM
“What are the overall results of a mailing campaign so far?”
“Can I see total sent, delivered and failed counts for one campaign?”
Tell an agent
Show the aggregate stats for mailing campaign {task}.
Get all-time totals for campaign {task}.
GET /api/mailing/{taskId}/timeline Get a campaign's activity timeline · Get the activity timeline for a mailing campaign #
Ask an LLM
“What has happened over time in a mailing campaign?”
“Is there an event history showing when a campaign started, paused or changed?”
Tell an agent
Show the activity timeline for campaign {task}.
Walk me through what happened in mailing {task}, in order.
GET /api/mailing/{taskId}/speed Get a campaign's sending speed · Get sending speed metrics for a mailing campaign #
Ask an LLM
“How fast is my mailing campaign sending right now?”
“Can I check the send rate metrics of a campaign?”
Tell an agent
Show the sending speed of campaign {task}.
Get send-rate metrics for mailing {task}.
GET /api/mailing/{taskId}/streams List a campaign's sending streams · List sending streams for a mailing campaign #
Ask an LLM
“Which sending streams is a mailing campaign using?”
“Can I list the parallel streams a campaign is sent through?”
Tell an agent
List the sending streams of campaign {task}.
Show me every stream running for mailing {task}.
GET /api/mailing/{taskId}/streams/{streamId}/logs Get logs for a mailing stream · Get logs for a specific mailing stream #
Ask an LLM
“Where can I read the full log of one sending stream?”
“Can I see the raw log output for a single stream in a campaign?”
Tell an agent
Show all logs for stream {stream} of campaign {task}.
Get the unfiltered log of stream {stream} in mailing {task}.
GET /api/mailing/{taskId}/streams/{streamId}/detail Get details of a mailing stream · Get detailed information for a specific mailing stream #
Ask an LLM
“What account and settings is a specific sending stream using?”
“Can I inspect one stream's detailed state inside a campaign?”
Tell an agent
Show details of stream {stream} in campaign {task}.
Describe sending stream {stream} of mailing {task}.
GET /api/mailing/{taskId}/streams/{streamId}/logs-filtered Get filtered, paged stream logs · Get filtered and paginated logs for a mailing stream #
Ask an LLM
“Can I filter a stream's logs by stage and status and page through them?”
“Which filters are available when reading a sending stream's log?”
Tell an agent
Show {status} logs at stage {stage} for stream {stream} of campaign {task}, page {page} with {size} per page.
Filter stream {stream} logs in mailing {task} to status {status} at stage {stage}, page {page}, {size} rows.
DELETE /api/mailing/{taskId}/logs Delete all logs for a campaign · Delete all logs for a mailing campaign (SUPER only) #
Ask an LLM
“Can a super admin wipe all the logs of a mailing campaign?”
“Is deleting a campaign's logs permanent?”
Tell an agent destructive · confirm first
Delete every log for mailing campaign {task}.
Purge the logs of campaign {task}.
GET /api/mailing/{taskId}/items List a campaign's recipients · List mailing items (recipients) for a campaign #
Ask an LLM
“Who are the recipients in a mailing campaign and what is each one's status?”
“Can I search a campaign's recipient list by status or text?”
Tell an agent
List recipients of campaign {task} with status {status} matching {search}, page {page} of {size}.
Search mailing {task} items for {search} with status {status}, page {page}, {size} per page.
GET /api/mailing/{taskId}/items/{itemId} Get one campaign recipient · Get a single mailing item by id #
Ask an LLM
“Can I look up a single recipient item inside a mailing campaign?”
“What does one mailing item record contain?”
Tell an agent
Show mailing item {item} in campaign {task}.
Get recipient record {item} from mailing {task}.
PATCH /api/mailing/{taskId}/items/{itemId} Edit a campaign recipient's fields · Update fields of a single mailing item #
Ask an LLM
“Can I fix the data on one recipient in a campaign, like a typo in their details?”
“How do I edit the fields of a single mailing item?”
Tell an agent
Update the fields of item {item} in campaign {task}.
Correct recipient {item}'s details in mailing {task}.
PATCH /api/mailing/{taskId}/items/{itemId}/status Change a campaign recipient's status · Update the status of a single mailing item #
Ask an LLM
“Can I manually set the send status of one recipient in a campaign?”
“How do I mark a single mailing item as a different status?”
Tell an agent
Set the status of item {item} in campaign {task}.
Change recipient {item}'s mailing status in {task}.
POST /api/mailing/{taskId}/reset-errors Retry failed recipients in a campaign · Reset all failed mailing items in a campaign back to pending #
Ask an LLM
“How do I requeue every recipient that failed in a mailing campaign?”
“Can failed mailing items be put back to pending in one go?”
Tell an agent
Reset all failed items in campaign {task} back to pending.
Retry every errored recipient of mailing {task}.
POST /api/mailing/{taskId}/reset-status/{status} Reset recipients of one status to pending · Reset all items with a given status back to pending (admin recovery only) #
Ask an LLM
“Can an admin push all recipients with a particular status back to pending?”
“Is there a recovery tool to requeue mailing items by any status, not just errors?”
Tell an agent
Reset every item with status {status} in campaign {task} to pending.
Requeue all {status} recipients of mailing {task} for recovery.
GET /api/mailing/{taskId}/stats/today Get today's stats for a campaign · Get today's stats for a mailing campaign #
Ask an LLM
“How many emails has my campaign sent today?”
“Can I see a campaign's numbers for the current day only?”
Tell an agent
Show today's stats for campaign {task}.
Get today's send numbers for mailing {task}.
GET /api/mailing/{taskId}/ab-test Get A/B test results for a campaign · Get A/B test statistics for a mailing campaign #
Ask an LLM
“Which variant is winning the A/B test in my mailing campaign?”
“Where can I compare split-test statistics for a campaign?”
Tell an agent
Show A/B test statistics for campaign {task}.
Compare the split-test variants of mailing {task}.
GET /api/mailing/{taskId}/analytics Get per-domain campaign analytics · Get per-domain analytics for a mailing campaign #
Ask an LLM
“How is my campaign performing at each recipient domain?”
“Can I see a mailing's results broken down by email domain?”
Tell an agent
Show per-domain analytics for campaign {task}.
Break down mailing {task} results by recipient domain.
GET /api/mailing/{taskId}/control-email-stats Get control-email tracking stats · Get control-email tracking stats for a mailing campaign #
Ask an LLM
“Are my control emails landing during a campaign?”
“Where do I see tracking results for the control emails seeded into a mailing?”
Tell an agent
Show control-email stats for campaign {task}.
Get control-email tracking results of mailing {task}.
POST /api/mailing/{taskId}/control-email-autopause/evaluate Evaluate control-email auto-pause rules · Manually evaluate control-email auto-pause rules for a campaign #
Ask an LLM
“Can I manually trigger the control-email auto-pause check for a campaign?”
“Will a campaign pause itself if control emails stop arriving?”
Tell an agent
Evaluate the control-email auto-pause rules for campaign {task} now.
Run the auto-pause check on mailing {task}'s control emails.
GET /api/mailing/{taskId}/export.csv Export a campaign as CSV · Export a mailing campaign as CSV #
Ask an LLM
“Can I download a mailing campaign's data as a spreadsheet?”
“What format is the campaign data export in?”
Tell an agent
Export campaign {task} as CSV.
Download mailing {task} as a CSV file.
GET /api/mailing/{taskId}/report.pdf Export a client-ready campaign PDF report · Export a client-ready PDF report for a mailing campaign #
Ask an LLM
“Can I give my client a PDF report of a mailing campaign?”
“Is there a printable report of campaign results?”
Tell an agent
Export a client-ready PDF report for campaign {task}.
Generate the PDF report of mailing {task}.
GET /api/mailing/block-guard/dashboard Get the BlockGuard dashboard · Get the BlockGuard dashboard (blocks, barked templates, paused accounts) #
Ask an LLM
“Which templates got flagged and which accounts were paused by BlockGuard in a mailing?”
“Where can I see blocks detected during a campaign?”
Tell an agent
Show the BlockGuard dashboard for mailing {task}.
List blocks, flagged templates and paused accounts for campaign {task}.
GET /api/mailing/block-guard/template/{templateId} Get a template's block history · Get block-event history for a template #
Ask an LLM
“How often has a particular email template been blocked?”
“Can I see the block-event history of one template?”
Tell an agent
Show block-event history for template {template}.
List the block events that stopped template {template}.
POST /api/mailing/block-guard/template/{templateId}/unblock Unblock a flagged template · Manually unblock a previously barked template #
Ask an LLM
“Can I clear a BlockGuard flag on a template so it can be used again?”
“How do I manually unblock a template that was stopped?”
Tell an agent
Unblock template {template}.
Clear the BlockGuard flag on template {template}.
POST /api/mailing/block-guard/account/{accountId}/reset-limits Reset limits for one email account · Reset limit counters for one account: clear auto-pause + zero working counters… #
Ask an LLM
“Can I unpause a single sending account without losing its stats?”
“How do I zero the working counters on one mailbox that got auto-paused?”
Tell an agent
Reset the limit counters for email account {account} and clear its auto-pause.
Unpause account {account} and zero its working counters, keeping stats.
POST /api/mailing/{taskId}/reset-limits Reset limits for a whole mailing · Reset limit counters for a whole mailing: un-pause blocked accounts, KEEP… #
Ask an LLM
“Can I unpause every blocked account in a mailing at once?”
“Does resetting a mailing's limits erase its block events or stats?”
Tell an agent
Reset limit counters for the whole mailing {task}.
Un-pause all blocked accounts in campaign {task}, keeping block history.
GET /api/mailing/block-guard/account/{accountId} Get an email account's block history · Get block-event history for an email account #
Ask an LLM
“Has a specific sending mailbox been blocked before, and when?”
“Can I see the block-event history of one email account?”
Tell an agent
Show block-event history for email account {account}.
List every block recorded against account {account}.
GET /api/mailing/block-guard/providers Get block stats per email provider · Get block statistics aggregated per email provider #
Ask an LLM
“Which mailbox providers are blocking my sends the most?”
“Can I see block counts grouped by email provider?”
Tell an agent
Show block statistics per email provider.
Rank email providers by how many blocks they've caused.

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-mailing-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-mailing-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: LDM v3 Mailing 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: Mailing
paths:
  /api/mailing/overview:
    get:
      operationId: MailingController_getOverview
      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 a global overview of all mailing campaigns (admin dashboard) — merges…
      tags:
      - Mailing
      x-required-scope:
      - mailing:read
  /api/mailing/bounce-overview:
    get:
      operationId: MailingController_getBounceOverview
      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 global bounce statistics: legacy mailing tasks (per-task + per-domain) AND…'
      tags:
      - Mailing
      x-required-scope:
      - mailing:read
  /api/mailing/warmup-overview:
    get:
      operationId: MailingController_getWarmupOverview
      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 an overview of all email accounts currently in warmup mode
      tags:
      - Mailing
      x-required-scope:
      - mailing:read
  /api/mailing/pending-approvals:
    get:
      operationId: MailingController_getPendingApprovals
      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 campaigns awaiting admin approval (cross-tenant for SUPER)
      tags:
      - Mailing
      x-required-scope:
      - mailing:read
  /api/mailing/{taskId}/approve:
    post:
      operationId: MailingController_approveCampaign
      parameters:
      - name: taskId
        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: Approve a pending mailing campaign (admin)
      tags:
      - Mailing
  /api/mailing/{taskId}/reject:
    post:
      operationId: MailingController_rejectCampaign
      parameters:
      - name: taskId
        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: Reject a pending mailing campaign (admin)
      tags:
      - Mailing
  /api/mailing/creative-preview/{creativeId}:
    get:
      operationId: MailingController_getCreativePreview
      parameters:
      - name: creativeId
        required: true
        in: path
        schema:
          type: string
      - name: dbName
        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: Preview a creative for approval (cross-tenant for SUPER)
      tags:
      - Mailing
  /api/mailing/{taskId}/config:
    get:
      operationId: MailingController_getConfig
      parameters:
      - name: taskId
        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 the mailing configuration for a campaign
      tags:
      - Mailing
    patch:
      operationId: MailingController_updateConfig
      parameters:
      - name: taskId
        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 mailing configuration for a campaign
      tags:
      - Mailing
  /api/mailing/{taskId}/start:
    post:
      operationId: MailingController_startCampaign
      parameters:
      - name: taskId
        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 a mailing campaign
      tags:
      - Mailing
  /api/mailing/{taskId}/start-sending:
    post:
      operationId: MailingController_startSending
      parameters:
      - name: taskId
        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: 'Issue #180: start sending an APPROVED campaign (status=APPROVED).'
      tags:
      - Mailing
  /api/mailing/batch-stats:
    post:
      operationId: MailingController_getBatchStats
      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: Get stats for a batch of mailing tasks in one call
      tags:
      - Mailing
      x-required-scope:
      - mailing:write
  /api/mailing/{taskId}/start-list-stats:
    get:
      operationId: MailingController_getStartListStats
      parameters:
      - name: taskId
        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 start-list statistics for a mailing campaign
      tags:
      - Mailing
  /api/mailing/{taskId}/stats:
    get:
      operationId: MailingController_getStats
      parameters:
      - name: taskId
        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 aggregate stats for a mailing campaign
      tags:
      - Mailing
  /api/mailing/{taskId}/timeline:
    get:
      operationId: MailingController_getTimeline
      parameters:
      - name: taskId
        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 the activity timeline for a mailing campaign
      tags:
      - Mailing
  /api/mailing/{taskId}/speed:
    get:
      operationId: MailingController_getSpeed
      parameters:
      - name: taskId
        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 sending speed metrics for a mailing campaign
      tags:
      - Mailing
  /api/mailing/{taskId}/streams:
    get:
      operationId: MailingController_getStreams
      parameters:
      - name: taskId
        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 sending streams for a mailing campaign
      tags:
      - Mailing
  /api/mailing/{taskId}/streams/{streamId}/logs:
    get:
      operationId: MailingController_getStreamLogs
      parameters:
      - name: taskId
        required: true
        in: path
        schema:
          type: string
      - name: streamId
        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 logs for a specific mailing stream
      tags:
      - Mailing
  /api/mailing/{taskId}/streams/{streamId}/detail:
    get:
      operationId: MailingController_getStreamDetail
      parameters:
      - name: taskId
        required: true
        in: path
        schema:
          type: string
      - name: streamId
        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 detailed information for a specific mailing stream
      tags:
      - Mailing
  /api/mailing/{taskId}/streams/{streamId}/logs-filtered:
    get:
      operationId: MailingController_getStreamLogsFiltered
      parameters:
      - name: taskId
        required: true
        in: path
        schema:
          type: string
      - name: streamId
        required: true
        in: path
        schema:
          type: string
      - name: stage
        required: true
        in: query
        schema:
          type: string
      - name: status
        required: true
        in: query
        schema:
          type: string
      - name: page
        required: true
        in: query
        schema:
          type: string
      - name: pageSize
        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 filtered and paginated logs for a mailing stream
      tags:
      - Mailing
  /api/mailing/{taskId}/logs:
    delete:
      operationId: MailingController_deleteTaskLogs
      parameters:
      - name: taskId
        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 all logs for a mailing campaign (SUPER only)
      tags:
      - Mailing
  /api/mailing/{taskId}/items:
    get:
      operationId: MailingController_getItems
      parameters:
      - name: taskId
        required: true
        in: path
        schema:
          type: string
      - name: page
        required: true
        in: query
        schema:
          type: string
      - name: pageSize
        required: true
        in: query
        schema:
          type: string
      - name: status
        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 mailing items (recipients) for a campaign
      tags:
      - Mailing
  /api/mailing/{taskId}/items/{itemId}:
    get:
      operationId: MailingController_getItem
      parameters:
      - name: taskId
        required: true
        in: path
        schema:
          type: string
      - name: itemId
        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 a single mailing item by id
      tags:
      - Mailing
    patch:
      operationId: MailingController_updateItem
      parameters:
      - name: taskId
        required: true
        in: path
        schema:
          type: string
      - name: itemId
        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 fields of a single mailing item
      tags:
      - Mailing
  /api/mailing/{taskId}/items/{itemId}/status:
    patch:
      operationId: MailingController_updateItemStatus
      parameters:
      - name: taskId
        required: true
        in: path
        schema:
          type: string
      - name: itemId
        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 status of a single mailing item
      tags:
      - Mailing
  /api/mailing/{taskId}/reset-errors:
    post:
      operationId: MailingController_resetErrors
      parameters:
      - name: taskId
        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 all failed mailing items in a campaign back to pending
      tags:
      - Mailing
  /api/mailing/{taskId}/reset-status/{status}:
    post:
      operationId: MailingController_resetByStatus
      parameters:
      - name: taskId
        required: true
        in: path
        schema:
          type: string
      - name: status
        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 all items with a given status back to pending (admin recovery only)
      tags:
      - Mailing
  /api/mailing/{taskId}/stats/today:
    get:
      operationId: MailingController_getStatsToday
      parameters:
      - name: taskId
        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 today's stats for a mailing campaign
      tags:
      - Mailing
  /api/mailing/{taskId}/ab-test:
    get:
      operationId: MailingController_getAbTest
      parameters:
      - name: taskId
        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 A/B test statistics for a mailing campaign
      tags:
      - Mailing
  /api/mailing/{taskId}/analytics:
    get:
      operationId: MailingController_getAnalytics
      parameters:
      - name: taskId
        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-domain analytics for a mailing campaign
      tags:
      - Mailing
  /api/mailing/{taskId}/control-email-stats:
    get:
      operationId: MailingController_getControlEmailStats
      parameters:
      - name: taskId
        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 control-email tracking stats for a mailing campaign
      tags:
      - Mailing
  /api/mailing/{taskId}/control-email-autopause/evaluate:
    post:
      operationId: MailingController_evaluateControlEmailAutoPause
      parameters:
      - name: taskId
        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 evaluate control-email auto-pause rules for a campaign
      tags:
      - Mailing
  /api/mailing/{taskId}/export.csv:
    get:
      operationId: MailingController_exportCsv
      parameters:
      - name: taskId
        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: Export a mailing campaign as CSV
      tags:
      - Mailing
  /api/mailing/{taskId}/report.pdf:
    get:
      operationId: MailingController_exportReportPdf
      parameters:
      - name: taskId
        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: Export a client-ready PDF report for a mailing campaign
      tags:
      - Mailing
  /api/mailing/block-guard/dashboard:
    get:
      operationId: MailingController_blockGuardDashboard
      parameters:
      - name: taskId
        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 BlockGuard dashboard (blocks, barked templates, paused accounts)
      tags:
      - Mailing
      x-required-scope:
      - mailing:read
  /api/mailing/block-guard/template/{templateId}:
    get:
      operationId: MailingController_blockGuardTemplate
      parameters:
      - name: templateId
        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 block-event history for a template
      tags:
      - Mailing
  /api/mailing/block-guard/template/{templateId}/unblock:
    post:
      operationId: MailingController_blockGuardUnblock
      parameters:
      - name: templateId
        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 unblock a previously barked template
      tags:
      - Mailing
  /api/mailing/block-guard/account/{accountId}/reset-limits:
    post:
      operationId: MailingController_blockGuardResetAccount
      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: 'Reset limit counters for one account: clear auto-pause + zero working counters…'
      tags:
      - Mailing
  /api/mailing/{taskId}/reset-limits:
    post:
      operationId: MailingController_resetLimits
      parameters:
      - name: taskId
        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 limit counters for a whole mailing: un-pause blocked accounts, KEEP…'
      tags:
      - Mailing
  /api/mailing/block-guard/account/{accountId}:
    get:
      operationId: MailingController_blockGuardAccount
      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:
        '200':
          description: ''
      security:
      - jwt: []
      summary: Get block-event history for an email account
      tags:
      - Mailing
  /api/mailing/block-guard/providers:
    get:
      operationId: MailingController_blockGuardProviders
      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 block statistics aggregated per email provider
      tags:
      - Mailing
      x-required-scope:
      - mailing: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.