{
    "schemes": [
        "https"
    ],
    "swagger": "2.0",
    "info": {
        "description": "Emailchaser API documentation.",
        "title": "Emailchaser API",
        "contact": {},
        "version": "1.0"
    },
    "host": "api.emailchaser.com",
    "basePath": "/r",
    "paths": {
        "/campaigns": {
            "get": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "description": "Lists all campaigns for the authenticated user's space with optional filtering by status and folder. Supports pagination.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Campaigns"
                ],
                "summary": "List campaigns",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Bearer \u003cAPI_KEY\u003e",
                        "name": "Authorization",
                        "in": "header",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "Page number (default: 1)",
                        "name": "page",
                        "in": "query"
                    },
                    {
                        "enum": [
                            "not_started",
                            "running",
                            "completed",
                            "paused",
                            "draft"
                        ],
                        "type": "string",
                        "description": "Filter by status",
                        "name": "status",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "description": "Filter by folder ID",
                        "name": "folderId",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "List of campaigns",
                        "schema": {
                            "$ref": "#/definitions/models.ListCampaignsResponse"
                        }
                    },
                    "400": {
                        "description": "Invalid query parameters",
                        "schema": {
                            "$ref": "#/definitions/models.ErrorResponse"
                        }
                    },
                    "401": {
                        "description": "Unauthorized - invalid or missing API key",
                        "schema": {
                            "$ref": "#/definitions/models.ErrorUnauthorized"
                        }
                    },
                    "500": {
                        "description": "Failed to retrieve campaigns",
                        "schema": {
                            "$ref": "#/definitions/models.ErrorResponse"
                        }
                    }
                }
            }
        },
        "/campaigns/{id}": {
            "get": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "description": "Retrieves detailed information about a specific campaign including settings, schedule, statistics, and email counts.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Campaigns"
                ],
                "summary": "Get a campaign by ID",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Bearer \u003cAPI_KEY\u003e",
                        "name": "Authorization",
                        "in": "header",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "Campaign ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Campaign details",
                        "schema": {
                            "$ref": "#/definitions/models.GetCampaignResponse"
                        }
                    },
                    "400": {
                        "description": "Invalid campaign ID",
                        "schema": {
                            "$ref": "#/definitions/models.ErrorInvalidCampaignID"
                        }
                    },
                    "401": {
                        "description": "Unauthorized - invalid or missing API key",
                        "schema": {
                            "$ref": "#/definitions/models.ErrorUnauthorized"
                        }
                    },
                    "404": {
                        "description": "Campaign not found",
                        "schema": {
                            "$ref": "#/definitions/models.ErrorCampaignNotFound"
                        }
                    },
                    "500": {
                        "description": "Failed to retrieve campaign",
                        "schema": {
                            "$ref": "#/definitions/models.ErrorResponse"
                        }
                    }
                }
            },
            "put": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "description": "Updates campaign properties such as name, emoji, timezone, and various settings. Only provided fields will be updated.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Campaigns"
                ],
                "summary": "Update a campaign by ID",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Bearer \u003cAPI_KEY\u003e",
                        "name": "Authorization",
                        "in": "header",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "Campaign ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Campaign fields to update",
                        "name": "request",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/models.UpdateCampaignRequest"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Campaign updated successfully",
                        "schema": {
                            "$ref": "#/definitions/models.UpdateCampaignResponse"
                        }
                    },
                    "400": {
                        "description": "Invalid campaign ID or request body",
                        "schema": {
                            "$ref": "#/definitions/models.ErrorInvalidCampaignID"
                        }
                    },
                    "401": {
                        "description": "Unauthorized - invalid or missing API key",
                        "schema": {
                            "$ref": "#/definitions/models.ErrorUnauthorized"
                        }
                    },
                    "404": {
                        "description": "Campaign not found",
                        "schema": {
                            "$ref": "#/definitions/models.ErrorCampaignNotFound"
                        }
                    },
                    "500": {
                        "description": "Failed to update campaign",
                        "schema": {
                            "$ref": "#/definitions/models.ErrorFailedToUpdateCampaign"
                        }
                    }
                }
            },
            "delete": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "description": "Deletes a campaign and all associated data including emails, sequences, and scheduled tasks.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Campaigns"
                ],
                "summary": "Delete a campaign",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Bearer \u003cAPI_KEY\u003e",
                        "name": "Authorization",
                        "in": "header",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "Campaign ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Campaign deleted successfully",
                        "schema": {
                            "$ref": "#/definitions/models.DeleteCampaignResponse"
                        }
                    },
                    "400": {
                        "description": "Invalid campaign ID",
                        "schema": {
                            "$ref": "#/definitions/models.ErrorInvalidCampaignID"
                        }
                    },
                    "401": {
                        "description": "Unauthorized - invalid or missing API key",
                        "schema": {
                            "$ref": "#/definitions/models.ErrorUnauthorized"
                        }
                    },
                    "404": {
                        "description": "Campaign not found",
                        "schema": {
                            "$ref": "#/definitions/models.ErrorCampaignNotFound"
                        }
                    },
                    "500": {
                        "description": "Failed to delete campaign",
                        "schema": {
                            "$ref": "#/definitions/models.ErrorFailedToDeleteCampaign"
                        }
                    }
                }
            }
        },
        "/campaigns/{id}/launch": {
            "post": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "description": "Launches a new campaign or resumes a paused campaign. Validates campaign configuration before launching.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Campaigns"
                ],
                "summary": "Launch or resume a campaign",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Bearer \u003cAPI_KEY\u003e",
                        "name": "Authorization",
                        "in": "header",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "Campaign ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Campaign launched/resumed successfully",
                        "schema": {
                            "$ref": "#/definitions/models.LaunchCampaignResponse"
                        }
                    },
                    "400": {
                        "description": "Campaign validation failed (missing configuration)",
                        "schema": {
                            "$ref": "#/definitions/models.ErrorCampaignValidation"
                        }
                    },
                    "401": {
                        "description": "Unauthorized - invalid or missing API key",
                        "schema": {
                            "$ref": "#/definitions/models.ErrorUnauthorized"
                        }
                    },
                    "404": {
                        "description": "Campaign not found",
                        "schema": {
                            "$ref": "#/definitions/models.ErrorCampaignNotFound"
                        }
                    },
                    "409": {
                        "description": "Campaign is currently processing leads",
                        "schema": {
                            "$ref": "#/definitions/models.ErrorResponse"
                        }
                    },
                    "500": {
                        "description": "Failed to launch/resume campaign",
                        "schema": {
                            "$ref": "#/definitions/models.ErrorFailedToLaunchCampaign"
                        }
                    }
                }
            }
        },
        "/campaigns/{id}/pause": {
            "post": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "description": "Pauses a running campaign and cancels all scheduled emails.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Campaigns"
                ],
                "summary": "Pause a campaign",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Bearer \u003cAPI_KEY\u003e",
                        "name": "Authorization",
                        "in": "header",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "Campaign ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Campaign paused successfully",
                        "schema": {
                            "$ref": "#/definitions/models.PauseCampaignResponse"
                        }
                    },
                    "400": {
                        "description": "Invalid campaign ID",
                        "schema": {
                            "$ref": "#/definitions/models.ErrorInvalidCampaignID"
                        }
                    },
                    "401": {
                        "description": "Unauthorized - invalid or missing API key",
                        "schema": {
                            "$ref": "#/definitions/models.ErrorUnauthorized"
                        }
                    },
                    "404": {
                        "description": "Campaign not found",
                        "schema": {
                            "$ref": "#/definitions/models.ErrorCampaignNotFound"
                        }
                    },
                    "500": {
                        "description": "Failed to pause campaign",
                        "schema": {
                            "$ref": "#/definitions/models.ErrorFailedToPauseCampaign"
                        }
                    }
                }
            }
        },
        "/campaigns/{id}/schedule": {
            "put": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "description": "Updates the sending schedule for a campaign including timezone, days, time windows, and frequency.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Campaigns"
                ],
                "summary": "Update campaign schedule",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Bearer \u003cAPI_KEY\u003e",
                        "name": "Authorization",
                        "in": "header",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "Campaign ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Schedule configuration",
                        "name": "request",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/models.UpdateCampaignScheduleRequest"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Campaign schedule updated successfully",
                        "schema": {
                            "$ref": "#/definitions/models.UpdateCampaignScheduleResponse"
                        }
                    },
                    "400": {
                        "description": "Invalid request body or schedule configuration",
                        "schema": {
                            "$ref": "#/definitions/models.ErrorResponse"
                        }
                    },
                    "401": {
                        "description": "Unauthorized - invalid or missing API key",
                        "schema": {
                            "$ref": "#/definitions/models.ErrorUnauthorized"
                        }
                    },
                    "404": {
                        "description": "Campaign not found",
                        "schema": {
                            "$ref": "#/definitions/models.ErrorCampaignNotFound"
                        }
                    },
                    "500": {
                        "description": "Failed to update campaign schedule",
                        "schema": {
                            "$ref": "#/definitions/models.ErrorResponse"
                        }
                    }
                }
            }
        },
        "/leads": {
            "post": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "description": "Creates or updates multiple leads. If a lead with the same email already exists, it will be updated. Optionally associate leads with a campaign.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Leads"
                ],
                "summary": "Create or update leads in bulk",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Bearer \u003cAPI_KEY\u003e",
                        "name": "Authorization",
                        "in": "header",
                        "required": true
                    },
                    {
                        "description": "Leads to create or update",
                        "name": "request",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/models.CreateOrUpdateLeadsRequest"
                        }
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Leads processed successfully",
                        "schema": {
                            "$ref": "#/definitions/models.CreateLeadsResponse"
                        }
                    },
                    "400": {
                        "description": "Invalid request body or no leads provided",
                        "schema": {
                            "$ref": "#/definitions/models.ErrorInvalidRequest"
                        }
                    },
                    "401": {
                        "description": "Unauthorized - invalid or missing API key",
                        "schema": {
                            "$ref": "#/definitions/models.ErrorUnauthorized"
                        }
                    },
                    "404": {
                        "description": "Campaign not found",
                        "schema": {
                            "$ref": "#/definitions/models.ErrorCampaignNotFound"
                        }
                    },
                    "500": {
                        "description": "Failed to create leads",
                        "schema": {
                            "$ref": "#/definitions/models.ErrorFailedToCreateLeads"
                        }
                    }
                }
            }
        },
        "/leads/{id}": {
            "get": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "description": "Retrieves detailed information about a specific lead.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Leads"
                ],
                "summary": "Get a lead by ID",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Bearer \u003cAPI_KEY\u003e",
                        "name": "Authorization",
                        "in": "header",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "Lead ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Lead details",
                        "schema": {
                            "$ref": "#/definitions/models.GetLeadResponse"
                        }
                    },
                    "400": {
                        "description": "Invalid lead ID",
                        "schema": {
                            "$ref": "#/definitions/models.ErrorInvalidLeadID"
                        }
                    },
                    "401": {
                        "description": "Unauthorized - invalid or missing API key",
                        "schema": {
                            "$ref": "#/definitions/models.ErrorUnauthorized"
                        }
                    },
                    "403": {
                        "description": "Forbidden - lead does not belong to your space",
                        "schema": {
                            "$ref": "#/definitions/models.ErrorForbidden"
                        }
                    },
                    "404": {
                        "description": "Lead not found",
                        "schema": {
                            "$ref": "#/definitions/models.ErrorNotFound"
                        }
                    }
                }
            },
            "put": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "description": "Updates an existing lead's information. Only provided fields will be updated.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Leads"
                ],
                "summary": "Update a lead by ID",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Bearer \u003cAPI_KEY\u003e",
                        "name": "Authorization",
                        "in": "header",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "Lead ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Lead fields to update",
                        "name": "request",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/models.UpdateLeadRequest"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Lead updated successfully",
                        "schema": {
                            "$ref": "#/definitions/models.UpdateLeadResponse"
                        }
                    },
                    "400": {
                        "description": "Invalid lead ID or request body",
                        "schema": {
                            "$ref": "#/definitions/models.ErrorInvalidLeadID"
                        }
                    },
                    "401": {
                        "description": "Unauthorized - invalid or missing API key",
                        "schema": {
                            "$ref": "#/definitions/models.ErrorUnauthorized"
                        }
                    },
                    "403": {
                        "description": "Forbidden - lead does not belong to your space",
                        "schema": {
                            "$ref": "#/definitions/models.ErrorForbidden"
                        }
                    },
                    "404": {
                        "description": "Lead not found",
                        "schema": {
                            "$ref": "#/definitions/models.ErrorNotFound"
                        }
                    },
                    "500": {
                        "description": "Failed to update lead",
                        "schema": {
                            "$ref": "#/definitions/models.ErrorFailedToUpdateLead"
                        }
                    }
                }
            },
            "delete": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "description": "Deletes a lead and all associated unsent emails. If the lead is associated with campaigns, it will be removed from those campaigns first.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Leads"
                ],
                "summary": "Delete a lead by ID",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Bearer \u003cAPI_KEY\u003e",
                        "name": "Authorization",
                        "in": "header",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "Lead ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Lead deleted successfully",
                        "schema": {
                            "$ref": "#/definitions/models.DeleteLeadResponse"
                        }
                    },
                    "400": {
                        "description": "Invalid lead ID",
                        "schema": {
                            "$ref": "#/definitions/models.ErrorInvalidLeadID"
                        }
                    },
                    "401": {
                        "description": "Unauthorized - invalid or missing API key",
                        "schema": {
                            "$ref": "#/definitions/models.ErrorUnauthorized"
                        }
                    },
                    "403": {
                        "description": "Forbidden - lead does not belong to your space",
                        "schema": {
                            "$ref": "#/definitions/models.ErrorForbidden"
                        }
                    },
                    "404": {
                        "description": "Lead not found",
                        "schema": {
                            "$ref": "#/definitions/models.ErrorNotFound"
                        }
                    },
                    "500": {
                        "description": "Failed to delete lead",
                        "schema": {
                            "$ref": "#/definitions/models.ErrorFailedToDeleteLead"
                        }
                    }
                }
            }
        }
    },
    "definitions": {
        "models.CampaignEmailCounts": {
            "type": "object",
            "properties": {
                "blocked": {
                    "type": "integer",
                    "example": 2
                },
                "bounced": {
                    "type": "integer",
                    "example": 20
                },
                "canceled": {
                    "type": "integer",
                    "example": 15
                },
                "catchAll": {
                    "type": "integer",
                    "example": 12
                },
                "deferred": {
                    "type": "integer",
                    "example": 5
                },
                "delivered": {
                    "type": "integer",
                    "example": 280
                },
                "draft": {
                    "type": "integer",
                    "example": 20
                },
                "dropped": {
                    "type": "integer",
                    "example": 3
                },
                "errorOnSent": {
                    "type": "integer",
                    "example": 5
                },
                "followUp": {
                    "type": "integer",
                    "example": 50
                },
                "followUpCanceled": {
                    "type": "integer",
                    "example": 10
                },
                "followUpDraft": {
                    "type": "integer",
                    "example": 10
                },
                "invalid": {
                    "type": "integer",
                    "example": 8
                },
                "pending": {
                    "type": "integer",
                    "example": 100
                },
                "replied": {
                    "type": "integer",
                    "example": 50
                },
                "scheduled": {
                    "type": "integer",
                    "example": 500
                },
                "sent": {
                    "type": "integer",
                    "example": 300
                },
                "spamReport": {
                    "type": "integer",
                    "example": 2
                },
                "total": {
                    "type": "integer",
                    "example": 1000
                },
                "waitingForReschedule": {
                    "type": "integer",
                    "example": 5
                }
            }
        },
        "models.CampaignListItem": {
            "type": "object",
            "properties": {
                "createdAt": {
                    "type": "string"
                },
                "emoji": {
                    "type": "string"
                },
                "flow": {
                    "type": "string"
                },
                "id": {
                    "type": "integer"
                },
                "name": {
                    "type": "string"
                },
                "stats": {
                    "$ref": "#/definitions/models.CampaignStats"
                },
                "status": {
                    "type": "string"
                },
                "updatedAt": {
                    "type": "string"
                }
            }
        },
        "models.CampaignSchedule": {
            "type": "object",
            "properties": {
                "cronSchedule": {
                    "type": "string",
                    "example": "0 9 * * 1-5"
                },
                "daysSchedule": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    },
                    "example": [
                        "monday",
                        "tuesday",
                        "wednesday",
                        "thursday",
                        "friday"
                    ]
                },
                "endSchedule": {
                    "type": "string",
                    "example": "17:00"
                },
                "everySchedule": {
                    "type": "integer",
                    "example": 30
                },
                "startSchedule": {
                    "type": "string",
                    "example": "09:00"
                }
            }
        },
        "models.CampaignSettings": {
            "type": "object",
            "properties": {
                "allowNonBusinessEmails": {
                    "type": "boolean",
                    "example": false
                },
                "ignoreOutOfOfficeReplies": {
                    "type": "boolean",
                    "example": true
                },
                "isEnabledCatchallValidated": {
                    "type": "boolean",
                    "example": true
                },
                "isEnabledEmailVerifier": {
                    "type": "boolean",
                    "example": false
                },
                "isEnabledIgnoreHardBouncedLeads": {
                    "type": "boolean",
                    "example": true
                },
                "isEnabledIgnoreLeadsWhoAlreadyResponded": {
                    "type": "boolean",
                    "example": true
                },
                "isEnabledLlm": {
                    "type": "boolean",
                    "example": true
                },
                "isEnabledSkipLeadIfAlreadyExists": {
                    "type": "boolean",
                    "example": false
                },
                "isEnabledStopFollowUpsForSameCompany": {
                    "type": "boolean",
                    "example": false
                },
                "isEnabledStopFollowUpsOnReply": {
                    "type": "boolean",
                    "example": true
                },
                "maximumSendingLimitPerSenderEmail": {
                    "type": "integer",
                    "example": 50
                },
                "maximumSendingLimitPerSenderEmailVariation": {
                    "type": "integer",
                    "example": 10
                }
            }
        },
        "models.CampaignStats": {
            "type": "object",
            "properties": {
                "bouncedLeadsCount": {
                    "type": "integer"
                },
                "contactedLeadsCount": {
                    "type": "integer"
                },
                "emailsSentCount": {
                    "type": "integer"
                },
                "leadsRespondedPositivelyCount": {
                    "type": "integer"
                },
                "repliedLeadsCount": {
                    "type": "integer"
                },
                "senderEmailsConnected": {
                    "type": "integer"
                },
                "senderEmailsDisconnected": {
                    "type": "integer"
                },
                "senderEmailsTotal": {
                    "type": "integer"
                }
            }
        },
        "models.CreateLeadsResponse": {
            "type": "object",
            "properties": {
                "count": {
                    "type": "integer",
                    "example": 5
                },
                "message": {
                    "type": "string",
                    "example": "leads processed successfully"
                }
            }
        },
        "models.CreateOrUpdateLeadsRequest": {
            "type": "object",
            "required": [
                "leads"
            ],
            "properties": {
                "campaignId": {
                    "type": "integer"
                },
                "leads": {
                    "type": "array",
                    "maxItems": 1000,
                    "minItems": 1,
                    "items": {
                        "$ref": "#/definitions/models.LeadInput"
                    }
                }
            }
        },
        "models.DeleteCampaignResponse": {
            "type": "object",
            "properties": {
                "id": {
                    "type": "integer",
                    "example": 123
                },
                "message": {
                    "type": "string",
                    "example": "campaign deleted successfully"
                }
            }
        },
        "models.DeleteLeadResponse": {
            "type": "object",
            "properties": {
                "id": {
                    "type": "integer",
                    "example": 123
                },
                "message": {
                    "type": "string",
                    "example": "lead deleted successfully"
                }
            }
        },
        "models.ErrorCampaignNotFound": {
            "type": "object",
            "properties": {
                "error": {
                    "type": "string",
                    "example": "campaign not found"
                }
            }
        },
        "models.ErrorCampaignValidation": {
            "type": "object",
            "properties": {
                "error": {
                    "type": "string",
                    "example": "campaign schedule days not configured"
                }
            }
        },
        "models.ErrorFailedToCreateLeads": {
            "type": "object",
            "properties": {
                "error": {
                    "type": "string",
                    "example": "failed to create leads"
                }
            }
        },
        "models.ErrorFailedToDeleteCampaign": {
            "type": "object",
            "properties": {
                "error": {
                    "type": "string",
                    "example": "failed to delete campaign"
                }
            }
        },
        "models.ErrorFailedToDeleteLead": {
            "type": "object",
            "properties": {
                "error": {
                    "type": "string",
                    "example": "failed to delete lead"
                }
            }
        },
        "models.ErrorFailedToLaunchCampaign": {
            "type": "object",
            "properties": {
                "error": {
                    "type": "string",
                    "example": "failed to launch/resume campaign"
                }
            }
        },
        "models.ErrorFailedToPauseCampaign": {
            "type": "object",
            "properties": {
                "error": {
                    "type": "string",
                    "example": "failed to pause campaign"
                }
            }
        },
        "models.ErrorFailedToUpdateCampaign": {
            "type": "object",
            "properties": {
                "error": {
                    "type": "string",
                    "example": "failed to update campaign"
                }
            }
        },
        "models.ErrorFailedToUpdateLead": {
            "type": "object",
            "properties": {
                "error": {
                    "type": "string",
                    "example": "failed to update lead"
                }
            }
        },
        "models.ErrorForbidden": {
            "type": "object",
            "properties": {
                "error": {
                    "type": "string",
                    "example": "forbidden"
                }
            }
        },
        "models.ErrorInvalidCampaignID": {
            "type": "object",
            "properties": {
                "error": {
                    "type": "string",
                    "example": "invalid campaign ID"
                }
            }
        },
        "models.ErrorInvalidLeadID": {
            "type": "object",
            "properties": {
                "error": {
                    "type": "string",
                    "example": "invalid lead ID"
                }
            }
        },
        "models.ErrorInvalidRequest": {
            "type": "object",
            "properties": {
                "error": {
                    "type": "string",
                    "example": "invalid request body"
                }
            }
        },
        "models.ErrorNotFound": {
            "type": "object",
            "properties": {
                "error": {
                    "type": "string",
                    "example": "lead not found"
                }
            }
        },
        "models.ErrorResponse": {
            "type": "object",
            "properties": {
                "error": {
                    "type": "string",
                    "example": "error message"
                }
            }
        },
        "models.ErrorUnauthorized": {
            "type": "object",
            "properties": {
                "error": {
                    "type": "string",
                    "example": "unauthorized"
                }
            }
        },
        "models.GetCampaignResponse": {
            "type": "object",
            "properties": {
                "createdAt": {
                    "type": "string",
                    "example": "2024-01-10T10:30:00Z"
                },
                "emails": {
                    "$ref": "#/definitions/models.CampaignEmailCounts"
                },
                "emoji": {
                    "type": "string",
                    "example": "🚀"
                },
                "flow": {
                    "type": "string",
                    "example": "multiple_leads_scheduled"
                },
                "id": {
                    "type": "integer",
                    "example": 123
                },
                "launchAt": {
                    "type": "string",
                    "example": "2024-01-15T09:00:00Z"
                },
                "name": {
                    "type": "string",
                    "example": "Q1 Outreach Campaign"
                },
                "schedule": {
                    "$ref": "#/definitions/models.CampaignSchedule"
                },
                "sendAt": {
                    "type": "string",
                    "example": "2024-01-15T10:00:00Z"
                },
                "settings": {
                    "$ref": "#/definitions/models.CampaignSettings"
                },
                "stats": {
                    "$ref": "#/definitions/models.CampaignStats"
                },
                "status": {
                    "type": "string",
                    "example": "running"
                },
                "timezone": {
                    "type": "string",
                    "example": "America/New_York"
                },
                "updatedAt": {
                    "type": "string",
                    "example": "2024-01-15T10:30:00Z"
                }
            }
        },
        "models.GetLeadResponse": {
            "type": "object",
            "properties": {
                "lead": {
                    "$ref": "#/definitions/models.LeadResponse"
                }
            }
        },
        "models.LaunchCampaignResponse": {
            "type": "object",
            "properties": {
                "campaign": {
                    "type": "object",
                    "properties": {
                        "id": {
                            "type": "integer",
                            "example": 123
                        },
                        "name": {
                            "type": "string",
                            "example": "Q1 Outreach Campaign"
                        },
                        "status": {
                            "type": "string",
                            "example": "running"
                        }
                    }
                },
                "message": {
                    "type": "string",
                    "example": "campaign launched/resumed successfully"
                }
            }
        },
        "models.LeadInput": {
            "type": "object",
            "required": [
                "email"
            ],
            "properties": {
                "company": {
                    "type": "string"
                },
                "email": {
                    "type": "string"
                },
                "firstName": {
                    "type": "string"
                },
                "lastName": {
                    "type": "string"
                },
                "linkedin": {
                    "type": "string"
                },
                "phone": {
                    "type": "string"
                },
                "title": {
                    "type": "string"
                },
                "website": {
                    "type": "string"
                }
            }
        },
        "models.LeadResponse": {
            "type": "object",
            "properties": {
                "company": {
                    "type": "string",
                    "example": "Acme Corp"
                },
                "createdAt": {
                    "type": "string",
                    "example": "2024-01-15T10:30:00Z"
                },
                "email": {
                    "type": "string",
                    "example": "john.doe@example.com"
                },
                "firstName": {
                    "type": "string",
                    "example": "John"
                },
                "id": {
                    "type": "integer",
                    "example": 123
                },
                "lastName": {
                    "type": "string",
                    "example": "Doe"
                },
                "linkedin": {
                    "type": "string",
                    "example": "https://linkedin.com/in/johndoe"
                },
                "phone": {
                    "type": "string",
                    "example": "+1234567890"
                },
                "title": {
                    "type": "string",
                    "example": "Software Engineer"
                },
                "updatedAt": {
                    "type": "string",
                    "example": "2024-01-15T10:30:00Z"
                },
                "website": {
                    "type": "string",
                    "example": "https://example.com"
                }
            }
        },
        "models.ListCampaignsResponse": {
            "type": "object",
            "properties": {
                "campaigns": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/models.CampaignListItem"
                    }
                },
                "hasMore": {
                    "type": "boolean"
                },
                "limit": {
                    "type": "integer"
                },
                "page": {
                    "type": "integer"
                },
                "total": {
                    "type": "integer"
                }
            }
        },
        "models.PauseCampaignResponse": {
            "type": "object",
            "properties": {
                "campaign": {
                    "type": "object",
                    "properties": {
                        "id": {
                            "type": "integer",
                            "example": 123
                        },
                        "name": {
                            "type": "string",
                            "example": "Q1 Outreach Campaign"
                        },
                        "status": {
                            "type": "string",
                            "example": "paused"
                        }
                    }
                },
                "message": {
                    "type": "string",
                    "example": "campaign paused successfully"
                }
            }
        },
        "models.UpdateCampaignRequest": {
            "type": "object",
            "properties": {
                "allowNonBusinessEmails": {
                    "type": "boolean"
                },
                "emoji": {
                    "type": "string",
                    "maxLength": 10,
                    "minLength": 1
                },
                "ignoreOutOfOfficeReplies": {
                    "type": "boolean"
                },
                "isEnabledCatchallValidated": {
                    "type": "boolean"
                },
                "isEnabledEmailVerifier": {
                    "type": "boolean"
                },
                "isEnabledIgnoreHardBouncedLeads": {
                    "type": "boolean"
                },
                "isEnabledIgnoreLeadsWhoAlreadyResponded": {
                    "type": "boolean"
                },
                "isEnabledLlm": {
                    "description": "Settings - all optional boolean flags",
                    "type": "boolean"
                },
                "isEnabledSkipLeadIfAlreadyExists": {
                    "type": "boolean"
                },
                "isEnabledStopFollowUpsForSameCompany": {
                    "type": "boolean"
                },
                "isEnabledStopFollowUpsOnReply": {
                    "type": "boolean"
                },
                "maximumSendingLimitPerSenderEmail": {
                    "type": "integer",
                    "maximum": 10000,
                    "minimum": 1
                },
                "maximumSendingLimitPerSenderEmailVariation": {
                    "type": "integer",
                    "maximum": 100,
                    "minimum": 0
                },
                "name": {
                    "type": "string",
                    "maxLength": 255,
                    "minLength": 1
                },
                "timezone": {
                    "type": "string"
                }
            }
        },
        "models.UpdateCampaignResponse": {
            "type": "object",
            "properties": {
                "campaign": {
                    "type": "object",
                    "properties": {
                        "emoji": {
                            "type": "string",
                            "example": "🚀"
                        },
                        "id": {
                            "type": "integer",
                            "example": 123
                        },
                        "name": {
                            "type": "string",
                            "example": "Q1 Outreach Campaign"
                        }
                    }
                },
                "message": {
                    "type": "string",
                    "example": "campaign updated successfully"
                }
            }
        },
        "models.UpdateCampaignScheduleRequest": {
            "type": "object",
            "required": [
                "timezone"
            ],
            "properties": {
                "daysSchedule": {
                    "description": "For multiple leads scheduled campaigns (flow 3) and API campaigns",
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "endSchedule": {
                    "type": "string"
                },
                "everySchedule": {
                    "type": "integer",
                    "minimum": 1
                },
                "sendAt": {
                    "description": "For single lead scheduled campaigns (flow 2)",
                    "type": "string"
                },
                "startSchedule": {
                    "type": "string"
                },
                "timezone": {
                    "description": "Common field for all flows",
                    "type": "string"
                }
            }
        },
        "models.UpdateCampaignScheduleResponse": {
            "type": "object",
            "properties": {
                "campaign": {
                    "type": "object",
                    "properties": {
                        "daysSchedule": {
                            "type": "array",
                            "items": {
                                "type": "string"
                            },
                            "example": [
                                "monday",
                                "tuesday",
                                "wednesday",
                                "thursday",
                                "friday"
                            ]
                        },
                        "endSchedule": {
                            "type": "string",
                            "example": "17:00"
                        },
                        "everySchedule": {
                            "type": "integer",
                            "example": 30
                        },
                        "id": {
                            "type": "integer",
                            "example": 123
                        },
                        "name": {
                            "type": "string",
                            "example": "Q1 Outreach Campaign"
                        },
                        "startSchedule": {
                            "type": "string",
                            "example": "09:00"
                        },
                        "timezone": {
                            "type": "string",
                            "example": "America/New_York"
                        }
                    }
                },
                "message": {
                    "type": "string",
                    "example": "campaign schedule updated successfully"
                }
            }
        },
        "models.UpdateLeadRequest": {
            "type": "object",
            "properties": {
                "company": {
                    "type": "string"
                },
                "email": {
                    "type": "string"
                },
                "firstName": {
                    "type": "string"
                },
                "lastName": {
                    "type": "string"
                },
                "linkedin": {
                    "type": "string"
                },
                "phone": {
                    "type": "string"
                },
                "title": {
                    "type": "string"
                },
                "website": {
                    "type": "string"
                }
            }
        },
        "models.UpdateLeadResponse": {
            "type": "object",
            "properties": {
                "lead": {
                    "$ref": "#/definitions/models.LeadResponse"
                },
                "message": {
                    "type": "string",
                    "example": "lead updated successfully"
                }
            }
        }
    },
    "securityDefinitions": {
        "ApiKeyAuth": {
            "type": "apiKey",
            "name": "Authorization",
            "in": "header"
        }
    }
}