openapi: 3.2.0 info: title: LDM v3 Contact Lists 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: Contact Lists paths: /api/contact-lists: get: operationId: ContactListsController_findAll 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 all contact lists for the tenant tags: - Contact Lists post: operationId: ContactListsController_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/ContactListsCreateDto' responses: '201': description: '' security: - jwt: [] summary: Create a new contact list tags: - Contact Lists /api/contact-lists/{id}: patch: operationId: ContactListsController_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 requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/ContactListsUpdateDto' responses: '200': description: '' security: - jwt: [] summary: Update a contact list tags: - Contact Lists delete: operationId: ContactListsController_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 a contact list tags: - Contact Lists /api/contact-lists/reorder: post: operationId: ContactListsController_reorder 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/ContactListsReorderDto' responses: '201': description: '' security: - jwt: [] summary: Reorder contact lists by id/sortOrder array tags: - Contact Lists x-required-scope: - crm:write /api/contact-lists/{id}/contacts: post: operationId: ContactListsController_addContacts 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 requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/ContactListsAddContactsDto' responses: '201': description: '' security: - jwt: [] summary: Add contacts to a list tags: - Contact Lists delete: operationId: ContactListsController_removeContacts 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: Remove contacts from a list tags: - Contact Lists /api/contact-lists/{id}/duplicate: post: operationId: ContactListsController_duplicate 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: Duplicate a contact list tags: - Contact Lists /api/contact-lists/all-statistics: get: operationId: ContactListsController_allStatistics 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 statistics across all contact lists tags: - Contact Lists x-required-scope: - crm:read /api/contact-lists/compare: get: operationId: ContactListsController_compare parameters: - name: a required: true in: query schema: type: string - name: b 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: Compare statistics between two contact lists tags: - Contact Lists x-required-scope: - crm:read /api/contact-lists/{id}/statistics: get: operationId: ContactListsController_statistics 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 statistics for a single contact list tags: - Contact Lists components: schemas: ContactListsReorderItemDto: type: object properties: id: type: string sortOrder: type: number required: - id - sortOrder ContactListsUpdateDto: type: object properties: name: type: string description: type: string color: type: string icon: type: string type: type: string smartFilters: type: object viewConfig: type: object isPinned: type: boolean groupId: type: - object - 'null' ContactListsReorderDto: type: object properties: items: type: array items: $ref: '#/components/schemas/ContactListsReorderItemDto' required: - items ContactListsAddContactsDto: type: object properties: contactIds: type: array items: type: string required: - contactIds ContactListsCreateDto: type: object properties: name: type: string description: type: string color: type: string icon: type: string type: type: string smartFilters: type: object isPinned: type: boolean groupId: type: - object - 'null' required: - name 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.