openapi: 3.2.0 info: title: LDM v3 RPA 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: RPA paths: /api/rpa/poll: get: operationId: RpaController_poll 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: Poll for available RPA work (queued jobs or unprocessed contacts) tags: - RPA /api/rpa/job-status: get: operationId: RpaController_jobStatus parameters: - name: dbName required: true in: query schema: type: string - name: jobId 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: Poll RPA job status until ready tags: - RPA /api/rpa/job-report: post: operationId: RpaController_jobReport 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: Report the result of an RPA send job tags: - RPA /api/rpa/system-report: post: operationId: RpaController_systemReport 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: Report a process-level RPA error not tied to a job tags: - RPA /api/rpa/system-status: get: operationId: RpaController_systemStatus 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 RPA system health: errors, paused mailings, account stats' tags: - RPA /api/rpa/task-status: get: operationId: RpaController_taskStatus parameters: - name: dbName required: true in: query schema: type: string - 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: 'Legacy: get mailing-level RPA status with item counts' tags: - RPA /api/rpa/report: post: operationId: RpaController_report parameters: - name: dbName required: true in: query schema: type: string - 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: '201': description: '' security: - jwt: [] summary: 'Legacy: submit a batch report of RPA item send results' tags: - RPA components: securitySchemes: jwt: scheme: bearer bearerFormat: JWT type: http description: JWT access token from /auth/login (Bearer ) 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.