{"openapi":"3.0.0","paths":{"/v3/user-api/validate":{"get":{"description":"Validate the API key and retrieve authenticated user and organization information. Useful for verifying API key validity and checking account details.","operationId":"UserapiController_validate_v3","parameters":[{"name":"x-personal-api-key","in":"header","description":"API Key from Dashboard","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidateResponseDto"}}}}},"summary":"Validate API key and get user information","tags":["Authentication"]}},"/v3/user-api/credits":{"get":{"description":"Retrieve remaining personalization credits and email credits for the authenticated account. Monitor your usage to avoid service interruptions.","operationId":"UserapiController_credits_v3","parameters":[{"name":"x-personal-api-key","in":"header","description":"API Key from Dashboard","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditsResponseDto"}}}}},"summary":"Get available credits","tags":["Authentication"]}},"/v3/user-api/accounts":{"post":{"description":"**IMPORTANT - TWO-STEP VALIDATION PROCESS:**\n\n1. **Connection Test (SMTP/IMAP)** - Runs FIRST before creating the account. If this fails, the account is NOT created.\n2. **Delivery Test (SPF/DKIM/DMARC)** - Runs automatically in the background AFTER account creation via EmailEngine webhook.\n\n**Flow:**\n• Your request → Connection test (SMTP/IMAP verification)\n• If connection fails → Error returned, account NOT created\n• If connection passes → Account created in database\n• Account registered with EmailEngine → Triggers automatic delivery test\n• Poll GET /user-api/email-accounts/:id to monitor delivery test progress\n• Look for accountStatus=\"ready\" AND sendingStatus=\"ready\" to confirm fully operational\n\n**Expected Response Time:** Connection test: 5-10 seconds. Delivery test: 30-60 seconds (runs in background).","operationId":"EmailAccountsApiController_createEmailAccount_v3","parameters":[{"name":"x-personal-api-key","in":"header","description":"API Key from Dashboard","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateEmailAccountApiDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateEmailAccountResponseDto"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponseDto"}}}},"401":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponseDto"}}}},"409":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictResponseDto"}}}}},"summary":"Create a new email account (sending inbox)","tags":["Email Accounts"]},"get":{"description":"Retrieve all email accounts associated with your organization, with support for pagination, filtering, search, and sorting.\n\n**Filter Descriptions:**\n- `active`: Accounts with both accountStatus and sendingStatus \"ready\", no errors, and not disabled\n- `warmup`: Accounts with warmup enabled\n- `issues`: Accounts with status != \"ready\" or have errors\n- `disabled`: Accounts that are disabled\n- `all`: All accounts (default)","operationId":"EmailAccountsApiController_getEmailAccounts_v3","parameters":[{"name":"x-personal-api-key","in":"header","description":"API Key from Dashboard","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetEmailAccountsResponseDto"}}}},"401":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponseDto"}}}}},"summary":"List all connected email accounts (sending inboxes)","tags":["Email Accounts"]}},"/v3/user-api/accounts/{id}":{"get":{"description":"Get detailed information about a single email account by its ID, including configuration, status, and statistics.","operationId":"EmailAccountsApiController_getEmailAccount_v3","parameters":[{"name":"x-personal-api-key","in":"header","description":"API Key from Dashboard","required":true,"schema":{"type":"string"}},{"name":"id","required":true,"in":"path","description":"Email account ID","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetEmailAccountResponseDto"}}}},"401":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponseDto"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponseDto"}}}}},"summary":"Retrieve a specific email account's details","tags":["Email Accounts"]},"patch":{"description":"Update configuration for an existing email account, including sender name, daily limits, warmup settings, and tracking domain.","operationId":"EmailAccountsApiController_updateEmailAccount_v3","parameters":[{"name":"x-personal-api-key","in":"header","description":"API Key from Dashboard","required":true,"schema":{"type":"string"}},{"name":"id","required":true,"in":"path","description":"Email account ID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateEmailAccountApiDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateEmailAccountResponseDto"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponseDto"}}}},"401":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponseDto"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponseDto"}}}}},"summary":"Update email account settings","tags":["Email Accounts"]},"delete":{"description":"Permanently delete an email account from your organization. This action cannot be undone. Active campaigns using this account will be affected.","operationId":"EmailAccountsApiController_deleteEmailAccount_v3","parameters":[{"name":"x-personal-api-key","in":"header","description":"API Key from Dashboard","required":true,"schema":{"type":"string"}},{"name":"id","required":true,"in":"path","description":"Email account ID","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteEmailAccountResponseDto"}}}},"401":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponseDto"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponseDto"}}}},"500":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponseDto"}}}}},"summary":"Remove a connected email account (sending inbox)","tags":["Email Accounts"]}},"/v3/user-api/accounts/{id}/test-delivery":{"post":{"description":"Manually initiate a delivery test for an existing email account. The test verifies SMTP/IMAP authentication, checks SPF/DKIM/DMARC records, and sends a test email to confirm deliverability. The account will only be ready for sending if all checks pass.","operationId":"EmailAccountsApiController_triggerDeliveryTest_v3","parameters":[{"name":"x-personal-api-key","in":"header","description":"API Key from Dashboard","required":true,"schema":{"type":"string"}},{"name":"id","required":true,"in":"path","description":"Email account ID","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TriggerDeliveryTestResponseDto"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponseDto"}}}},"401":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponseDto"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponseDto"}}}}},"summary":"Trigger delivery test for email account","tags":["Email Accounts"]}},"/v3/user-api/warmup/start":{"post":{"description":"Start the warmup process for an email account to gradually build sender reputation.\n\n**Warmup Process:**\n- Gradually increases daily email volume using linear progression\n- Starts with minimum volume and ramps up to maximum over stable days period\n- Automatically manages inbox interactions to build positive reputation signals\n\n**Prerequisites:**\n- Account must be in \"ready\" state (both accountStatus and sendingStatus)\n- Account must not be disabled\n- DNS, SPF, and DMARC records must be properly configured\n\n**Configuration:**\n- `minimumWarmUpStartEmails`: Starting daily volume (default: 5, range: 1-10)\n- `maximumWarmUpPerDay`: Target daily volume (default: 30, range: 10-90)\n- `warmUpStableDays`: Days to reach maximum volume (default: 7, range: 5-30)\n\n**Error Handling:**\n- 400: Account not ready, invalid configuration, or DNS issues\n- 404: Account not found or does not belong to you\n- 409: Warmup already running for this account\n- 429: Rate limit exceeded (max 5 requests per minute)","operationId":"WarmUpApiController_startWarmup_v3","parameters":[{"name":"x-personal-api-key","in":"header","description":"API Key from Dashboard","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartWarmupApiDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WarmupStartResponseDto"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponseDto"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponseDto"}}}},"409":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictResponseDto"}}}},"429":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsResponseDto"}}}}},"summary":"Start email warmup","tags":["Warmup"]}},"/v3/user-api/warmup/stop":{"post":{"description":"Stop the warmup process for an email account.\n\n**Effects:**\n- Disables warmup for the account\n- Removes all scheduled warmup jobs from the queue\n- Preserves historical warmup statistics\n- Account remains in ready state and can be used for campaigns\n\n**Use Cases:**\n- Account has completed warmup period\n- Need to start using account for campaigns immediately\n- Account experiencing deliverability issues\n\n**Error Handling:**\n- 400: Invalid account ID format\n- 404: Account not found or does not belong to you\n- 409: Warmup not currently running for this account\n- 429: Rate limit exceeded (max 5 requests per minute)","operationId":"WarmUpApiController_stopWarmup_v3","parameters":[{"name":"x-personal-api-key","in":"header","description":"API Key from Dashboard","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StopWarmupApiDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WarmupStopResponseDto"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponseDto"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponseDto"}}}},"409":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictResponseDto"}}}},"429":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsResponseDto"}}}}},"summary":"Stop email warmup","tags":["Warmup"]}},"/v3/user-api/warmup/stats":{"get":{"description":"Retrieve aggregated warmup statistics across all email accounts.\n\n**Returned Metrics:**\n- `isInbox`: Emails that landed in inbox (positive signal)\n- `isSaved`: Emails that landed in spam/promotions\n- `isNotDelivered`: Emails that failed to deliver\n- `warmUpId`: Unique warmup session identifier\n- `accountId`: Email account ID\n\n**Filtering:**\n- Returns stats for all accounts by default\n- Use query parameter `accountIds` (comma-separated) to filter specific accounts\n\n**Use Cases:**\n- Monitor warmup health across all accounts\n- Identify accounts with deliverability issues\n- Track overall sender reputation building progress\n\n**Response Format:**\nReturns object with account IDs as keys, each containing aggregated stats.","operationId":"WarmUpApiController_getWarmupStats_v3","parameters":[{"name":"x-personal-api-key","in":"header","description":"API Key from Dashboard","required":true,"schema":{"type":"string"}},{"name":"accountIds","required":false,"in":"query","description":"Comma-separated list of account IDs to filter (optional)","schema":{"example":"65a1b2c3d4e5f6789abcdef0,65a1b2c3d4e5f6789abcdef1","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WarmupStatsResponseDto"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponseDto"}}}},"401":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponseDto"}}}},"429":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsResponseDto"}}}}},"summary":"Get warmup statistics for all accounts","tags":["Warmup"]}},"/v3/user-api/warmup/stats/{accountId}":{"get":{"description":"Retrieve day-by-day warmup statistics for a specific email account.\n\n**Returned Data:**\n- Daily breakdown of warmup email performance\n- Each day includes:\n  - `date`: Date in dd-MM-yyyy format\n  - `isInbox`: Count of emails that landed in inbox\n  - `isSaved`: Count of emails that landed in spam/promotions\n  - `isNotDelivered`: Count of emails that failed to deliver\n  - `accountId`: Email account ID\n  - `warmUpId`: Warmup session identifier\n\n**Use Cases:**\n- Track daily warmup progress for specific account\n- Identify trends and patterns in deliverability\n- Diagnose issues with specific accounts\n- Generate warmup progress reports\n\n**Response Format:**\nReturns object with dates as keys (dd-MM-yyyy format), each containing daily stats.","operationId":"WarmUpApiController_getWarmupStatsByAccount_v3","parameters":[{"name":"x-personal-api-key","in":"header","description":"API Key from Dashboard","required":true,"schema":{"type":"string"}},{"name":"accountId","required":true,"in":"path","description":"Email account MongoDB ObjectId","schema":{"example":"65a1b2c3d4e5f6789abcdef0","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WarmupDailyStatsResponseDto"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponseDto"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponseDto"}}}},"429":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsResponseDto"}}}}},"summary":"Get detailed warmup statistics for specific account","tags":["Warmup"]}},"/v3/user-api/leadlists":{"post":{"description":"Create a new empty lead list to organize your leads. Lead lists are containers that group leads for targeting in campaigns. The list can be populated later by adding leads via the leads endpoints.","operationId":"LeadlistsApiController_createLeadlist_v3","parameters":[{"name":"x-personal-api-key","in":"header","description":"API Key from Dashboard","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateLeadlistApiDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateLeadListResponseDto"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponseDto"}}}},"401":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponseDto"}}}}},"summary":"Create a new lead list","tags":["Lead Lists"]},"get":{"description":"Get a paginated list of all lead lists in your organization with optional search functionality. Includes total lead count for each list. Use pagination parameters to manage large datasets efficiently.","operationId":"LeadlistsApiController_getAllLeadlists_v3","parameters":[{"name":"x-personal-api-key","in":"header","description":"API Key from Dashboard","required":true,"schema":{"type":"string"}},{"name":"page","required":false,"in":"query","description":"Page number for pagination","schema":{"minimum":1,"default":1,"example":1,"type":"number"}},{"name":"limit","required":false,"in":"query","description":"Number of lead lists per page","schema":{"minimum":1,"maximum":100,"default":12,"example":12,"type":"number"}},{"name":"search","required":false,"in":"query","description":"Search by lead list name","schema":{"example":"Sales Prospects","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetLeadListsResponseDto"}}}},"401":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponseDto"}}}}},"summary":"Retrieve all lead lists","tags":["Lead Lists"]}},"/v3/user-api/leadlists/{id}":{"get":{"description":"Get detailed information about a single lead list by its ID, including metadata, status, and configuration. Use this to verify lead list details before using it in campaigns.","operationId":"LeadlistsApiController_getLeadlist_v3","parameters":[{"name":"x-personal-api-key","in":"header","description":"API Key from Dashboard","required":true,"schema":{"type":"string"}},{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetLeadListResponseDto"}}}},"401":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponseDto"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponseDto"}}}}},"summary":"Retrieve details of a specific lead list","tags":["Lead Lists"]},"patch":{"description":"Modify the name of an existing lead list. Only the lead list name can be updated via this endpoint. The leads within the list remain unchanged.","operationId":"LeadlistsApiController_updateLeadlist_v3","parameters":[{"name":"x-personal-api-key","in":"header","description":"API Key from Dashboard","required":true,"schema":{"type":"string"}},{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateLeadlistApiDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateLeadListResponseDto"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponseDto"}}}},"401":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponseDto"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponseDto"}}}}},"summary":"Update an existing lead list","tags":["Lead Lists"]},"delete":{"description":"Permanently delete a lead list and stop all associated leads from receiving campaign emails. This action cannot be undone. Any campaigns using this lead list will be automatically marked as deleted.","operationId":"LeadlistsApiController_deleteLeadlist_v3","parameters":[{"name":"x-personal-api-key","in":"header","description":"API Key from Dashboard","required":true,"schema":{"type":"string"}},{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteLeadListResponseDto"}}}},"401":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponseDto"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponseDto"}}}}},"summary":"Delete a lead list","tags":["Lead Lists"]}},"/v3/user-api/create-leadlist":{"post":{"deprecated":true,"description":"**⚠️ DEPRECATED:** Use `POST /user-api/leadlists` instead. This endpoint will be removed on **March 1, 2026**.\n\nCreate a new lead list to organize and manage your contacts.","operationId":"LeadlistsApiController_createLeadlistLegacy_v3","parameters":[{"name":"x-personal-api-key","in":"header","description":"API Key from Dashboard","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateLeadlistApiDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadListDto"}}}}},"summary":"[DEPRECATED] Create a new lead list","tags":["Lead Lists"]}},"/v3/user-api/leadlists-all":{"get":{"deprecated":true,"description":"**⚠️ DEPRECATED:** Use `GET /user-api/leadlists` instead for paginated results. This endpoint will be removed on **March 1, 2026**.\n\nReturns all lead lists without pagination.","operationId":"LeadlistsApiController_leadlistsLegacy_v3","parameters":[{"name":"x-personal-api-key","in":"header","description":"API Key from Dashboard","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/LeadListDto"}}}}}},"summary":"[DEPRECATED] List all lead lists (unpaginated)","tags":["Lead Lists"]}},"/v3/user-api/leads":{"post":{"description":"Add multiple leads to a lead list. Each lead requires an email address and lead list ID. Supports duplicate detection and comprehensive contact information including custom variables and personalization data.","operationId":"LeadsApiController_createLeadsRESTful_v3","parameters":[{"name":"x-personal-api-key","in":"header","description":"API Key from Dashboard","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateLeadsApiDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateLeadsResponseDto"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponseDto"}}}},"401":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponseDto"}}}}},"summary":"Create new leads in bulk","tags":["Leads"]}},"/v3/user-api/leads/{leadListId}":{"get":{"description":"Retrieve all leads associated with a specific lead list ID with support for pagination, search, and status filtering. Returns comprehensive lead information including engagement metrics and custom variables.","operationId":"LeadsApiController_getLeadsByLeadlist_v3","parameters":[{"name":"x-personal-api-key","in":"header","description":"API Key from Dashboard","required":true,"schema":{"type":"string"}},{"name":"leadListId","required":true,"in":"path","schema":{"type":"string"}},{"name":"page","required":false,"in":"query","description":"Page number for pagination","schema":{"minimum":1,"default":1,"example":1,"type":"number"}},{"name":"limit","required":false,"in":"query","description":"Number of leads per page","schema":{"minimum":1,"maximum":100,"default":40,"example":40,"type":"number"}},{"name":"search","required":false,"in":"query","description":"Search by email, first name, or last name","schema":{"example":"john","type":"string"}},{"name":"status","required":false,"in":"query","description":"Filter by lead status","schema":{"example":"bounced","type":"string","enum":["bounced","clicked","opened","replied","stopped","unsubscribed"]}},{"description":"Page number for pagination","required":false,"name":"page","in":"query","schema":{"minimum":1,"default":1,"example":1,"type":"number"}},{"description":"Number of leads per page","required":false,"name":"limit","in":"query","schema":{"minimum":1,"maximum":100,"default":40,"example":40,"type":"number"}},{"description":"Search by email, first name, or last name","required":false,"name":"search","in":"query","schema":{"example":"john","type":"string"}},{"description":"Filter by lead status","required":false,"name":"status","in":"query","schema":{"example":"bounced","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetLeadsResponseDto"}}}},"401":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponseDto"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponseDto"}}}}},"summary":"List all leads from a lead list","tags":["Leads"]}},"/v3/user-api/leads/{leadListId}/{id}":{"get":{"description":"Get detailed information about a single lead by its ID, including contact details, engagement history, email metrics, and custom variables. Useful for checking individual lead status and information.","operationId":"LeadsApiController_getLeadById_v3","parameters":[{"name":"x-personal-api-key","in":"header","description":"API Key from Dashboard","required":true,"schema":{"type":"string"}},{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetLeadResponseDto"}}}},"401":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponseDto"}}}},"403":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenResponseDto"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponseDto"}}}}},"summary":"Retrieve a specific lead by ID","tags":["Leads"]}},"/v3/user-api/leads/{id}":{"patch":{"description":"Modify lead information including contact details, custom variables, status, and other metadata. All fields are optional - only provide the fields you want to update. Useful for keeping lead data up-to-date during campaigns.","operationId":"LeadsApiController_updateLeadRESTful_v3","parameters":[{"name":"x-personal-api-key","in":"header","description":"API Key from Dashboard","required":true,"schema":{"type":"string"}},{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateLeadApiDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateLeadResponseDto"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponseDto"}}}},"401":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponseDto"}}}},"403":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenResponseDto"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponseDto"}}}}},"summary":"Update an existing lead","tags":["Leads"]},"delete":{"description":"Permanently delete a lead from your organization (soft delete). The lead will be marked as deleted and excluded from all campaigns. This action cannot be undone.","operationId":"LeadsApiController_deleteLeadRESTful_v3","parameters":[{"name":"x-personal-api-key","in":"header","description":"API Key from Dashboard","required":true,"schema":{"type":"string"}},{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteLeadResponseDto"}}}},"401":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponseDto"}}}},"403":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenResponseDto"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponseDto"}}}}},"summary":"Delete a lead","tags":["Leads"]}},"/v3/user-api/create-leads":{"post":{"deprecated":true,"description":"**⚠️ DEPRECATED:** Use `POST /user-api/leads` instead. This endpoint will be removed on **March 1, 2026**.\n\nAdd multiple leads to a lead list with support for duplicate detection and custom variables.","operationId":"LeadsApiController_createLeads_v3","parameters":[{"name":"x-personal-api-key","in":"header","description":"API Key from Dashboard","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateLeadsApiDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkLeadCreationDataDto"}}}}},"summary":"[DEPRECATED] Create new leads in bulk","tags":["Leads"]}},"/v3/user-api/lead/{leadId}":{"get":{"deprecated":true,"description":"**⚠️ DEPRECATED:** Use `GET /user-api/leads/:leadListId/:id` instead. This endpoint will be removed on **March 1, 2026**.\n\nRetrieve detailed information about a single lead.","operationId":"LeadsApiController_getLead_v3","parameters":[{"name":"x-personal-api-key","in":"header","description":"API Key from Dashboard","required":true,"schema":{"type":"string"}},{"name":"leadId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadDto"}}}}},"summary":"[DEPRECATED] Get a specific lead by ID","tags":["Leads"]}},"/v3/user-api/update-lead":{"patch":{"deprecated":true,"description":"**⚠️ DEPRECATED:** Use `PATCH /user-api/leads/:id` instead. This endpoint will be removed on **March 1, 2026**.\n\nModify lead information including contact details and custom variables.","operationId":"LeadsApiController_updateLead_v3","parameters":[{"name":"x-personal-api-key","in":"header","description":"API Key from Dashboard","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string"}}}}},"summary":"[DEPRECATED] Update an existing lead","tags":["Leads"]}},"/v3/user-api/personalization/generate":{"post":{"description":"Generate personalized email content from a LinkedIn profile or website URL. Automatically detects URL type and uses appropriate personalization strategy. Consumes 1 personalization credit.","operationId":"PersonalizationApiController_generatePersonalization_v3","parameters":[{"name":"x-personal-api-key","in":"header","description":"API Key from Dashboard","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeneratePersonalizationDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonalizationResponseDto"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponseDto"}}}},"401":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponseDto"}}}},"500":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponseDto"}}}}},"summary":"Generate AI personalization from a single URL","tags":["Personalization"]}},"/v3/user-api/personalization/generate-advanced":{"post":{"description":"Generate comprehensive personalization using both LinkedIn profile and company website. Provides richer context by combining professional background with company information. Consumes 2 credits if both URLs provided, 1 credit if only one URL provided.","operationId":"PersonalizationApiController_generateAdvancedPersonalization_v3","parameters":[{"name":"x-personal-api-key","in":"header","description":"API Key from Dashboard","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateAdvancedPersonalizationDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdvancedPersonalizationResponseDto"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponseDto"}}}},"401":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponseDto"}}}},"500":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponseDto"}}}}},"summary":"Generate advanced AI personalization from LinkedIn and Website","tags":["Personalization"]}},"/v3/user-api/personalization/lead/{leadId}":{"post":{"description":"Generate AI-powered personalization for an existing lead using their stored LinkedIn and/or website URLs. Updates the lead's personalization field automatically. Specify source to control which URLs to use. Accepted values: 'linkedin', 'website', or 'both'.","operationId":"PersonalizationApiController_personalizeLead_v3","parameters":[{"name":"x-personal-api-key","in":"header","description":"API Key from Dashboard","required":true,"schema":{"type":"string"}},{"name":"leadId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonalizeLeadDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadPersonalizationResponseDto"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponseDto"}}}},"401":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponseDto"}}}},"403":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenResponseDto"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponseDto"}}}}},"summary":"Generate personalization for a specific lead","tags":["Personalization"]}},"/v3/user-api/personalization/leadlist/{leadListId}":{"post":{"description":"Generate AI-powered personalization for all leads in a lead list. This is an asynchronous operation that queues personalization jobs for processing. Use isOnlyMissing=true to only personalize leads without existing personalization. Credits are consumed as leads are processed.","operationId":"PersonalizationApiController_personalizeLeadList_v3","parameters":[{"name":"x-personal-api-key","in":"header","description":"API Key from Dashboard","required":true,"schema":{"type":"string"}},{"name":"leadListId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonalizeLeadListDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadListPersonalizationResponseDto"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponseDto"}}}},"401":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponseDto"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponseDto"}}}}},"summary":"Bulk personalize all leads in a lead list","tags":["Personalization"]}},"/v3/user-api/get-personalization":{"post":{"deprecated":true,"description":"**⚠️ DEPRECATED:** Use `POST /user-api/personalization/generate` instead. This endpoint will be removed on **March 1, 2026**.\n\nGenerate personalized email content using AI based on a prospect URL (LinkedIn, website, etc.). Returns customized icebreakers and talking points for outreach.","operationId":"PersonalizationApiController_getPersonalization_v3","parameters":[{"name":"x-personal-api-key","in":"header","description":"API Key from Dashboard","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeneratePersonalizationDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeprecatedPersonalizationResponseDto"}}}}},"summary":"[DEPRECATED] Generate AI-powered personalization","tags":["Personalization"]}},"/v3/user-api/do-not-contacts":{"post":{"description":"Add one or multiple email addresses and domains to your Do Not Contact (suppression) list. Supports 1-2000 entries per request. Duplicates are skipped automatically.","operationId":"DoNotContactApiController_createDNCBatch_v3","parameters":[{"name":"x-personal-api-key","in":"header","description":"API Key from Dashboard","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDNCBatchDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddDNCEntriesResponseDto"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponseDto"}}}},"401":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponseDto"}}}}},"summary":"Add entries to Do Not Contact list","tags":["Do Not Contact"]},"get":{"description":"Retrieve a paginated list of Do Not Contact entries with optional filtering by type, reason, and search term.","operationId":"DoNotContactApiController_listDNCEntries_v3","parameters":[{"name":"x-personal-api-key","in":"header","description":"API Key from Dashboard","required":true,"schema":{"type":"string"}},{"name":"type","required":false,"in":"query","description":"Filter by type","schema":{"type":"string","enum":["email","domain"]}},{"name":"reason","required":false,"in":"query","description":"Filter by reason","schema":{"type":"string","enum":["unsubscribe","bounce","spam_complaint","manual","invalid","other"]}},{"name":"search","required":false,"in":"query","description":"Search by value (partial match)","schema":{"example":"example.com","type":"string"}},{"name":"page","required":false,"in":"query","description":"Page number (1-indexed)","schema":{"minimum":1,"default":1,"example":1,"type":"number"}},{"name":"limit","required":false,"in":"query","description":"Items per page","schema":{"minimum":1,"maximum":1000,"default":100,"example":100,"type":"number"}},{"name":"sortBy","required":false,"in":"query","description":"Sort field","schema":{"default":"createdAt","type":"string","enum":["createdAt","value","type","reason"]}},{"name":"sortOrder","required":false,"in":"query","description":"Sort order","schema":{"default":"desc","type":"string","enum":["asc","desc"]}},{"description":"Filter by type","required":false,"name":"type","in":"query","schema":{"type":"string"}},{"description":"Filter by reason","required":false,"name":"reason","in":"query","schema":{"type":"string"}},{"description":"Search by value (partial match)","required":false,"name":"search","in":"query","schema":{"example":"example.com","type":"string"}},{"description":"Page number (1-indexed)","required":false,"name":"page","in":"query","schema":{"minimum":1,"default":1,"example":1,"type":"number"}},{"description":"Items per page","required":false,"name":"limit","in":"query","schema":{"minimum":1,"maximum":1000,"default":100,"example":100,"type":"number"}},{"description":"Sort field","required":false,"name":"sortBy","in":"query","schema":{"default":"createdAt","type":"string"}},{"description":"Sort order","required":false,"name":"sortOrder","in":"query","schema":{"default":"desc","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetDNCListResponseDto"}}}},"401":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponseDto"}}}}},"summary":"List Do Not Contact entries","tags":["Do Not Contact"]}},"/v3/user-api/do-not-contact/upload":{"post":{"description":"Upload a CSV or TXT file containing email addresses or domains (one per line) to add to your Do Not Contact list. All entries will use the same reason and notes.","operationId":"DoNotContactApiController_uploadDNCFile_v3","parameters":[{"name":"x-personal-api-key","in":"header","description":"API Key from Dashboard","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/UploadDNCFileDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadDNCFileResponseDto"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponseDto"}}}},"401":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponseDto"}}}}},"summary":"Upload Do Not Contact list from file","tags":["Do Not Contact"]}},"/v3/user-api/do-not-contacts/{id}":{"delete":{"description":"Remove a specific entry from the Do Not Contact list by ID.","operationId":"DoNotContactApiController_deleteDNCEntry_v3","parameters":[{"name":"x-personal-api-key","in":"header","description":"API Key from Dashboard","required":true,"schema":{"type":"string"}},{"name":"id","required":true,"in":"path","description":"DNC entry ID","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteDNCEntryResponseDto"}}}},"401":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponseDto"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponseDto"}}}}},"summary":"Delete a Do Not Contact entry","tags":["Do Not Contact"]}},"/v3/user-api/do-not-contacts/check":{"post":{"description":"Check if a specific email address is blocked by the Do Not Contact list (either directly or by domain).","operationId":"DoNotContactApiController_checkDNCBlocked_v3","parameters":[{"name":"x-personal-api-key","in":"header","description":"API Key from Dashboard","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckDNCDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckDNCResponseDto"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponseDto"}}}},"401":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponseDto"}}}}},"summary":"Check if an email is blocked","tags":["Do Not Contact"]}},"/v3/user-api/mail-campaigns":{"post":{"description":"Create a new email campaign with multi-step sequences and A/B test variations.\n\n**Key Features:**\n- Multi-step email sequences with wait times\n- A/B testing with multiple variations per step\n- Schedule configuration (days, hours, timezone)\n- Behavioral triggers (stop on reply/click)\n- Tracking and deliverability settings","operationId":"CampaignsApiController_createMailCampaign_v3","parameters":[{"name":"x-personal-api-key","in":"header","description":"API Key from Dashboard","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateMailcampaignDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCampaignResponseDto"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponseDto"}}}},"401":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponseDto"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponseDto"}}}},"409":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictResponseDto"}}}}},"summary":"Create new campaign","tags":["Campaigns"]},"get":{"description":"Retrieve paginated list of campaigns with filtering and sorting.\n\n**Filters:**\n- status: active, paused, completed, archived, all\n- nameContains: Search by campaign name\n- emailAccountId: Filter by email account\n- leadlistId: Filter by lead list\n- tag: Filter by tag\n- createdFrom/To: Date range filter","operationId":"CampaignsApiController_listMailCampaigns_v3","parameters":[{"name":"x-personal-api-key","in":"header","description":"API Key from Dashboard","required":true,"schema":{"type":"string"}},{"name":"page","required":false,"in":"query","description":"Page number (1-indexed)","schema":{"minimum":1,"example":1,"type":"number"}},{"name":"limit","required":false,"in":"query","description":"Items per page","schema":{"minimum":1,"maximum":100,"example":20,"type":"number"}},{"name":"status","required":false,"in":"query","description":"Filter by campaign status","schema":{"example":"active","type":"string","enum":["all","active","paused","completed","archived"]}},{"name":"nameContains","required":false,"in":"query","description":"Search by campaign name (case-insensitive)","schema":{"example":"Q1 Outreach","type":"string"}},{"name":"emailAccountId","required":false,"in":"query","description":"Filter by email account ID","schema":{"example":"65a1b2c3d4e5f6789abcdef0","type":"string"}},{"name":"leadlistId","required":false,"in":"query","description":"Filter by lead list ID","schema":{"example":"65a1b2c3d4e5f6789abcdef1","type":"string"}},{"name":"tag","required":false,"in":"query","description":"Filter by tag","schema":{"example":"q1-2025","type":"string"}},{"name":"createdFrom","required":false,"in":"query","description":"Created after date (ISO 8601)","schema":{"example":"2025-01-01T00:00:00Z","type":"string"}},{"name":"createdTo","required":false,"in":"query","description":"Created before date (ISO 8601)","schema":{"example":"2025-12-31T23:59:59Z","type":"string"}},{"name":"sortBy","required":false,"in":"query","description":"Sort field","schema":{"example":"createdAt","type":"string","enum":["createdAt","updatedAt","name"]}},{"name":"sortOrder","required":false,"in":"query","description":"Sort order","schema":{"example":"desc","type":"string","enum":["asc","desc"]}},{"description":"Page number (1-indexed)","required":false,"name":"page","in":"query","schema":{"minimum":1,"example":1,"type":"number"}},{"description":"Items per page","required":false,"name":"limit","in":"query","schema":{"minimum":1,"maximum":100,"example":20,"type":"number"}},{"description":"Filter by campaign status","required":false,"name":"status","in":"query","schema":{"example":"active","type":"string"}},{"description":"Search by campaign name (case-insensitive)","required":false,"name":"nameContains","in":"query","schema":{"example":"Q1 Outreach","type":"string"}},{"description":"Filter by email account ID","required":false,"name":"emailAccountId","in":"query","schema":{"example":"65a1b2c3d4e5f6789abcdef0","type":"string"}},{"description":"Filter by lead list ID","required":false,"name":"leadlistId","in":"query","schema":{"example":"65a1b2c3d4e5f6789abcdef1","type":"string"}},{"description":"Filter by tag","required":false,"name":"tag","in":"query","schema":{"example":"q1-2025","type":"string"}},{"description":"Created after date (ISO 8601)","required":false,"name":"createdFrom","in":"query","schema":{"example":"2025-01-01T00:00:00Z","type":"string"}},{"description":"Created before date (ISO 8601)","required":false,"name":"createdTo","in":"query","schema":{"example":"2025-12-31T23:59:59Z","type":"string"}},{"description":"Sort field","required":false,"name":"sortBy","in":"query","schema":{"example":"createdAt","type":"string"}},{"description":"Sort order","required":false,"name":"sortOrder","in":"query","schema":{"example":"desc","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetCampaignsResponseDto"}}}},"401":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponseDto"}}}}},"summary":"List campaigns","tags":["Campaigns"]}},"/v3/user-api/mail-campaigns/{id}":{"get":{"description":"Retrieve detailed information about a specific campaign including sequences, settings, and current state.","operationId":"CampaignsApiController_getMailCampaign_v3","parameters":[{"name":"x-personal-api-key","in":"header","description":"API Key from Dashboard","required":true,"schema":{"type":"string"}},{"name":"id","required":true,"in":"path","description":"Campaign MongoDB ObjectId","schema":{"example":"65a1b2c3d4e5f6789abcdef2","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetCampaignResponseDto"}}}},"401":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponseDto"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponseDto"}}}}},"summary":"Get campaign details","tags":["Campaigns"]},"patch":{"description":"Partially update campaign configuration, settings, sequences, and state. Supports all updates including: campaign settings, sequences/variations, pause/resume (isPaused), archive (isArchived), completion (isCompleted), and email account membership (userEmailAccounts). Note: leadList field is immutable and cannot be updated.","operationId":"CampaignsApiController_updateMailCampaign_v3","parameters":[{"name":"x-personal-api-key","in":"header","description":"API Key from Dashboard","required":true,"schema":{"type":"string"}},{"name":"id","required":true,"in":"path","description":"Campaign MongoDB ObjectId","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateMailcampaignDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCampaignResponseDto"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponseDto"}}}},"401":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponseDto"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponseDto"}}}},"422":{"description":"Invalid field"}},"summary":"Update campaign","tags":["Campaigns"]},"delete":{"description":"Soft delete campaign. The campaign will be marked as deleted and stopped, but data will be retained.","operationId":"CampaignsApiController_deleteMailCampaign_v3","parameters":[{"name":"x-personal-api-key","in":"header","description":"API Key from Dashboard","required":true,"schema":{"type":"string"}},{"name":"id","required":true,"in":"path","description":"Campaign MongoDB ObjectId","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteCampaignResponseDto"}}}},"401":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponseDto"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponseDto"}}}}},"summary":"Delete campaign (soft delete)","tags":["Campaigns"]}},"/v3/user-api/create-campaign":{"post":{"deprecated":true,"description":"**⚠️ DEPRECATED:** Use `POST /user-api/mail-campaigns` instead. This endpoint will be removed on **March 1, 2026**.\n\nCreates a new email marketing campaign with specified sequences, targeting, and configuration.","operationId":"CampaignsApiController_createCampaign_v3","parameters":[{"name":"x-personal-api-key","in":"header","description":"API Key from Dashboard","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCampaignRequestDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCampaignResponseDto"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponseDto"}}}},"401":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponseDto"}}}}},"summary":"[DEPRECATED] Create a new email campaign","tags":["Campaigns"]}},"/v3/user-api/receivedreplies/filter":{"get":{"description":"Retrieve received replies with filtering and pagination support.","operationId":"ReceivedRepliesApiController_filterReceivedReplies_v3","parameters":[{"name":"x-personal-api-key","in":"header","description":"API Key from Dashboard","required":true,"schema":{"type":"string"}},{"name":"campaignId","required":false,"in":"query","description":"Filter by campaign ID","schema":{"example":"65a1b2c3d4e5f6789abcdef1","type":"string"}},{"name":"leadListId","required":false,"in":"query","description":"Filter by lead list ID","schema":{"example":"65a1b2c3d4e5f6789abcdef3","type":"string"}},{"name":"senderEmail","required":false,"in":"query","description":"Filter by sender email address","schema":{"example":"sender@example.com","type":"string"}},{"name":"leadStatus","required":false,"in":"query","description":"Filter by lead status","schema":{"example":"replied","type":"string"}},{"name":"sentiment","required":false,"in":"query","description":"Filter by reply sentiment","schema":{"example":"positive","type":"string","enum":["positive","negative","neutral","can not determine"]}},{"name":"limit","required":false,"in":"query","description":"Number of records per page (maximum 100)","schema":{"minimum":1,"maximum":100,"default":10,"example":10,"type":"number"}},{"name":"page","required":false,"in":"query","description":"Page number for pagination","schema":{"minimum":1,"default":1,"example":1,"type":"number"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReceivedRepliesResponseDto"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponseDto"}}}},"401":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponseDto"}}}}},"summary":"Filter received replies","tags":["Received Replies"]}}},"info":{"title":"Nureply API","description":"","version":"3.1","contact":{}},"tags":[],"servers":[],"components":{"schemas":{"User":{"type":"object","properties":{"email":{"type":"string","example":"john@doe.com"},"first_name":{"type":"string","example":"John"},"last_name":{"type":"string","example":"Doe"},"currentPackage":{"type":"string","example":"full_access","enum":["free","starter","pro","growth","only_email","only_email_yearly","full_access","full_access_yearly"]},"remaining_credits":{"type":"number","example":1337},"remaining_email_credits":{"type":"number","example":1337}},"required":["email","first_name","last_name","currentPackage","remaining_credits","remaining_email_credits"]},"ValidateResponseDto":{"type":"object","properties":{"user":{"$ref":"#/components/schemas/User"},"organization":{"type":"object"}},"required":["user","organization"]},"CreditsDataDto":{"type":"object","properties":{"personalizationCredits":{"type":"number","example":80085,"description":"Remaining personalization credits"},"emailCredits":{"type":"number","example":99999999999,"description":"Remaining email credits"}},"required":["personalizationCredits","emailCredits"]},"CreditsResponseDto":{"type":"object","properties":{"credits":{"$ref":"#/components/schemas/CreditsDataDto"}},"required":["credits"]},"CreateEmailAccountApiDto":{"type":"object","properties":{"address":{"type":"string","description":"Email address of the account","example":"sender@example.com","format":"email"},"password":{"type":"string","description":"Email account password (used for both IMAP and SMTP)","example":"securePassword123","minLength":3},"smtpPassword":{"type":"string","description":"SMTP password (if different from main password). Required if smtpUsername is provided.","example":"smtpPassword123","minLength":3},"smtpUsername":{"type":"string","description":"SMTP username (if different from email address). Optional.","example":"sender@example.com"},"imapServer":{"type":"string","description":"IMAP server hostname","example":"imap.gmail.com","pattern":"^[a-zA-Z0-9]([a-zA-Z0-9\\-\\.]+\\.)+[a-zA-Z0-9]{2,}$"},"imapPort":{"type":"integer","description":"IMAP port number (common: 993 for SSL, 143 for TLS)","example":993,"minimum":1,"maximum":65535},"smtpServer":{"type":"string","description":"SMTP server hostname","example":"smtp.gmail.com","pattern":"^[a-zA-Z0-9]([a-zA-Z0-9\\-\\.]+\\.)+[a-zA-Z0-9]{2,}$"},"smtpPort":{"type":"integer","description":"SMTP port number (common: 465 for SSL, 587 for TLS, 25 for plain)","example":465,"minimum":1,"maximum":65535},"senderName":{"type":"string","description":"Display name that appears in the \"From\" field of sent emails","example":"John Doe","minLength":2},"trackingDomain":{"type":"string","description":"Custom tracking domain for email opens/clicks. Must be configured with CNAME.","example":"track.example.com","pattern":"^[a-zA-Z0-9]([a-zA-Z0-9\\-\\.]+\\.)+[a-zA-Z0-9]{2,}$"},"security":{"type":"string","description":"Security protocol for connections","example":"TLS","enum":["TLS","STARTTLS"]},"dailySendingLimit":{"type":"integer","description":"Maximum number of emails this account can send per day","example":50,"minimum":1,"maximum":100},"signature":{"type":"string","description":"Email signature to append to all outgoing emails","example":"Best regards,<br>John Doe<br>CEO, Example Inc."},"maximumWarmUpPerDay":{"type":"integer","description":"Maximum warmup emails to send per day","example":30,"minimum":1,"maximum":90},"minimumWarmUpStartEmails":{"type":"integer","description":"Starting number of warmup emails on day 1","example":5,"minimum":1,"maximum":10},"warmUpStableDays":{"type":"integer","description":"Days to reach maximum warmup volume","example":7,"minimum":1,"maximum":30},"enableWarmup":{"type":"boolean","description":"Whether to enable warmup for this account","example":true},"tags":{"description":"Tags for organizing accounts","example":["sales","outbound"],"type":"array","items":{"type":"string"}}},"required":["address","password","imapServer","imapPort","smtpServer","smtpPort","senderName"]},"WarmupDetailsDto":{"type":"object","properties":{"isEnabled":{"type":"boolean","example":false},"maximumWarmUpPerDay":{"type":"number","example":30},"minimumWarmUpStartEmails":{"type":"number","example":5},"warmUpStableDays":{"type":"number","example":7},"warmUpPerDayRemaining":{"type":"number","example":30},"warmUpStartDate":{"type":"string","example":"2023-10-20T10:30:35.624Z"}},"required":["isEnabled"]},"DnsRecordDetailsDto":{"type":"object","properties":{"status":{"type":"string","example":"pass"},"message":{"type":"string","example":"DKIM authentication passed"}},"required":["status","message"]},"TestStatusDto":{"type":"object","properties":{"status":{"type":"string","example":"pass"},"message":{"type":"string","example":"SMTP and IMAP connections verified successfully"},"imapVerified":{"type":"boolean","example":true},"smtpVerified":{"type":"boolean","example":true}},"required":["status","message"]},"DeliveryTestInstructionsDto":{"type":"object","properties":{"step1":{"type":"string","example":"Poll GET /user-api/email-accounts/653a2b0bf5444e11e5cdd1ce every 10-15 seconds"},"step2":{"type":"string","example":"Look for accountStatus=\"ready\" AND sendingStatus=\"ready\""},"step3":{"type":"string","example":"Check dkimDetails.status, spfDetails.status, dmarcDetails.status (should all be \"pass\")"},"step4":{"type":"string","example":"If status shows \"deliveryWarning\", check the error messages in dkimDetails/spfDetails/dmarcDetails for DNS configuration instructions"}},"required":["step1","step2","step3","step4"]},"DeliveryTestStatusDto":{"type":"object","properties":{"status":{"type":"string","example":"running_in_background"},"message":{"type":"string","example":"Delivery test (SPF/DKIM/DMARC verification) is running automatically via EmailEngine webhook. Poll the account details endpoint to monitor progress."},"instructions":{"$ref":"#/components/schemas/DeliveryTestInstructionsDto"},"expectedDuration":{"type":"string","example":"30-60 seconds"}},"required":["status","message","instructions","expectedDuration"]},"CreateEmailAccountDataDto":{"type":"object","properties":{"_id":{"type":"string","example":"653a2b0bf5444e11e5cdd1ce"},"address":{"type":"string","example":"sender@example.com"},"senderName":{"type":"string","example":"John Doe"},"imapServer":{"type":"string","example":"imap.example.com"},"imapPort":{"type":"number","example":993},"smtpServer":{"type":"string","example":"smtp.example.com"},"smtpPort":{"type":"number","example":465},"security":{"type":"string","example":"TLS"},"dailySendingLimit":{"type":"number","example":50},"dailySendingLimitRemaining":{"type":"number","example":35},"emailsSentToday":{"type":"number","example":15},"trackingDomain":{"type":"string","example":"track.example.com"},"trackingDomainStatus":{"type":"string","example":"active"},"accountStatus":{"type":"string","example":"ready"},"sendingStatus":{"type":"string","example":"ready"},"accountHealth":{"type":"number","example":95},"warmUpDetails":{"$ref":"#/components/schemas/WarmupDetailsDto"},"dkimDetails":{"$ref":"#/components/schemas/DnsRecordDetailsDto"},"spfDetails":{"$ref":"#/components/schemas/DnsRecordDetailsDto"},"dmarcDetails":{"$ref":"#/components/schemas/DnsRecordDetailsDto"},"tags":{"example":["sales","outbound"],"type":"array","items":{"type":"string"}},"signature":{"type":"string","example":"Best regards,<br>John Doe"},"isDisabled":{"type":"boolean","example":false},"createdAt":{"type":"string","example":"2023-10-26T10:30:35.624Z"},"updatedAt":{"type":"string","example":"2023-10-26T10:30:35.624Z"},"id":{"type":"string","example":"653a2b0bf5444e11e5cdd1ce"},"connectionTest":{"$ref":"#/components/schemas/TestStatusDto"},"deliveryTest":{"$ref":"#/components/schemas/DeliveryTestStatusDto"}},"required":["_id","address","senderName","dailySendingLimit","dailySendingLimitRemaining","accountStatus","sendingStatus","accountHealth","warmUpDetails","createdAt","id","connectionTest","deliveryTest"]},"CreateEmailAccountResponseDto":{"type":"object","properties":{"message":{"type":"string","example":"✅ Email account created successfully! Connection test passed (SMTP/IMAP verified). A delivery test for SPF/DKIM/DMARC verification is now running automatically in the background. Poll the account status endpoint to check when fully ready for sending."},"data":{"$ref":"#/components/schemas/CreateEmailAccountDataDto"}},"required":["message","data"]},"BadRequestResponseDto":{"type":"object","properties":{"statusCode":{"type":"number","example":400},"error":{"type":"string","example":"Bad Request"},"message":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"example":"Invalid request parameters"}},"required":["statusCode","error","message"]},"UnauthorizedResponseDto":{"type":"object","properties":{"statusCode":{"type":"number","example":401},"error":{"type":"string","example":"Unauthorized"},"message":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"example":"Invalid API key"}},"required":["statusCode","error","message"]},"ConflictResponseDto":{"type":"object","properties":{"statusCode":{"type":"number","example":409},"error":{"type":"string","example":"Conflict"},"message":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"example":"Resource already exists"}},"required":["statusCode","error","message"]},"EmailAccountDto":{"type":"object","properties":{"_id":{"type":"string","example":"653a2b0bf5444e11e5cdd1ce"},"address":{"type":"string","example":"sender@example.com"},"senderName":{"type":"string","example":"John Doe"},"imapServer":{"type":"string","example":"imap.example.com"},"imapPort":{"type":"number","example":993},"smtpServer":{"type":"string","example":"smtp.example.com"},"smtpPort":{"type":"number","example":465},"security":{"type":"string","example":"TLS"},"dailySendingLimit":{"type":"number","example":50},"dailySendingLimitRemaining":{"type":"number","example":35},"emailsSentToday":{"type":"number","example":15},"trackingDomain":{"type":"string","example":"track.example.com"},"trackingDomainStatus":{"type":"string","example":"active"},"accountStatus":{"type":"string","example":"ready"},"sendingStatus":{"type":"string","example":"ready"},"accountHealth":{"type":"number","example":95},"warmUpDetails":{"$ref":"#/components/schemas/WarmupDetailsDto"},"dkimDetails":{"$ref":"#/components/schemas/DnsRecordDetailsDto"},"spfDetails":{"$ref":"#/components/schemas/DnsRecordDetailsDto"},"dmarcDetails":{"$ref":"#/components/schemas/DnsRecordDetailsDto"},"tags":{"example":["sales","outbound"],"type":"array","items":{"type":"string"}},"signature":{"type":"string","example":"Best regards,<br>John Doe"},"isDisabled":{"type":"boolean","example":false},"createdAt":{"type":"string","example":"2023-10-26T10:30:35.624Z"},"updatedAt":{"type":"string","example":"2023-10-26T10:30:35.624Z"},"id":{"type":"string","example":"653a2b0bf5444e11e5cdd1ce"}},"required":["_id","address","senderName","dailySendingLimit","dailySendingLimitRemaining","accountStatus","sendingStatus","accountHealth","warmUpDetails","createdAt","id"]},"AccountCountsDto":{"type":"object","properties":{"all":{"type":"number","example":15},"active":{"type":"number","example":12},"warmup":{"type":"number","example":5},"issues":{"type":"number","example":2},"disabled":{"type":"number","example":1}},"required":["all","active","warmup","issues","disabled"]},"AccountPaginationDto":{"type":"object","properties":{"page":{"type":"number","example":1},"limit":{"type":"number","example":12},"totalPages":{"type":"number","example":2},"hasMore":{"type":"boolean","example":true}},"required":["page","limit","totalPages","hasMore"]},"GetEmailAccountsResponseDto":{"type":"object","properties":{"message":{"type":"string","example":"Retrieved email accounts successfully"},"data":{"type":"array","items":{"$ref":"#/components/schemas/EmailAccountDto"}},"total":{"type":"number","example":15},"counts":{"$ref":"#/components/schemas/AccountCountsDto"},"pagination":{"$ref":"#/components/schemas/AccountPaginationDto"}},"required":["message","data","total","counts","pagination"]},"GetEmailAccountResponseDto":{"type":"object","properties":{"message":{"type":"string","example":"Retrieved email account successfully"},"data":{"$ref":"#/components/schemas/EmailAccountDto"}},"required":["message","data"]},"NotFoundResponseDto":{"type":"object","properties":{"statusCode":{"type":"number","example":404},"error":{"type":"string","example":"Not Found"},"message":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"example":"Resource not found"}},"required":["statusCode","error","message"]},"UpdateEmailAccountApiDto":{"type":"object","properties":{"senderName":{"type":"string","description":"Display name for the sender","example":"John Doe - Updated","minLength":2},"dailySendingLimit":{"type":"integer","description":"Maximum emails per day","example":75,"minimum":1,"maximum":100},"isSlowStartEnabled":{"type":"boolean","description":"Enable gradual increase of sending limits (slow start feature)","example":false},"trackingDomain":{"type":"string","description":"Custom tracking domain","example":"track.example.com"},"signature":{"type":"string","description":"Email signature HTML","example":"Best regards,<br>John Doe"},"warmupDetails":{"description":"Warmup configuration","allOf":[{"$ref":"#/components/schemas/WarmupDetailsDto"}]},"tags":{"description":"Account organization tags","example":["sales","priority"],"type":"array","items":{"type":"string"}},"isDisabled":{"type":"boolean","description":"Disable/enable the account","example":false}}},"UpdateEmailAccountResponseDto":{"type":"object","properties":{"message":{"type":"string","example":"Updated email account successfully"},"data":{"$ref":"#/components/schemas/EmailAccountDto"}},"required":["message","data"]},"DeleteSuccessDto":{"type":"object","properties":{"success":{"type":"boolean","example":true}},"required":["success"]},"DeleteEmailAccountResponseDto":{"type":"object","properties":{"message":{"type":"string","example":"Deleted email account successfully"},"data":{"$ref":"#/components/schemas/DeleteSuccessDto"}},"required":["message","data"]},"InternalServerErrorResponseDto":{"type":"object","properties":{"statusCode":{"type":"number","example":500},"error":{"type":"string","example":"Internal Server Error"},"message":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"example":"An unexpected error occurred"}},"required":["statusCode","error","message"]},"DeliveryTestTriggerDataDto":{"type":"object","properties":{"success":{"type":"boolean","example":true},"testId":{"type":"string","example":"abc123def456"},"accountId":{"type":"string","example":"653a2b0bf5444e11e5cdd1ce"},"message":{"type":"string","example":"Delivery test in progress. Check account status to confirm when ready for sending."}},"required":["success","testId","accountId","message"]},"TriggerDeliveryTestResponseDto":{"type":"object","properties":{"message":{"type":"string","example":"Delivery test started successfully"},"data":{"$ref":"#/components/schemas/DeliveryTestTriggerDataDto"}},"required":["message","data"]},"WarmupAccountStatsDto":{"type":"object","properties":{"accountId":{"type":"string","example":"65a1b2c3d4e5f6789abcdef0","description":"The MongoDB ObjectId of the email account"},"warmUpId":{"type":"string","example":"ABCD1234","description":"Warmup session identifier"},"isInbox":{"type":"number","example":145,"description":"Number of emails that successfully landed in inbox"},"isSaved":{"type":"number","example":3,"description":"Number of emails that landed in spam/promotions folder"},"isNotDelivered":{"type":"number","example":2,"description":"Number of emails that failed to deliver"}},"required":["accountId","warmUpId","isInbox","isSaved","isNotDelivered"]},"WarmupDailyStatsDto":{"type":"object","properties":{"date":{"type":"string","example":"15-01-2025","description":"Date in dd-MM-yyyy format"},"accountId":{"type":"string","example":"65a1b2c3d4e5f6789abcdef0","description":"Email account ID"},"warmUpId":{"type":"string","example":"ABCD1234","description":"Warmup session identifier"},"isInbox":{"type":"number","example":5,"description":"Emails that landed in inbox on this day"},"isSaved":{"type":"number","example":0,"description":"Emails that landed in spam/promotions on this day"},"isNotDelivered":{"type":"number","example":0,"description":"Emails that failed to deliver on this day"}},"required":["date","accountId","warmUpId","isInbox","isSaved","isNotDelivered"]},"StartWarmupApiDto":{"type":"object","properties":{"accountId":{"type":"string","description":"Email account ID to start warmup for","example":"65a1b2c3d4e5f6789abcdef0"},"minimumWarmUpStartEmails":{"type":"number","description":"Minimum number of warmup emails to start with per day","example":5,"minimum":1,"maximum":10,"default":5},"maximumWarmUpPerDay":{"type":"number","description":"Maximum number of warmup emails per day at peak","example":30,"minimum":10,"maximum":90,"default":30},"warmUpStableDays":{"type":"number","description":"Number of days to maintain stable volume after ramp-up","example":7,"minimum":5,"maximum":30,"default":7}},"required":["accountId"]},"WarmupStartDataDto":{"type":"object","properties":{"accountId":{"type":"string","example":"65a1b2c3d4e5f6789abcdef0","description":"The MongoDB ObjectId of the email account"},"address":{"type":"string","example":"sender@example.com","description":"The email address being warmed up"},"warmUpId":{"type":"string","example":"ABCD1234","description":"Unique warmup session identifier"},"isEnabled":{"type":"boolean","example":true,"description":"Whether warmup is currently enabled"},"warmUpStartDate":{"type":"string","example":"2025-01-15T00:00:00.000Z","description":"When the warmup process started (ISO 8601 format)"},"minimumWarmUpStartEmails":{"type":"number","example":5,"description":"Starting daily email volume"},"maximumWarmUpPerDay":{"type":"number","example":30,"description":"Target maximum daily email volume"},"warmUpStableDays":{"type":"number","example":7,"description":"Number of days to reach maximum volume"}},"required":["accountId","address","warmUpId","isEnabled","warmUpStartDate","minimumWarmUpStartEmails","maximumWarmUpPerDay","warmUpStableDays"]},"WarmupStartResponseDto":{"type":"object","properties":{"message":{"type":"string","example":"Warmup started successfully"},"data":{"$ref":"#/components/schemas/WarmupStartDataDto"}},"required":["message","data"]},"TooManyRequestsResponseDto":{"type":"object","properties":{"statusCode":{"type":"number","example":429},"error":{"type":"string","example":"Too Many Requests"},"message":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"example":"Rate limit exceeded"}},"required":["statusCode","error","message"]},"StopWarmupApiDto":{"type":"object","properties":{"accountId":{"type":"string","description":"Email account ID to stop warmup for","example":"65a1b2c3d4e5f6789abcdef0"}},"required":["accountId"]},"WarmupStopDataDto":{"type":"object","properties":{"accountId":{"type":"string","example":"65a1b2c3d4e5f6789abcdef0","description":"The MongoDB ObjectId of the email account"},"address":{"type":"string","example":"sender@example.com","description":"The email address"},"isEnabled":{"type":"boolean","example":false,"description":"Warmup is now disabled"}},"required":["accountId","address","isEnabled"]},"WarmupStopResponseDto":{"type":"object","properties":{"message":{"type":"string","example":"Warmup stopped successfully"},"data":{"$ref":"#/components/schemas/WarmupStopDataDto"}},"required":["message","data"]},"WarmupStatsResponseDto":{"type":"object","properties":{"message":{"type":"string","example":"Warmup statistics retrieved successfully"},"data":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/WarmupAccountStatsDto"},"example":{"65a1b2c3d4e5f6789abcdef0":{"accountId":"65a1b2c3d4e5f6789abcdef0","warmUpId":"ABCD1234","isInbox":145,"isSaved":3,"isNotDelivered":2},"65a1b2c3d4e5f6789abcdef1":{"accountId":"65a1b2c3d4e5f6789abcdef1","warmUpId":"EFGH5678","isInbox":89,"isSaved":1,"isNotDelivered":0}}}},"required":["message","data"]},"WarmupDailyStatsResponseDto":{"type":"object","properties":{"message":{"type":"string","example":"Daily warmup statistics retrieved successfully"},"data":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/WarmupDailyStatsDto"},"example":{"15-01-2025":{"date":"15-01-2025","accountId":"65a1b2c3d4e5f6789abcdef0","warmUpId":"ABCD1234","isInbox":5,"isSaved":0,"isNotDelivered":0},"16-01-2025":{"date":"16-01-2025","accountId":"65a1b2c3d4e5f6789abcdef0","warmUpId":"ABCD1234","isInbox":8,"isSaved":0,"isNotDelivered":0}}}},"required":["message","data"]},"CreateLeadlistApiDto":{"type":"object","properties":{"name":{"type":"string","description":"Name of the lead list","example":"Sales Prospects Q1 2024","minLength":1,"maxLength":255}},"required":["name"]},"LeadListDto":{"type":"object","properties":{"_id":{"type":"string","example":"653a495d3aa5012aa12f67b4"},"userId":{"type":"string","example":"62878b4e647d7bd25db029a3"},"organization":{"type":"string","example":"62878b4e647d7bd25db029a3"},"file_name":{"type":"string","example":"Sales Prospects Q1 2024"},"status":{"type":"string","example":"Uploaded"},"statusMessage":{"type":"string","example":"Processing leads..."},"processingCount":{"type":"number","example":150},"isUsedInCampaign":{"type":"boolean","example":false},"createdAt":{"type":"string","example":"2023-10-26T11:11:25.365Z"},"updatedAt":{"type":"string","example":"2023-10-26T11:11:25.365Z"},"id":{"type":"string","example":"653a495d3aa5012aa12f67b4"}},"required":["_id","file_name","status","isUsedInCampaign","createdAt","updatedAt","id"]},"CreateLeadListResponseDto":{"type":"object","properties":{"message":{"type":"string","example":"Lead list created successfully"},"data":{"$ref":"#/components/schemas/LeadListDto"}},"required":["message","data"]},"GetLeadListsResponseDto":{"type":"object","properties":{"message":{"type":"string","example":"Retrieved lead lists successfully"},"data":{"type":"array","items":{"$ref":"#/components/schemas/LeadListDto"}},"total":{"type":"number","example":25},"page":{"type":"number","example":1},"limit":{"type":"number","example":12},"totalPages":{"type":"number","example":3},"hasMore":{"type":"boolean","example":true}},"required":["message","data","total","page","limit","totalPages","hasMore"]},"GetLeadListResponseDto":{"type":"object","properties":{"message":{"type":"string","example":"Retrieved lead list successfully"},"data":{"$ref":"#/components/schemas/LeadListDto"}},"required":["message","data"]},"UpdateLeadlistApiDto":{"type":"object","properties":{"name":{"type":"string","description":"Name of the lead list","example":"Updated Sales Prospects Q1 2024","minLength":1,"maxLength":255}}},"UpdateLeadListResponseDto":{"type":"object","properties":{"message":{"type":"string","example":"Lead list updated successfully"},"data":{"$ref":"#/components/schemas/LeadListDto"}},"required":["message","data"]},"DeleteLeadListResponseDto":{"type":"object","properties":{"message":{"type":"string","example":"Lead list deleted successfully"},"data":{"$ref":"#/components/schemas/DeleteSuccessDto"}},"required":["message","data"]},"OtherVariableDto":{"type":"object","properties":{"name":{"type":"string","description":"Variable name","example":"company_size"},"value":{"type":"string","description":"Variable value","example":"50-200 employees"}},"required":["name","value"]},"CreateSingleLeadDto":{"type":"object","properties":{"address":{"type":"string","description":"Email address of the lead (required)","example":"john.doe@example.com"},"firstName":{"type":"string","description":"First name of the lead","example":"John","minLength":1,"maxLength":100},"lastName":{"type":"string","description":"Last name of the lead","example":"Doe","minLength":1,"maxLength":100},"companyName":{"type":"string","description":"Company name","example":"Acme Corporation","maxLength":200},"linkedInUrl":{"type":"string","description":"LinkedIn profile URL","example":"https://linkedin.com/in/johndoe"},"websiteUrl":{"type":"string","description":"Website URL","example":"https://example.com"},"personalization":{"type":"string","description":"AI-generated personalization text for the lead","example":"I noticed your recent article about cloud infrastructure...","maxLength":1000},"otherVariables":{"description":"Custom variables as key-value pairs","example":[{"name":"industry","value":"Technology"},{"name":"company_size","value":"50-200"}],"type":"array","items":{"$ref":"#/components/schemas/OtherVariableDto"}},"leadListId":{"type":"string","description":"Lead list ID to associate this lead with (required)","example":"653a495d3aa5012aa12f67b4"}},"required":["address","leadListId"]},"CreateLeadsApiDto":{"type":"object","properties":{"leads":{"description":"Array of leads to create","example":[{"address":"john.doe@example.com","firstName":"John","lastName":"Doe","companyName":"Acme Corporation","linkedInUrl":"https://linkedin.com/in/johndoe","websiteUrl":"https://example.com","personalization":"I noticed your recent article...","leadListId":"653a495d3aa5012aa12f67b4","otherVariables":[{"name":"industry","value":"Technology"}]}],"type":"array","items":{"$ref":"#/components/schemas/CreateSingleLeadDto"}},"skipDuplicates":{"type":"boolean","description":"Skip duplicate email addresses (default: true)","example":true,"default":true}},"required":["leads"]},"LeadDto":{"type":"object","properties":{"address":{"type":"string","example":"john.doe@example.com"},"firstName":{"type":"string","example":"John"},"lastName":{"type":"string","example":"Doe"},"companyName":{"type":"string","example":"Acme Corporation"},"linkedInUrl":{"type":"string","example":"https://linkedin.com/in/johndoe"},"websiteUrl":{"type":"string","example":"https://example.com"},"personalization":{"type":"string","example":"I noticed your recent article about cloud infrastructure..."},"domain":{"type":"string","example":"example.com"},"notes":{"example":[],"type":"array","items":{"type":"string"}},"otherVariables":{"type":"array","items":{"$ref":"#/components/schemas/OtherVariableDto"}},"completedStepIds":{"example":[],"type":"array","items":{"type":"string"}},"receivedEmails":{"example":[],"type":"array","items":{"type":"string"}},"leadListId":{"type":"string","example":"653a2b0bf5444e11e5cdd1ce"},"owner":{"type":"string","example":"62878b4e647d7bd25db029a3"},"replied":{"type":"boolean","example":false},"opened":{"type":"boolean","example":false},"clicked":{"type":"boolean","example":false},"bounced":{"type":"boolean","example":false},"stopped":{"type":"boolean","example":false},"isDeleted":{"type":"boolean","example":false},"_id":{"type":"string","example":"653a45e0b2a95af9259031d5"},"nextSendingDate":{"type":"string","example":"2023-10-26T10:56:32.468Z"},"createdAt":{"type":"string","example":"2023-10-26T10:56:32.624Z"},"updatedAt":{"type":"string","example":"2023-10-26T10:56:32.624Z"},"id":{"type":"string","example":"653a45e0b2a95af9259031d5"}},"required":["address","domain","notes","completedStepIds","receivedEmails","leadListId","owner","replied","opened","clicked","bounced","stopped","isDeleted","_id","nextSendingDate","createdAt","updatedAt","id"]},"BulkLeadCreationDataDto":{"type":"object","properties":{"acceptedCount":{"type":"number","example":1,"description":"Number of leads successfully created"},"rejectedCount":{"type":"number","example":0,"description":"Number of leads rejected (duplicates or errors)"},"result":{"description":"Array of created lead objects","type":"array","items":{"$ref":"#/components/schemas/LeadDto"}}},"required":["acceptedCount","rejectedCount","result"]},"CreateLeadsResponseDto":{"type":"object","properties":{"message":{"type":"string","example":"Leads created successfully"},"data":{"$ref":"#/components/schemas/BulkLeadCreationDataDto"}},"required":["message","data"]},"GetLeadsResponseDto":{"type":"object","properties":{"message":{"type":"string","example":"Retrieved leads successfully"},"data":{"type":"array","items":{"$ref":"#/components/schemas/LeadDto"}},"total":{"type":"number","example":150},"page":{"type":"number","example":1},"limit":{"type":"number","example":40},"totalPages":{"type":"number","example":4},"hasMore":{"type":"boolean","example":true}},"required":["message","data","total","page","limit","totalPages","hasMore"]},"GetLeadResponseDto":{"type":"object","properties":{"message":{"type":"string","example":"Retrieved lead successfully"},"data":{"$ref":"#/components/schemas/LeadDto"}},"required":["message","data"]},"ForbiddenResponseDto":{"type":"object","properties":{"statusCode":{"type":"number","example":403},"error":{"type":"string","example":"Forbidden"},"message":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"example":"You do not have permission to access this resource"}},"required":["statusCode","error","message"]},"UpdateLeadApiDto":{"type":"object","properties":{"firstName":{"type":"string","description":"First name of the lead","example":"John","minLength":1,"maxLength":100},"lastName":{"type":"string","description":"Last name of the lead","example":"Doe","minLength":1,"maxLength":100},"companyName":{"type":"string","description":"Company name","example":"Acme Corporation","maxLength":200},"linkedInUrl":{"type":"string","description":"LinkedIn profile URL","example":"https://linkedin.com/in/johndoe"},"websiteUrl":{"type":"string","description":"Website URL","example":"https://example.com"},"personalization":{"type":"string","description":"AI-generated personalization text","example":"I noticed your recent article about cloud infrastructure...","maxLength":1000},"otherVariables":{"description":"Custom variables as key-value pairs","example":[{"name":"industry","value":"Technology"},{"name":"company_size","value":"50-200"}],"type":"array","items":{"$ref":"#/components/schemas/OtherVariableDto"}},"status":{"type":"string","description":"Lead status","example":"contacted"}}},"UpdateLeadResponseDto":{"type":"object","properties":{"message":{"type":"string","example":"Lead updated successfully"},"data":{"$ref":"#/components/schemas/LeadDto"}},"required":["message","data"]},"DeleteLeadResponseDto":{"type":"object","properties":{"message":{"type":"string","example":"Lead deleted successfully"},"data":{"$ref":"#/components/schemas/DeleteSuccessDto"}},"required":["message","data"]},"GeneratePersonalizationDto":{"type":"object","properties":{"writingStyle":{"type":"string","description":"Writing style for the personalization","enum":["formal","casual","funny"],"default":"formal"},"language":{"type":"string","description":"Language for the personalization","enum":["English","German","French","Turkish","Dutch","Spanish"],"default":"English"},"customPrompt":{"type":"string","description":"Custom prompt for additional AI instructions (max 500 chars)","example":"Focus on their recent achievements and company growth","maxLength":500},"url":{"type":"string","description":"URL to analyze for personalization (LinkedIn profile or company website)","example":"https://linkedin.com/in/johndoe"}},"required":["url"]},"PersonalizationDataDto":{"type":"object","properties":{"personalization":{"type":"string","example":"I noticed your recent article about cloud infrastructure and found your insights on Kubernetes deployment particularly valuable...","description":"The AI-generated personalized message"},"source":{"type":"string","example":"linkedin","enum":["linkedin","website","both"],"description":"Source used for personalization"},"creditsUsed":{"type":"number","example":1,"description":"Number of credits consumed for this personalization"},"remainingCredits":{"type":"number","example":99,"description":"Remaining personalization credits"}},"required":["personalization","source","creditsUsed","remainingCredits"]},"PersonalizationResponseDto":{"type":"object","properties":{"message":{"type":"string","example":"Personalization generated successfully"},"data":{"$ref":"#/components/schemas/PersonalizationDataDto"}},"required":["message","data"]},"GenerateAdvancedPersonalizationDto":{"type":"object","properties":{"writingStyle":{"type":"string","description":"Writing style for the personalization","enum":["formal","casual","funny"],"default":"formal"},"language":{"type":"string","description":"Language for the personalization","enum":["English","German","French","Turkish","Dutch","Spanish"],"default":"English"},"customPrompt":{"type":"string","description":"Custom prompt for additional AI instructions (max 500 chars)","example":"Focus on their recent achievements and company growth","maxLength":500},"linkedinUrl":{"type":"string","description":"LinkedIn profile URL","example":"https://linkedin.com/in/johndoe"},"websiteUrl":{"type":"string","description":"Company website URL","example":"https://example.com"}}},"AdvancedPersonalizationDataDto":{"type":"object","properties":{"personalization":{"type":"string","example":"I noticed your role as CTO at Acme Corp and was impressed by your company's recent Series B funding announcement. Your focus on AI-powered solutions aligns perfectly with...","description":"Combined personalization from both sources"},"linkedInPersonalization":{"type":"string","example":"Your experience leading engineering teams at tech unicorns...","description":"Personalization generated from LinkedIn profile"},"websitePersonalization":{"type":"string","example":"Acme Corp's innovative approach to enterprise SaaS...","description":"Personalization generated from company website"},"creditsUsed":{"type":"number","example":2,"description":"Number of credits consumed (1-2 depending on sources used)"},"remainingCredits":{"type":"number","example":98,"description":"Remaining personalization credits"}},"required":["personalization","creditsUsed","remainingCredits"]},"AdvancedPersonalizationResponseDto":{"type":"object","properties":{"message":{"type":"string","example":"Advanced personalization generated successfully"},"data":{"$ref":"#/components/schemas/AdvancedPersonalizationDataDto"}},"required":["message","data"]},"PersonalizeLeadDto":{"type":"object","properties":{"writingStyle":{"type":"string","description":"Writing style for the personalization","enum":["formal","casual","funny"],"default":"formal"},"language":{"type":"string","description":"Language for the personalization","enum":["English","German","French","Turkish","Dutch","Spanish"],"default":"English"},"customPrompt":{"type":"string","description":"Custom prompt for additional AI instructions (max 500 chars)","example":"Focus on their recent achievements and company growth","maxLength":500},"source":{"type":"string","description":"Source to use for personalization (uses lead's linkedInUrl and/or websiteUrl)","enum":["linkedin","website","both"],"default":"both"}}},"LeadPersonalizationDataDto":{"type":"object","properties":{"leadId":{"type":"string","example":"653a45e0b2a95af9259031d5","description":"The MongoDB ObjectId of the personalized lead"},"personalization":{"type":"string","example":"I noticed your background in fintech and your company's recent expansion into blockchain solutions...","description":"The generated personalization"},"source":{"type":"string","example":"both","enum":["linkedin","website","both"],"description":"Source(s) used for personalization"},"creditsUsed":{"type":"number","example":2,"description":"Number of credits consumed"},"remainingCredits":{"type":"number","example":96,"description":"Remaining personalization credits"}},"required":["leadId","personalization","source","creditsUsed","remainingCredits"]},"LeadPersonalizationResponseDto":{"type":"object","properties":{"message":{"type":"string","example":"Lead personalized successfully"},"data":{"$ref":"#/components/schemas/LeadPersonalizationDataDto"}},"required":["message","data"]},"PersonalizeLeadListDto":{"type":"object","properties":{"writingStyle":{"type":"string","description":"Writing style for the personalization","enum":["formal","casual","funny"],"default":"formal"},"language":{"type":"string","description":"Language for the personalization","enum":["English","German","French","Turkish","Dutch","Spanish"],"default":"English"},"customPrompt":{"type":"string","description":"Custom prompt for additional AI instructions (max 500 chars)","example":"Focus on their recent achievements and company growth","maxLength":500},"source":{"type":"string","description":"Source to use for personalization (uses each lead's linkedInUrl and/or websiteUrl)","enum":["linkedin","website","both"]},"isOnlyMissing":{"type":"boolean","description":"Only personalize leads without existing personalization","default":false}},"required":["source"]},"LeadListPersonalizationDataDto":{"type":"object","properties":{"leadListId":{"type":"string","example":"653a495d3aa5012aa12f67b4","description":"The MongoDB ObjectId of the lead list"},"queueStatus":{"type":"string","example":"processing","enum":["processing","queued"],"description":"Current status of the bulk personalization job"},"totalLeads":{"type":"number","example":150,"description":"Total number of leads in the list"},"leadsToPersonalize":{"type":"number","example":150,"description":"Number of leads that will be personalized (may be less if isOnlyMissing=true)"},"estimatedCredits":{"type":"number","example":300,"description":"Estimated credits that will be consumed"},"estimatedCompletionTime":{"type":"string","example":"2025-01-15T14:30:00Z","description":"Estimated completion time (ISO 8601 format)"}},"required":["leadListId","queueStatus","totalLeads","leadsToPersonalize","estimatedCredits"]},"LeadListPersonalizationResponseDto":{"type":"object","properties":{"message":{"type":"string","example":"Lead list personalization started"},"data":{"$ref":"#/components/schemas/LeadListPersonalizationDataDto"}},"required":["message","data"]},"DeprecatedPersonalizationDataDto":{"type":"object","properties":{"personalization":{"type":"string","example":"I noticed your recent article about...","description":"The AI-generated personalized message"},"confidence":{"type":"number","example":0.95,"description":"Confidence score for the personalization"}},"required":["personalization","confidence"]},"DeprecatedPersonalizationResponseDto":{"type":"object","properties":{"message":{"type":"string","example":"personalization generated"},"data":{"$ref":"#/components/schemas/DeprecatedPersonalizationDataDto"}},"required":["message","data"]},"DNCEntry":{"type":"object","properties":{"value":{"type":"string","description":"Email address or domain to block","example":"user@example.com"},"type":{"type":"string","description":"Type of entry","enum":["email","domain"],"example":"email"},"reason":{"type":"string","description":"Reason for blocking","enum":["unsubscribe","bounce","spam_complaint","manual","invalid","other"],"example":"unsubscribe"},"notes":{"type":"string","description":"Optional notes (max 500 characters)","example":"Requested via email on 2024-01-15","maxLength":500}},"required":["value","type","reason"]},"CreateDNCBatchDto":{"type":"object","properties":{"entries":{"description":"Array of entries to add (max 2000)","minItems":1,"maxItems":2000,"type":"array","items":{"$ref":"#/components/schemas/DNCEntry"}}},"required":["entries"]},"DNCBatchSummaryDto":{"type":"object","properties":{"totalProvided":{"type":"number","example":57},"added":{"type":"number","example":50},"duplicates":{"type":"number","example":5},"invalid":{"type":"number","example":2}},"required":["totalProvided","added","duplicates","invalid"]},"DNCEntryDto":{"type":"object","properties":{"value":{"type":"string","example":"user@example.com"},"type":{"type":"string","example":"email","enum":["email","domain"]},"reason":{"type":"string","example":"unsubscribe","enum":["unsubscribe","bounce","complaint","manual"]},"_id":{"type":"string","example":"653a2b0bf5444e11e5cdd1ce"},"createdAt":{"type":"string","example":"2023-10-26T11:11:25.365Z"}},"required":["value","type","reason"]},"DNCBatchResultDataDto":{"type":"object","properties":{"added":{"type":"number","example":50},"duplicates":{"type":"number","example":5},"invalid":{"type":"number","example":2},"summary":{"$ref":"#/components/schemas/DNCBatchSummaryDto"},"addedEntries":{"type":"array","items":{"$ref":"#/components/schemas/DNCEntryDto"}},"duplicateValues":{"example":["existing@example.com"],"type":"array","items":{"type":"string"}},"invalidValues":{"example":["invalid-email"],"type":"array","items":{"type":"string"}}},"required":["added","duplicates","invalid","summary","addedEntries","duplicateValues","invalidValues"]},"AddDNCEntriesResponseDto":{"type":"object","properties":{"message":{"type":"string","example":"DNC entries processed successfully"},"data":{"$ref":"#/components/schemas/DNCBatchResultDataDto"}},"required":["message","data"]},"UploadDNCFileDto":{"type":"object","properties":{"file":{"type":"string","format":"binary","description":"CSV or TXT file with one email/domain per line"},"reason":{"type":"string","description":"Reason for blocking all entries in the file","enum":["unsubscribe","bounce","spam_complaint","manual","invalid","other"],"example":"unsubscribe"},"notes":{"type":"string","description":"Optional notes (max 500 characters)","example":"Bulk upload from unsubscribe list","maxLength":500}},"required":["file","reason"]},"DNCUploadResultDataDto":{"type":"object","properties":{"totalProcessed":{"type":"number","example":150},"added":{"type":"number","example":140},"duplicates":{"type":"number","example":8},"invalid":{"type":"number","example":2},"duplicateValues":{"example":["existing@example.com"],"type":"array","items":{"type":"string"}},"invalidValues":{"example":["invalid-email"],"type":"array","items":{"type":"string"}}},"required":["totalProcessed","added","duplicates","invalid","duplicateValues","invalidValues"]},"UploadDNCFileResponseDto":{"type":"object","properties":{"message":{"type":"string","example":"File processed successfully"},"data":{"$ref":"#/components/schemas/DNCUploadResultDataDto"}},"required":["message","data"]},"DNCPaginationDto":{"type":"object","properties":{"page":{"type":"number","example":1},"limit":{"type":"number","example":50},"totalPages":{"type":"number","example":10},"hasMore":{"type":"boolean","example":true}},"required":["page","limit","totalPages","hasMore"]},"GetDNCListResponseDto":{"type":"object","properties":{"message":{"type":"string","example":"Retrieved DNC list successfully"},"data":{"type":"array","items":{"$ref":"#/components/schemas/DNCEntryDto"}},"total":{"type":"number","example":500},"pagination":{"$ref":"#/components/schemas/DNCPaginationDto"}},"required":["message","data","total","pagination"]},"DeleteDNCSuccessDto":{"type":"object","properties":{"success":{"type":"boolean","example":true},"deletedValue":{"type":"string","example":"user@example.com"}},"required":["success","deletedValue"]},"DeleteDNCEntryResponseDto":{"type":"object","properties":{"message":{"type":"string","example":"DNC entry deleted successfully"},"data":{"$ref":"#/components/schemas/DeleteDNCSuccessDto"}},"required":["message","data"]},"CheckDNCDto":{"type":"object","properties":{"email":{"type":"string","description":"Email address to check","example":"user@example.com"}},"required":["email"]},"DNCCheckDataDto":{"type":"object","properties":{"email":{"type":"string","example":"user@example.com"},"isBlocked":{"type":"boolean","example":true},"blockingEntry":{"type":"string","example":"user@example.com","nullable":true},"blockingReason":{"type":"string","example":"unsubscribe","enum":["unsubscribe","bounce","complaint","manual"],"nullable":true},"blockingType":{"type":"string","example":"email","enum":["email","domain"],"nullable":true}},"required":["email","isBlocked"]},"CheckDNCResponseDto":{"type":"object","properties":{"message":{"type":"string","example":"Email is blocked by DNC list","description":"Status message indicating if the email is blocked or not"},"data":{"$ref":"#/components/schemas/DNCCheckDataDto"}},"required":["message","data"]},"SequenceDto":{"type":"object","properties":{"name":{"type":"string","description":"Name of the email sequence step","example":"Initial Outreach","minLength":2,"maxLength":50},"variations":{"description":"Array of sequence variation IDs or variation objects to create","example":[{"name":"Variation A","subject":"Great opportunity for {{firstName}}","body":"<p>Hi {{firstName}},</p><p>I wanted to reach out...</p>","isActive":true}],"type":"array","items":{"oneOf":[{"type":"string","description":"MongoDB ObjectId of existing variation"},{"type":"object","description":"New variation to create"}]}},"waitDaysBeforeNextStep":{"type":"number","description":"Days to wait before sending next sequence step","example":1,"minimum":1,"maximum":365},"selectionStrategy":{"type":"string","description":"Strategy for selecting variations","enum":["random","roundRobin","weighted"],"default":"random"}},"required":["name","variations","waitDaysBeforeNextStep"]},"CustomESPRuleDto":{"type":"object","properties":{}},"EmailDeliveryOptimizationDto":{"type":"object","properties":{}},"CreateMailcampaignDto":{"type":"object","properties":{"name":{"type":"string","description":"Campaign name","example":"Q4 Sales Outreach Campaign","minLength":3,"maxLength":100},"intervalMin":{"type":"number","description":"Minimum interval between emails in minutes","example":5,"minimum":1,"maximum":1440},"intervalRandomUpTo":{"type":"number","description":"Random interval to add (0 to this value in minutes)","example":5,"minimum":0,"maximum":60},"sequences":{"description":"Email sequences for the campaign","minItems":1,"type":"array","items":{"$ref":"#/components/schemas/SequenceDto"}},"userEmailAccounts":{"description":"Array of user email account IDs to send from. Can be empty if tags are provided.","example":["653a2b0bf5444e11e5cdd1d0"],"minItems":0,"type":"array","items":{"type":"string"}},"stopSendingAfterReply":{"type":"boolean","description":"Stop sending emails after receiving a reply","example":true,"default":true},"stopSendingFollowUpAfterReply":{"type":"boolean","description":"Stop sending follow-up emails after receiving a reply","example":false,"default":false},"stopSendingAfterClick":{"type":"boolean","description":"Stop sending emails after a link is clicked","example":false,"default":false},"dailySendingLimit":{"type":"number","description":"Maximum emails to send per day","example":50,"minimum":1,"maximum":10000},"isPaused":{"type":"boolean","description":"Whether the campaign is paused","example":false,"default":false},"isCompleted":{"type":"boolean","description":"Whether the campaign is completed","example":false,"default":false},"isDeleted":{"type":"boolean","description":"Whether the campaign is deleted","example":false,"default":false},"isArchived":{"type":"boolean","description":"Whether the campaign is archived","example":false,"default":false},"leadList":{"type":"string","description":"Lead list ID to send the campaign to","example":"653a2b0bf5444e11e5cdd1d1"},"openTrackingEnabled":{"type":"boolean","description":"Enable email open tracking","example":true,"default":true},"clickTrackingEnabled":{"type":"boolean","description":"Enable link click tracking","example":true,"default":true},"botFiltering":{"type":"boolean","description":"Enable bot filtering using global IP blocklist","example":false,"default":false},"unsubscribeEnabled":{"type":"boolean","description":"Enable unsubscribe functionality","example":false,"default":false},"timeZone":{"type":"string","description":"Campaign timezone (IANA timezone identifier)","example":"America/New_York","default":"America/New_York"},"allowedDays":{"description":"Days when emails can be sent","example":["monday","tuesday","wednesday","thursday","friday"],"type":"array","items":{"type":"string"}},"hourStart":{"type":"string","description":"Start hour for sending emails (HH:mm format)","example":"09:00","pattern":"^([0-1]?[0-9]|2[0-3]):[0-5][0-9]$"},"hourEnd":{"type":"string","description":"End hour for sending emails (HH:mm format)","example":"17:00","pattern":"^([0-1]?[0-9]|2[0-3]):[0-5][0-9]$"},"cc":{"description":"CC email addresses","example":[],"type":"array","items":{"type":"string"}},"bcc":{"description":"BCC email addresses","example":[],"type":"array","items":{"type":"string"}},"followUpPercentage":{"type":"number","description":"Percentage of leads to follow up with (0-100)","example":50,"minimum":0,"maximum":100},"winningMetric":{"type":"string","description":"Metric to optimize for in A/B testing","enum":["replyRate","clickRate","openRate",""],"example":""},"tags":{"description":"Campaign tags for organization","example":["sales","q4-2023"],"type":"array","items":{"type":"string"}},"bounceThreshold":{"type":"number","description":"Bounce rate threshold to pause campaign (null for no threshold)","example":null,"minimum":0,"maximum":100,"nullable":true},"subsequences":{"description":"Draft subsequences to create alongside the campaign","items":{"type":"array","items":{"type":"createCampaignSubsequenceDto"}},"type":"array"},"customESPRules":{"description":"Rules restricting which sender ESPs may mail which recipient ESPs","type":"array","items":{"$ref":"#/components/schemas/CustomESPRuleDto"}},"emailDeliveryOptimization":{"description":"Send the first email, or every email, as plain text","allOf":[{"$ref":"#/components/schemas/EmailDeliveryOptimizationDto"}]}},"required":["name","intervalMin","intervalRandomUpTo","sequences","userEmailAccounts","stopSendingAfterReply","stopSendingFollowUpAfterReply","stopSendingAfterClick","dailySendingLimit","isPaused","isCompleted","isDeleted","isArchived","leadList","openTrackingEnabled","clickTrackingEnabled","botFiltering","unsubscribeEnabled","timeZone","allowedDays","hourStart","hourEnd","followUpPercentage"]},"CampaignDto":{"type":"object","properties":{"_id":{"type":"string","example":"653a2b0bf5444e11e5cdd1ce"},"name":{"type":"string","example":"Q1 2024 Outreach Campaign"},"intervalMin":{"type":"number","example":5},"intervalRandomUpTo":{"type":"number","example":5},"sequences":{"type":"array","items":{"$ref":"#/components/schemas/SequenceDto"}},"userEmailAccounts":{"example":["653a2b0bf5444e11e5cdd1d0"],"type":"array","items":{"type":"string"}},"tags":{"example":[],"type":"array","items":{"type":"string"}},"customESPRules":{"example":[],"type":"array","items":{"type":"string"}},"stopSendingAfterReply":{"type":"boolean","example":true},"stopSendingFollowUpAfterReply":{"type":"boolean","example":false},"stopSendingAfterClick":{"type":"boolean","example":false},"dailySendingLimit":{"type":"number","example":5},"dailySendingLimitRemaining":{"type":"number","example":5},"isPaused":{"type":"boolean","example":false},"isCompleted":{"type":"boolean","example":false},"isDeleted":{"type":"boolean","example":false},"isArchived":{"type":"boolean","example":false},"leadList":{"type":"string","example":"653a2b0bf5444e11e5cdd1d1"},"openTrackingEnabled":{"type":"boolean","example":true},"clickTrackingEnabled":{"type":"boolean","example":true},"unsubscribeEnabled":{"type":"boolean","example":false},"emailDeliveryOptimization":{"$ref":"#/components/schemas/EmailDeliveryOptimizationDto"},"user":{"type":"string","example":"62878b4e647d7bd25db029a3"},"organization":{"type":"string","example":"62878b4e647d7bd25db029a4"},"timeZone":{"type":"string","example":"America/New_York"},"allowedDays":{"example":["monday","tuesday","wednesday","thursday","friday"],"type":"array","items":{"type":"string"}},"hourStart":{"type":"string","example":"09:00"},"hourEnd":{"type":"string","example":"17:00"},"createdAt":{"type":"string","example":"2023-10-26T11:11:25.365Z"},"updatedAt":{"type":"string","example":"2023-10-26T11:11:25.365Z"},"id":{"type":"string","example":"653a2b0bf5444e11e5cdd1ce"}},"required":["_id","name","intervalMin","intervalRandomUpTo","sequences","userEmailAccounts","tags","customESPRules","stopSendingAfterReply","stopSendingFollowUpAfterReply","stopSendingAfterClick","dailySendingLimit","dailySendingLimitRemaining","isPaused","isCompleted","isDeleted","isArchived","leadList","openTrackingEnabled","clickTrackingEnabled","unsubscribeEnabled","emailDeliveryOptimization","user","organization","timeZone","allowedDays","hourStart","hourEnd","createdAt","updatedAt","id"]},"CreateCampaignResponseDto":{"type":"object","properties":{"message":{"type":"string","example":"Created mail campaign"},"data":{"$ref":"#/components/schemas/CampaignDto"}},"required":["message","data"]},"CampaignSummaryDto":{"type":"object","properties":{"_id":{"type":"string","example":"653a2b0bf5444e11e5cdd1ce"},"name":{"type":"string","example":"Q1 2024 Outreach Campaign"},"isPaused":{"type":"boolean","example":false},"isCompleted":{"type":"boolean","example":false},"dailySendingLimit":{"type":"number","example":5},"dailySendingLimitRemaining":{"type":"number","example":5},"leadList":{"type":"string","example":"653a2b0bf5444e11e5cdd1d1"},"totalSequences":{"type":"number","example":2},"createdAt":{"type":"string","example":"2023-10-26T11:11:25.365Z"},"id":{"type":"string","example":"653a2b0bf5444e11e5cdd1ce"}},"required":["_id","name","isPaused","isCompleted","dailySendingLimit","dailySendingLimitRemaining","leadList","totalSequences","createdAt","id"]},"GetCampaignsResponseDto":{"type":"object","properties":{"message":{"type":"string","example":"Retrieved campaigns successfully"},"data":{"type":"array","items":{"$ref":"#/components/schemas/CampaignSummaryDto"}},"total":{"type":"number","example":15},"page":{"type":"number","example":1},"limit":{"type":"number","example":12},"totalPages":{"type":"number","example":2},"hasMore":{"type":"boolean","example":true}},"required":["message","data","total","page","limit","totalPages","hasMore"]},"GetCampaignResponseDto":{"type":"object","properties":{"message":{"type":"string","example":"Retrieved campaign successfully"},"data":{"$ref":"#/components/schemas/CampaignDto"}},"required":["message","data"]},"UpdateMailcampaignDto":{"type":"object","properties":{"name":{"type":"string","description":"Campaign name","example":"Q4 Sales Outreach Campaign","minLength":3,"maxLength":100},"intervalMin":{"type":"number","description":"Minimum interval between emails in minutes","example":5,"minimum":1,"maximum":1440},"intervalRandomUpTo":{"type":"number","description":"Random interval to add (0 to this value in minutes)","example":5,"minimum":0,"maximum":60},"sequences":{"description":"Email sequences for the campaign","minItems":1,"type":"array","items":{"$ref":"#/components/schemas/SequenceDto"}},"stopSendingAfterReply":{"type":"boolean","description":"Stop sending emails after receiving a reply","example":true,"default":true},"stopSendingFollowUpAfterReply":{"type":"boolean","description":"Stop sending follow-up emails after receiving a reply","example":false,"default":false},"stopSendingAfterClick":{"type":"boolean","description":"Stop sending emails after a link is clicked","example":false,"default":false},"dailySendingLimit":{"type":"number","description":"Maximum emails to send per day","example":50,"minimum":1,"maximum":10000},"isPaused":{"type":"boolean","description":"Whether the campaign is paused","example":false,"default":false},"isCompleted":{"type":"boolean","description":"Whether the campaign is completed","example":false,"default":false},"isDeleted":{"type":"boolean","description":"Whether the campaign is deleted","example":false,"default":false},"isArchived":{"type":"boolean","description":"Whether the campaign is archived","example":false,"default":false},"openTrackingEnabled":{"type":"boolean","description":"Enable email open tracking","example":true,"default":true},"clickTrackingEnabled":{"type":"boolean","description":"Enable link click tracking","example":true,"default":true},"botFiltering":{"type":"boolean","description":"Enable bot filtering using global IP blocklist","example":false,"default":false},"unsubscribeEnabled":{"type":"boolean","description":"Enable unsubscribe functionality","example":false,"default":false},"timeZone":{"type":"string","description":"Campaign timezone (IANA timezone identifier)","example":"America/New_York","default":"America/New_York"},"allowedDays":{"description":"Days when emails can be sent","example":["monday","tuesday","wednesday","thursday","friday"],"type":"array","items":{"type":"string"}},"hourStart":{"type":"string","description":"Start hour for sending emails (HH:mm format)","example":"09:00","pattern":"^([0-1]?[0-9]|2[0-3]):[0-5][0-9]$"},"hourEnd":{"type":"string","description":"End hour for sending emails (HH:mm format)","example":"17:00","pattern":"^([0-1]?[0-9]|2[0-3]):[0-5][0-9]$"},"cc":{"description":"CC email addresses","example":[],"type":"array","items":{"type":"string"}},"bcc":{"description":"BCC email addresses","example":[],"type":"array","items":{"type":"string"}},"followUpPercentage":{"type":"number","description":"Percentage of leads to follow up with (0-100)","example":50,"minimum":0,"maximum":100},"winningMetric":{"type":"string","description":"Metric to optimize for in A/B testing","enum":["replyRate","clickRate","openRate",""],"example":""},"tags":{"description":"Campaign tags for organization","example":["sales","q4-2023"],"type":"array","items":{"type":"string"}},"bounceThreshold":{"type":"number","description":"Bounce rate threshold to pause campaign (null for no threshold)","example":null,"minimum":0,"maximum":100,"nullable":true},"subsequences":{"description":"Draft subsequences to create alongside the campaign","items":{"type":"array","items":{"type":"createCampaignSubsequenceDto"}},"type":"array"},"customESPRules":{"description":"Rules restricting which sender ESPs may mail which recipient ESPs","type":"array","items":{"$ref":"#/components/schemas/CustomESPRuleDto"}},"emailDeliveryOptimization":{"description":"Send the first email, or every email, as plain text","allOf":[{"$ref":"#/components/schemas/EmailDeliveryOptimizationDto"}]},"userEmailAccounts":{"description":"Array of user email account IDs to send from. Can be empty if campaign has tags.","example":["653a2b0bf5444e11e5cdd1d0"],"type":"array","items":{"type":"string"}}}},"UpdateCampaignResponseDto":{"type":"object","properties":{"message":{"type":"string","example":"Updated campaign successfully"},"data":{"$ref":"#/components/schemas/CampaignDto"}},"required":["message","data"]},"DeleteCampaignResponseDto":{"type":"object","properties":{"message":{"type":"string","example":"Deleted campaign successfully"},"data":{"$ref":"#/components/schemas/DeleteSuccessDto"}},"required":["message","data"]},"CreateCampaignRequestDto":{"type":"object","properties":{"campaign":{"description":"Campaign configuration object","allOf":[{"$ref":"#/components/schemas/CreateMailcampaignDto"}]}},"required":["campaign"]},"ReceivedRepliesPaginationDto":{"type":"object","properties":{"page":{"type":"number","example":1,"description":"Current page number"},"limit":{"type":"number","example":10,"description":"Number of items per page"},"total":{"type":"number","example":100,"description":"Total number of items"},"totalPages":{"type":"number","example":10,"description":"Total number of pages"}},"required":["page","limit","total","totalPages"]},"ReceivedRepliesResponseDto":{"type":"object","properties":{"message":{"type":"string","example":"Found replies","description":"Response message"},"data":{"type":"array","description":"Array of received reply objects","example":[]},"pagination":{"$ref":"#/components/schemas/ReceivedRepliesPaginationDto"}},"required":["message","data","pagination"]}}}}