openapi: 3.2.0 info: title: LDM v3 Marking 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: Marking paths: /api/marking/patterns: get: operationId: MarkingController_listPatterns parameters: - name: result required: true in: query schema: type: string - name: enabled 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 all marking patterns tags: - Marking x-required-scope: - marking:read post: operationId: MarkingController_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 new marking pattern tags: - Marking x-required-scope: - marking:write /api/marking/patterns/{id}/toggle: patch: operationId: MarkingController_togglePattern parameters: - name: id required: true in: path schema: type: number - 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: Enable or disable a marking pattern tags: - Marking /api/marking/patterns/{id}: delete: operationId: MarkingController_deletePattern parameters: - name: id required: true in: path schema: type: number - 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 marking pattern tags: - Marking /api/marking/classify: post: operationId: MarkingController_classify 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: Classify a message against the marking patterns tags: - Marking x-required-scope: - marking:read /api/marking/dialogs/{id}/classify: post: operationId: MarkingController_classifyDialog 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: Classify a specific dialog against the marking patterns tags: - Marking 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.