{
  "openapi": "3.1.0",
  "info": {
    "title": "Outreach Tool",
    "description": "Cold email outreach and campaign management platform",
    "version": "0.1.0"
  },
  "paths": {
    "/api/auth/google/url": {
      "get": {
        "tags": [
          "auth"
        ],
        "summary": "Get Google Auth Url",
        "description": "Get Google OAuth URL for login.",
        "operationId": "get_google_auth_url_api_auth_google_url_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthUrlResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/auth/google/callback": {
      "get": {
        "tags": [
          "auth"
        ],
        "summary": "Google Callback",
        "description": "Handle Google OAuth callback.\nExchange authorization code for tokens and create/get user.",
        "operationId": "google_callback_api_auth_google_callback_get",
        "parameters": [
          {
            "name": "code",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Code"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TokenResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/auth/me": {
      "get": {
        "tags": [
          "auth"
        ],
        "summary": "Get Current User Info",
        "description": "Get current authenticated user info.",
        "operationId": "get_current_user_info_api_auth_me_get",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/auth/logout": {
      "post": {
        "tags": [
          "auth"
        ],
        "summary": "Logout",
        "description": "Logout endpoint.\nNote: JWT tokens are stateless, so we just return success.\nThe frontend should clear the stored token.",
        "operationId": "logout_api_auth_logout_post",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        }
      }
    },
    "/api/accounts": {
      "get": {
        "tags": [
          "accounts"
        ],
        "summary": "List Email Accounts",
        "description": "List all email accounts for the current workspace.",
        "operationId": "list_email_accounts_api_accounts_get",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Authorization"
            }
          },
          {
            "name": "X-Workspace-Id",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/EmailAccountResponse"
                  },
                  "title": "Response List Email Accounts Api Accounts Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "accounts"
        ],
        "summary": "Create Email Account",
        "description": "Create a new email account with SMTP/IMAP credentials.",
        "operationId": "create_email_account_api_accounts_post",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Authorization"
            }
          },
          {
            "name": "X-Workspace-Id",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmailAccountCreate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmailAccountResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/accounts/{account_id}": {
      "get": {
        "tags": [
          "accounts"
        ],
        "summary": "Get Email Account",
        "description": "Get a specific email account.",
        "operationId": "get_email_account_api_accounts__account_id__get",
        "parameters": [
          {
            "name": "account_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Account Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Authorization"
            }
          },
          {
            "name": "X-Workspace-Id",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmailAccountResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "accounts"
        ],
        "summary": "Update Email Account",
        "description": "Update an email account.",
        "operationId": "update_email_account_api_accounts__account_id__patch",
        "parameters": [
          {
            "name": "account_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Account Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Authorization"
            }
          },
          {
            "name": "X-Workspace-Id",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmailAccountUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmailAccountResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "accounts"
        ],
        "summary": "Delete Email Account",
        "description": "Delete an email account.",
        "operationId": "delete_email_account_api_accounts__account_id__delete",
        "parameters": [
          {
            "name": "account_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Account Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Authorization"
            }
          },
          {
            "name": "X-Workspace-Id",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/accounts/test": {
      "post": {
        "tags": [
          "accounts"
        ],
        "summary": "Test Connection",
        "description": "Test SMTP and IMAP connection with provided credentials.",
        "operationId": "test_connection_api_accounts_test_post",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Authorization"
            }
          },
          {
            "name": "X-Workspace-Id",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectionTestRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectionTestResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/accounts/{account_id}/warmup/enable": {
      "post": {
        "tags": [
          "accounts"
        ],
        "summary": "Enable Warmup",
        "description": "Enable warmup for an email account and add to warmup pool.",
        "operationId": "enable_warmup_api_accounts__account_id__warmup_enable_post",
        "parameters": [
          {
            "name": "account_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Account Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Authorization"
            }
          },
          {
            "name": "X-Workspace-Id",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmailAccountResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/accounts/{account_id}/warmup/disable": {
      "post": {
        "tags": [
          "accounts"
        ],
        "summary": "Disable Warmup",
        "description": "Disable warmup for an email account.",
        "operationId": "disable_warmup_api_accounts__account_id__warmup_disable_post",
        "parameters": [
          {
            "name": "account_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Account Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Authorization"
            }
          },
          {
            "name": "X-Workspace-Id",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmailAccountResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/accounts/{account_id}/health": {
      "get": {
        "tags": [
          "accounts"
        ],
        "summary": "Get Account Health",
        "description": "Get detailed health metrics for an email account.",
        "operationId": "get_account_health_api_accounts__account_id__health_get",
        "parameters": [
          {
            "name": "account_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Account Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Authorization"
            }
          },
          {
            "name": "X-Workspace-Id",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/accounts/{account_id}/warmup": {
      "get": {
        "tags": [
          "accounts"
        ],
        "summary": "Get Account Warmup",
        "description": "Get warmup details for a specific account: progress, pool stats, and recent logs.",
        "operationId": "get_account_warmup_api_accounts__account_id__warmup_get",
        "parameters": [
          {
            "name": "account_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Account Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Authorization"
            }
          },
          {
            "name": "X-Workspace-Id",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/leads": {
      "get": {
        "tags": [
          "leads"
        ],
        "summary": "List Leads",
        "description": "List all leads for the current workspace with pagination and filters.",
        "operationId": "list_leads_api_leads_get",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1,
              "title": "Page"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "default": 50,
              "title": "Pagesize"
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Search"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          },
          {
            "name": "tags",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tags"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Authorization"
            }
          },
          {
            "name": "X-Workspace-Id",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LeadListResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "leads"
        ],
        "summary": "Create Lead",
        "description": "Create a new lead.",
        "operationId": "create_lead_api_leads_post",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Authorization"
            }
          },
          {
            "name": "X-Workspace-Id",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LeadCreate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LeadResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/leads/variables": {
      "get": {
        "tags": [
          "leads"
        ],
        "summary": "Get Available Variables",
        "description": "Get available template variables: standard fields + custom fields from workspace's leads.",
        "operationId": "get_available_variables_api_leads_variables_get",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Authorization"
            }
          },
          {
            "name": "X-Workspace-Id",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/leads/tags/list": {
      "get": {
        "tags": [
          "leads"
        ],
        "summary": "List Lead Tags",
        "description": "List all lead tags for the current workspace.",
        "operationId": "list_lead_tags_api_leads_tags_list_get",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Authorization"
            }
          },
          {
            "name": "X-Workspace-Id",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/leads/{lead_id}": {
      "get": {
        "tags": [
          "leads"
        ],
        "summary": "Get Lead",
        "description": "Get a specific lead.",
        "operationId": "get_lead_api_leads__lead_id__get",
        "parameters": [
          {
            "name": "lead_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Lead Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Authorization"
            }
          },
          {
            "name": "X-Workspace-Id",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LeadResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "leads"
        ],
        "summary": "Update Lead",
        "description": "Update a lead.",
        "operationId": "update_lead_api_leads__lead_id__patch",
        "parameters": [
          {
            "name": "lead_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Lead Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Authorization"
            }
          },
          {
            "name": "X-Workspace-Id",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LeadUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LeadResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "leads"
        ],
        "summary": "Delete Lead",
        "description": "Delete a lead.",
        "operationId": "delete_lead_api_leads__lead_id__delete",
        "parameters": [
          {
            "name": "lead_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Lead Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Authorization"
            }
          },
          {
            "name": "X-Workspace-Id",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/leads/{lead_id}/activity": {
      "get": {
        "tags": [
          "leads"
        ],
        "summary": "Get Lead Activity",
        "description": "Get all interaction activity for a specific lead.",
        "operationId": "get_lead_activity_api_leads__lead_id__activity_get",
        "parameters": [
          {
            "name": "lead_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Lead Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Authorization"
            }
          },
          {
            "name": "X-Workspace-Id",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/leads/import/preview": {
      "post": {
        "tags": [
          "leads"
        ],
        "summary": "Preview Import",
        "description": "Preview CSV file and get suggested field mapping.",
        "operationId": "preview_import_api_leads_import_preview_post",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Authorization"
            }
          },
          {
            "name": "X-Workspace-Id",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Body_preview_import_api_leads_import_preview_post"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CSVPreviewResult"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/leads/import": {
      "post": {
        "tags": [
          "leads"
        ],
        "summary": "Import Leads",
        "description": "Import leads from CSV with field mapping.",
        "operationId": "import_leads_api_leads_import_post",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Authorization"
            }
          },
          {
            "name": "X-Workspace-Id",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ImportMappingRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ImportResult"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/leads/bulk/delete": {
      "post": {
        "tags": [
          "leads"
        ],
        "summary": "Bulk Delete Leads",
        "description": "Delete multiple leads.",
        "operationId": "bulk_delete_leads_api_leads_bulk_delete_post",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Authorization"
            }
          },
          {
            "name": "X-Workspace-Id",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BulkDeleteRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/leads/bulk/tag": {
      "post": {
        "tags": [
          "leads"
        ],
        "summary": "Bulk Tag Leads",
        "description": "Add tags to multiple leads.",
        "operationId": "bulk_tag_leads_api_leads_bulk_tag_post",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Authorization"
            }
          },
          {
            "name": "X-Workspace-Id",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BulkTagRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/leads/bulk/untag": {
      "post": {
        "tags": [
          "leads"
        ],
        "summary": "Bulk Untag Leads",
        "description": "Remove tags from multiple leads.",
        "operationId": "bulk_untag_leads_api_leads_bulk_untag_post",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Authorization"
            }
          },
          {
            "name": "X-Workspace-Id",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BulkTagRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/leads/export/csv": {
      "get": {
        "tags": [
          "leads"
        ],
        "summary": "Export Leads",
        "description": "Export leads to CSV format.",
        "operationId": "export_leads_api_leads_export_csv_get",
        "parameters": [
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Search"
            }
          },
          {
            "name": "tags",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tags"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Authorization"
            }
          },
          {
            "name": "X-Workspace-Id",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/campaigns": {
      "get": {
        "tags": [
          "campaigns"
        ],
        "summary": "List Campaigns",
        "description": "List all campaigns for the current workspace.",
        "operationId": "list_campaigns_api_campaigns_get",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Authorization"
            }
          },
          {
            "name": "X-Workspace-Id",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CampaignResponse"
                  },
                  "title": "Response List Campaigns Api Campaigns Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "campaigns"
        ],
        "summary": "Create Campaign",
        "description": "Create a new campaign.",
        "operationId": "create_campaign_api_campaigns_post",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Authorization"
            }
          },
          {
            "name": "X-Workspace-Id",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CampaignCreate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CampaignResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/campaigns/{campaign_id}": {
      "get": {
        "tags": [
          "campaigns"
        ],
        "summary": "Get Campaign",
        "description": "Get a specific campaign.",
        "operationId": "get_campaign_api_campaigns__campaign_id__get",
        "parameters": [
          {
            "name": "campaign_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Campaign Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Authorization"
            }
          },
          {
            "name": "X-Workspace-Id",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CampaignResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "campaigns"
        ],
        "summary": "Update Campaign",
        "description": "Update a campaign.",
        "operationId": "update_campaign_api_campaigns__campaign_id__patch",
        "parameters": [
          {
            "name": "campaign_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Campaign Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Authorization"
            }
          },
          {
            "name": "X-Workspace-Id",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CampaignUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CampaignResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "campaigns"
        ],
        "summary": "Delete Campaign",
        "description": "Delete a campaign.",
        "operationId": "delete_campaign_api_campaigns__campaign_id__delete",
        "parameters": [
          {
            "name": "campaign_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Campaign Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Authorization"
            }
          },
          {
            "name": "X-Workspace-Id",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/campaigns/{campaign_id}/start": {
      "post": {
        "tags": [
          "campaigns"
        ],
        "summary": "Start Campaign",
        "description": "Start a campaign.",
        "operationId": "start_campaign_api_campaigns__campaign_id__start_post",
        "parameters": [
          {
            "name": "campaign_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Campaign Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Authorization"
            }
          },
          {
            "name": "X-Workspace-Id",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CampaignResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/campaigns/{campaign_id}/pause": {
      "post": {
        "tags": [
          "campaigns"
        ],
        "summary": "Pause Campaign",
        "description": "Pause an active campaign.",
        "operationId": "pause_campaign_api_campaigns__campaign_id__pause_post",
        "parameters": [
          {
            "name": "campaign_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Campaign Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Authorization"
            }
          },
          {
            "name": "X-Workspace-Id",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CampaignResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/campaigns/{campaign_id}/resume": {
      "post": {
        "tags": [
          "campaigns"
        ],
        "summary": "Resume Campaign",
        "description": "Resume a paused campaign.",
        "operationId": "resume_campaign_api_campaigns__campaign_id__resume_post",
        "parameters": [
          {
            "name": "campaign_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Campaign Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Authorization"
            }
          },
          {
            "name": "X-Workspace-Id",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CampaignResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/campaigns/{campaign_id}/sequences": {
      "get": {
        "tags": [
          "campaigns"
        ],
        "summary": "List Sequences",
        "description": "List all sequences for a campaign.",
        "operationId": "list_sequences_api_campaigns__campaign_id__sequences_get",
        "parameters": [
          {
            "name": "campaign_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Campaign Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Authorization"
            }
          },
          {
            "name": "X-Workspace-Id",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SequenceResponse"
                  },
                  "title": "Response List Sequences Api Campaigns  Campaign Id  Sequences Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "campaigns"
        ],
        "summary": "Create Sequence",
        "description": "Create a new sequence step.",
        "operationId": "create_sequence_api_campaigns__campaign_id__sequences_post",
        "parameters": [
          {
            "name": "campaign_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Campaign Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Authorization"
            }
          },
          {
            "name": "X-Workspace-Id",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SequenceCreate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SequenceResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/campaigns/{campaign_id}/sequences/{sequence_id}": {
      "patch": {
        "tags": [
          "campaigns"
        ],
        "summary": "Update Sequence",
        "description": "Update a sequence step.",
        "operationId": "update_sequence_api_campaigns__campaign_id__sequences__sequence_id__patch",
        "parameters": [
          {
            "name": "campaign_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Campaign Id"
            }
          },
          {
            "name": "sequence_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Sequence Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Authorization"
            }
          },
          {
            "name": "X-Workspace-Id",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SequenceUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SequenceResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "campaigns"
        ],
        "summary": "Delete Sequence",
        "description": "Delete a sequence step.",
        "operationId": "delete_sequence_api_campaigns__campaign_id__sequences__sequence_id__delete",
        "parameters": [
          {
            "name": "campaign_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Campaign Id"
            }
          },
          {
            "name": "sequence_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Sequence Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Authorization"
            }
          },
          {
            "name": "X-Workspace-Id",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/campaigns/{campaign_id}/leads": {
      "get": {
        "tags": [
          "campaigns"
        ],
        "summary": "List Campaign Leads",
        "description": "List leads assigned to a campaign.",
        "operationId": "list_campaign_leads_api_campaigns__campaign_id__leads_get",
        "parameters": [
          {
            "name": "campaign_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Campaign Id"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1,
              "title": "Page"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "default": 50,
              "title": "Pagesize"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Authorization"
            }
          },
          {
            "name": "X-Workspace-Id",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "campaigns"
        ],
        "summary": "Add Leads To Campaign",
        "description": "Add leads to a campaign.",
        "operationId": "add_leads_to_campaign_api_campaigns__campaign_id__leads_post",
        "parameters": [
          {
            "name": "campaign_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Campaign Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Authorization"
            }
          },
          {
            "name": "X-Workspace-Id",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddLeadsRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/campaigns/{campaign_id}/leads/{lead_id}": {
      "delete": {
        "tags": [
          "campaigns"
        ],
        "summary": "Remove Lead From Campaign",
        "description": "Remove a lead from a campaign.",
        "operationId": "remove_lead_from_campaign_api_campaigns__campaign_id__leads__lead_id__delete",
        "parameters": [
          {
            "name": "campaign_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Campaign Id"
            }
          },
          {
            "name": "lead_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Lead Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Authorization"
            }
          },
          {
            "name": "X-Workspace-Id",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/campaigns/{campaign_id}/accounts": {
      "get": {
        "tags": [
          "campaigns"
        ],
        "summary": "List Campaign Accounts",
        "description": "List email accounts assigned to a campaign.",
        "operationId": "list_campaign_accounts_api_campaigns__campaign_id__accounts_get",
        "parameters": [
          {
            "name": "campaign_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Campaign Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Authorization"
            }
          },
          {
            "name": "X-Workspace-Id",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "campaigns"
        ],
        "summary": "Add Accounts To Campaign",
        "description": "Add email accounts to a campaign.",
        "operationId": "add_accounts_to_campaign_api_campaigns__campaign_id__accounts_post",
        "parameters": [
          {
            "name": "campaign_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Campaign Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Authorization"
            }
          },
          {
            "name": "X-Workspace-Id",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddAccountsRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/campaigns/{campaign_id}/accounts/{account_id}": {
      "delete": {
        "tags": [
          "campaigns"
        ],
        "summary": "Remove Account From Campaign",
        "description": "Remove an email account from a campaign.",
        "operationId": "remove_account_from_campaign_api_campaigns__campaign_id__accounts__account_id__delete",
        "parameters": [
          {
            "name": "campaign_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Campaign Id"
            }
          },
          {
            "name": "account_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Account Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Authorization"
            }
          },
          {
            "name": "X-Workspace-Id",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/campaigns/{campaign_id}/preview": {
      "post": {
        "tags": [
          "campaigns"
        ],
        "summary": "Preview Email",
        "description": "Preview email with spin syntax and variables replaced.",
        "operationId": "preview_email_api_campaigns__campaign_id__preview_post",
        "parameters": [
          {
            "name": "campaign_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Campaign Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Authorization"
            }
          },
          {
            "name": "X-Workspace-Id",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PreviewRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PreviewResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/campaigns/{campaign_id}/send-manual": {
      "post": {
        "tags": [
          "campaigns"
        ],
        "summary": "Send Manual Email",
        "description": "Send a manual email through a campaign's connected account.",
        "operationId": "send_manual_email_api_campaigns__campaign_id__send_manual_post",
        "parameters": [
          {
            "name": "campaign_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Campaign Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Authorization"
            }
          },
          {
            "name": "X-Workspace-Id",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ManualEmailRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManualEmailResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/unibox/threads": {
      "get": {
        "tags": [
          "unibox"
        ],
        "summary": "List Replies",
        "description": "List all replies (threads) for the current workspace's accounts.",
        "operationId": "list_replies_api_unibox_threads_get",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1,
              "title": "Page"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "default": 50,
              "title": "Pagesize"
            }
          },
          {
            "name": "category",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Category"
            }
          },
          {
            "name": "isRead",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Isread"
            }
          },
          {
            "name": "isStarred",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Isstarred"
            }
          },
          {
            "name": "accountId",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Accountid"
            }
          },
          {
            "name": "campaignId",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Campaignid"
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Search"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Authorization"
            }
          },
          {
            "name": "X-Workspace-Id",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReplyListResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/unibox/threads/{reply_id}": {
      "get": {
        "tags": [
          "unibox"
        ],
        "summary": "Get Reply",
        "description": "Get a specific reply thread.",
        "operationId": "get_reply_api_unibox_threads__reply_id__get",
        "parameters": [
          {
            "name": "reply_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Reply Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Authorization"
            }
          },
          {
            "name": "X-Workspace-Id",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReplyResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "unibox"
        ],
        "summary": "Update Reply",
        "description": "Update a reply (mark read, star, categorize).",
        "operationId": "update_reply_api_unibox_threads__reply_id__patch",
        "parameters": [
          {
            "name": "reply_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Reply Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Authorization"
            }
          },
          {
            "name": "X-Workspace-Id",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateReplyRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReplyResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/unibox/threads/{reply_id}/reply": {
      "post": {
        "tags": [
          "unibox"
        ],
        "summary": "Send Reply",
        "description": "Send a reply to an email.",
        "operationId": "send_reply_api_unibox_threads__reply_id__reply_post",
        "parameters": [
          {
            "name": "reply_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Reply Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Authorization"
            }
          },
          {
            "name": "X-Workspace-Id",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SendReplyRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/unibox/stats": {
      "get": {
        "tags": [
          "unibox"
        ],
        "summary": "Get Unibox Stats",
        "description": "Get statistics for the unified inbox.",
        "operationId": "get_unibox_stats_api_unibox_stats_get",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Authorization"
            }
          },
          {
            "name": "X-Workspace-Id",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UniboxStatsResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/unibox/threads/{reply_id}/mark-read": {
      "post": {
        "tags": [
          "unibox"
        ],
        "summary": "Mark As Read",
        "description": "Mark a reply as read.",
        "operationId": "mark_as_read_api_unibox_threads__reply_id__mark_read_post",
        "parameters": [
          {
            "name": "reply_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Reply Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Authorization"
            }
          },
          {
            "name": "X-Workspace-Id",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/unibox/mark-all-read": {
      "post": {
        "tags": [
          "unibox"
        ],
        "summary": "Mark All As Read",
        "description": "Mark all replies as read, optionally filtered by category.",
        "operationId": "mark_all_as_read_api_unibox_mark_all_read_post",
        "parameters": [
          {
            "name": "category",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Category"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Authorization"
            }
          },
          {
            "name": "X-Workspace-Id",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/unibox/threads/{reply_id}/regenerate-draft": {
      "post": {
        "tags": [
          "unibox"
        ],
        "summary": "Regenerate Draft",
        "description": "Regenerate AI draft reply for a specific reply.",
        "operationId": "regenerate_draft_api_unibox_threads__reply_id__regenerate_draft_post",
        "parameters": [
          {
            "name": "reply_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Reply Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Authorization"
            }
          },
          {
            "name": "X-Workspace-Id",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/analytics/overview": {
      "get": {
        "tags": [
          "analytics"
        ],
        "summary": "Get Dashboard Stats",
        "description": "Get overview statistics for the dashboard.",
        "operationId": "get_dashboard_stats_api_analytics_overview_get",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Authorization"
            }
          },
          {
            "name": "X-Workspace-Id",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DashboardStatsResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/analytics/campaigns/{campaign_id}": {
      "get": {
        "tags": [
          "analytics"
        ],
        "summary": "Get Campaign Analytics",
        "description": "Get detailed analytics for a specific campaign.",
        "operationId": "get_campaign_analytics_api_analytics_campaigns__campaign_id__get",
        "parameters": [
          {
            "name": "campaign_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Campaign Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Authorization"
            }
          },
          {
            "name": "X-Workspace-Id",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CampaignAnalyticsResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/analytics/accounts/{account_id}": {
      "get": {
        "tags": [
          "analytics"
        ],
        "summary": "Get Account Analytics",
        "description": "Get detailed analytics for a specific email account.",
        "operationId": "get_account_analytics_api_analytics_accounts__account_id__get",
        "parameters": [
          {
            "name": "account_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Account Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Authorization"
            }
          },
          {
            "name": "X-Workspace-Id",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountAnalyticsResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/analytics/activity": {
      "get": {
        "tags": [
          "analytics"
        ],
        "summary": "Get Recent Activity",
        "description": "Get recent activity feed.",
        "operationId": "get_recent_activity_api_analytics_activity_get",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 10,
              "title": "Limit"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Authorization"
            }
          },
          {
            "name": "X-Workspace-Id",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/analytics/leaderboard": {
      "get": {
        "tags": [
          "analytics"
        ],
        "summary": "Get Campaign Leaderboard",
        "description": "Get campaign performance leaderboard.",
        "operationId": "get_campaign_leaderboard_api_analytics_leaderboard_get",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Authorization"
            }
          },
          {
            "name": "X-Workspace-Id",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/templates": {
      "get": {
        "tags": [
          "templates"
        ],
        "summary": "List Templates",
        "description": "List all templates for the current workspace.",
        "operationId": "list_templates_api_templates_get",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Authorization"
            }
          },
          {
            "name": "X-Workspace-Id",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/TemplateResponse"
                  },
                  "title": "Response List Templates Api Templates Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "templates"
        ],
        "summary": "Create Template",
        "description": "Create a new template.",
        "operationId": "create_template_api_templates_post",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Authorization"
            }
          },
          {
            "name": "X-Workspace-Id",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TemplateCreate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TemplateResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/templates/{template_id}": {
      "get": {
        "tags": [
          "templates"
        ],
        "summary": "Get Template",
        "description": "Get a specific template.",
        "operationId": "get_template_api_templates__template_id__get",
        "parameters": [
          {
            "name": "template_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Template Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Authorization"
            }
          },
          {
            "name": "X-Workspace-Id",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TemplateResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "templates"
        ],
        "summary": "Update Template",
        "description": "Update a template.",
        "operationId": "update_template_api_templates__template_id__patch",
        "parameters": [
          {
            "name": "template_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Template Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Authorization"
            }
          },
          {
            "name": "X-Workspace-Id",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/app__routers__templates__TemplateUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TemplateResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "templates"
        ],
        "summary": "Delete Template",
        "description": "Delete a template.",
        "operationId": "delete_template_api_templates__template_id__delete",
        "parameters": [
          {
            "name": "template_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Template Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Authorization"
            }
          },
          {
            "name": "X-Workspace-Id",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/warmup/pool": {
      "get": {
        "tags": [
          "warmup"
        ],
        "summary": "Get Warmup Pool",
        "description": "List warmup-enabled accounts for the workspace with pool stats.",
        "operationId": "get_warmup_pool_api_warmup_pool_get",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Authorization"
            }
          },
          {
            "name": "X-Workspace-Id",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/warmup/stats": {
      "get": {
        "tags": [
          "warmup"
        ],
        "summary": "Get Warmup Stats",
        "description": "Get aggregate warmup stats across the workspace's accounts.",
        "operationId": "get_warmup_stats_api_warmup_stats_get",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Authorization"
            }
          },
          {
            "name": "X-Workspace-Id",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/warmup/logs": {
      "get": {
        "tags": [
          "warmup"
        ],
        "summary": "Get Warmup Logs",
        "description": "Get recent warmup logs involving the workspace's accounts.",
        "operationId": "get_warmup_logs_api_warmup_logs_get",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Authorization"
            }
          },
          {
            "name": "X-Workspace-Id",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/settings/profile": {
      "patch": {
        "tags": [
          "settings"
        ],
        "summary": "Update Profile",
        "description": "Update user profile (name, timezone).",
        "operationId": "update_profile_api_settings_profile_patch",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Authorization"
            }
          },
          {
            "name": "X-Workspace-Id",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProfileUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProfileResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/settings/workspace-defaults": {
      "get": {
        "tags": [
          "settings"
        ],
        "summary": "Get Workspace Defaults",
        "description": "Get workspace default settings.",
        "operationId": "get_workspace_defaults_api_settings_workspace_defaults_get",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Authorization"
            }
          },
          {
            "name": "X-Workspace-Id",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkspaceDefaultsResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "settings"
        ],
        "summary": "Update Workspace Defaults",
        "description": "Update workspace default settings.",
        "operationId": "update_workspace_defaults_api_settings_workspace_defaults_patch",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Authorization"
            }
          },
          {
            "name": "X-Workspace-Id",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WorkspaceDefaultsUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkspaceDefaultsResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/settings/webhooks": {
      "get": {
        "tags": [
          "settings"
        ],
        "summary": "List Webhooks",
        "description": "List all webhooks for the current workspace.",
        "operationId": "list_webhooks_api_settings_webhooks_get",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Authorization"
            }
          },
          {
            "name": "X-Workspace-Id",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/WebhookResponse"
                  },
                  "title": "Response List Webhooks Api Settings Webhooks Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "settings"
        ],
        "summary": "Create Webhook",
        "description": "Create a new webhook. Returns the full secret only on creation.",
        "operationId": "create_webhook_api_settings_webhooks_post",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Authorization"
            }
          },
          {
            "name": "X-Workspace-Id",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/app__routers__settings__WebhookCreate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/settings/webhooks/{webhook_id}": {
      "patch": {
        "tags": [
          "settings"
        ],
        "summary": "Update Webhook",
        "description": "Update a webhook.",
        "operationId": "update_webhook_api_settings_webhooks__webhook_id__patch",
        "parameters": [
          {
            "name": "webhook_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Webhook Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Authorization"
            }
          },
          {
            "name": "X-Workspace-Id",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "settings"
        ],
        "summary": "Delete Webhook",
        "description": "Delete a webhook.",
        "operationId": "delete_webhook_api_settings_webhooks__webhook_id__delete",
        "parameters": [
          {
            "name": "webhook_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Webhook Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Authorization"
            }
          },
          {
            "name": "X-Workspace-Id",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/settings/webhooks/{webhook_id}/test": {
      "post": {
        "tags": [
          "settings"
        ],
        "summary": "Test Webhook",
        "description": "Send a test event to a webhook.",
        "operationId": "test_webhook_api_settings_webhooks__webhook_id__test_post",
        "parameters": [
          {
            "name": "webhook_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Webhook Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Authorization"
            }
          },
          {
            "name": "X-Workspace-Id",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/settings/events": {
      "get": {
        "tags": [
          "settings"
        ],
        "summary": "List Events",
        "description": "Get paginated event log.",
        "operationId": "list_events_api_settings_events_get",
        "parameters": [
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Type"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1,
              "title": "Page"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "default": 50,
              "title": "Pagesize"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Authorization"
            }
          },
          {
            "name": "X-Workspace-Id",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventListResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/settings/events/types": {
      "get": {
        "tags": [
          "settings"
        ],
        "summary": "List Event Types",
        "description": "List all valid event types.",
        "operationId": "list_event_types_api_settings_events_types_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        }
      }
    },
    "/api/settings/webhooks/{webhook_id}/deliveries": {
      "get": {
        "tags": [
          "settings"
        ],
        "summary": "List Deliveries",
        "description": "Get delivery log for a webhook.",
        "operationId": "list_deliveries_api_settings_webhooks__webhook_id__deliveries_get",
        "parameters": [
          {
            "name": "webhook_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Webhook Id"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1,
              "title": "Page"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "default": 50,
              "title": "Pagesize"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Authorization"
            }
          },
          {
            "name": "X-Workspace-Id",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeliveryListResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/admin/users": {
      "get": {
        "tags": [
          "admin"
        ],
        "summary": "List Users",
        "description": "List all users with their stats.",
        "operationId": "list_users_api_admin_users_get",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UsersListResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/admin/impersonate/{user_id}": {
      "post": {
        "tags": [
          "admin"
        ],
        "summary": "Impersonate User",
        "description": "Generate a short-lived JWT to act as another user.",
        "operationId": "impersonate_user_api_admin_impersonate__user_id__post",
        "parameters": [
          {
            "name": "user_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "User Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ImpersonateResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/admin/settings/openai": {
      "get": {
        "tags": [
          "admin"
        ],
        "summary": "Get Openai Key Status",
        "description": "Get OpenAI API key configuration status.",
        "operationId": "get_openai_key_status_api_admin_settings_openai_get",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OpenAIKeyStatus"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "admin"
        ],
        "summary": "Set Openai Key",
        "description": "Set or update the global OpenAI API key.",
        "operationId": "set_openai_key_api_admin_settings_openai_put",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Authorization"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OpenAIKeyUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OpenAIKeyStatus"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "admin"
        ],
        "summary": "Delete Openai Key",
        "description": "Remove the global OpenAI API key.",
        "operationId": "delete_openai_key_api_admin_settings_openai_delete",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/admin/stats": {
      "get": {
        "tags": [
          "admin"
        ],
        "summary": "Get Platform Stats",
        "description": "Get platform-wide statistics.",
        "operationId": "get_platform_stats_api_admin_stats_get",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlatformStats"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/workspaces": {
      "get": {
        "tags": [
          "workspaces"
        ],
        "summary": "List Workspaces",
        "description": "List all workspaces the current user is a member of.",
        "operationId": "list_workspaces_api_workspaces_get",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/WorkspaceResponse"
                  },
                  "title": "Response List Workspaces Api Workspaces Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "workspaces"
        ],
        "summary": "Create Workspace",
        "description": "Create a new workspace.",
        "operationId": "create_workspace_api_workspaces_post",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Authorization"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WorkspaceCreate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkspaceResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/workspaces/{workspace_id}": {
      "get": {
        "tags": [
          "workspaces"
        ],
        "summary": "Get Workspace",
        "description": "Get workspace details.",
        "operationId": "get_workspace_api_workspaces__workspace_id__get",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Workspace Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkspaceResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "workspaces"
        ],
        "summary": "Update Workspace",
        "description": "Update workspace details. Requires owner or admin role.",
        "operationId": "update_workspace_api_workspaces__workspace_id__patch",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Workspace Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Authorization"
            }
          },
          {
            "name": "X-Workspace-Id",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WorkspaceUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkspaceResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "workspaces"
        ],
        "summary": "Delete Workspace",
        "description": "Delete a workspace. Only the owner can delete. Cannot delete personal workspace.",
        "operationId": "delete_workspace_api_workspaces__workspace_id__delete",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Workspace Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/workspaces/{workspace_id}/members": {
      "get": {
        "tags": [
          "workspaces"
        ],
        "summary": "List Members",
        "description": "List workspace members.",
        "operationId": "list_members_api_workspaces__workspace_id__members_get",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Workspace Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/MemberResponse"
                  },
                  "title": "Response List Members Api Workspaces  Workspace Id  Members Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/workspaces/{workspace_id}/members/invite": {
      "post": {
        "tags": [
          "workspaces"
        ],
        "summary": "Invite Member",
        "description": "Invite a user to the workspace by email. Requires owner or admin role.",
        "operationId": "invite_member_api_workspaces__workspace_id__members_invite_post",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Workspace Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Authorization"
            }
          },
          {
            "name": "X-Workspace-Id",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InviteCreate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InviteResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/workspaces/{workspace_id}/members/{member_id}": {
      "patch": {
        "tags": [
          "workspaces"
        ],
        "summary": "Update Member Role",
        "description": "Change a member's role. Only the workspace owner can change roles.",
        "operationId": "update_member_role_api_workspaces__workspace_id__members__member_id__patch",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Workspace Id"
            }
          },
          {
            "name": "member_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Member Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Authorization"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MemberRoleUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MemberResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "workspaces"
        ],
        "summary": "Remove Member",
        "description": "Remove a member from the workspace. Requires owner or admin role.",
        "operationId": "remove_member_api_workspaces__workspace_id__members__member_id__delete",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Workspace Id"
            }
          },
          {
            "name": "member_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Member Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Authorization"
            }
          },
          {
            "name": "X-Workspace-Id",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/workspaces/invites/{token}/accept": {
      "post": {
        "tags": [
          "workspaces"
        ],
        "summary": "Accept Invite",
        "description": "Accept a workspace invitation.",
        "operationId": "accept_invite_api_workspaces_invites__token__accept_post",
        "parameters": [
          {
            "name": "token",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Token"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/workspaces/invites/pending": {
      "get": {
        "tags": [
          "workspaces"
        ],
        "summary": "List Pending Invites",
        "description": "List pending invitations for the current user's email.",
        "operationId": "list_pending_invites_api_workspaces_invites_pending_get",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/InviteResponse"
                  },
                  "title": "Response List Pending Invites Api Workspaces Invites Pending Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/workspaces/{workspace_id}/api-keys": {
      "get": {
        "tags": [
          "workspaces"
        ],
        "summary": "List Api Keys",
        "description": "List API keys for a workspace. Requires owner or admin role.",
        "operationId": "list_api_keys_api_workspaces__workspace_id__api_keys_get",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Workspace Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Authorization"
            }
          },
          {
            "name": "X-Workspace-Id",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ApiKeyResponse"
                  },
                  "title": "Response List Api Keys Api Workspaces  Workspace Id  Api Keys Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "workspaces"
        ],
        "summary": "Create Api Key",
        "description": "Create a new API key. The full key is returned ONLY in this response.",
        "operationId": "create_api_key_api_workspaces__workspace_id__api_keys_post",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Workspace Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Authorization"
            }
          },
          {
            "name": "X-Workspace-Id",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiKeyCreate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiKeyCreatedResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/workspaces/{workspace_id}/api-keys/{key_id}": {
      "delete": {
        "tags": [
          "workspaces"
        ],
        "summary": "Revoke Api Key",
        "description": "Revoke an API key. Requires owner or admin role.",
        "operationId": "revoke_api_key_api_workspaces__workspace_id__api_keys__key_id__delete",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Workspace Id"
            }
          },
          {
            "name": "key_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Key Id"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Authorization"
            }
          },
          {
            "name": "X-Workspace-Id",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/leads": {
      "get": {
        "tags": [
          "v1-leads"
        ],
        "summary": "List Leads",
        "description": "List leads with pagination, optional search and status filter.",
        "operationId": "list_leads_api_v1_leads_get",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1,
              "title": "Page"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "default": 50,
              "title": "Pagesize"
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Search"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          },
          {
            "name": "X-API-Key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "v1-leads"
        ],
        "summary": "Create Lead",
        "description": "Create a new lead. Deduplicates by workspace + email.",
        "operationId": "create_lead_api_v1_leads_post",
        "parameters": [
          {
            "name": "X-API-Key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/app__routers__v1__leads__LeadCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/leads/{lead_id}": {
      "get": {
        "tags": [
          "v1-leads"
        ],
        "summary": "Get Lead",
        "description": "Get a single lead by ID.",
        "operationId": "get_lead_api_v1_leads__lead_id__get",
        "parameters": [
          {
            "name": "lead_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Lead Id"
            }
          },
          {
            "name": "X-API-Key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "v1-leads"
        ],
        "summary": "Update Lead",
        "description": "Partially update an existing lead.",
        "operationId": "update_lead_api_v1_leads__lead_id__patch",
        "parameters": [
          {
            "name": "lead_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Lead Id"
            }
          },
          {
            "name": "X-API-Key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/app__routers__v1__leads__LeadUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "v1-leads"
        ],
        "summary": "Delete Lead",
        "description": "Delete a lead by ID.",
        "operationId": "delete_lead_api_v1_leads__lead_id__delete",
        "parameters": [
          {
            "name": "lead_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Lead Id"
            }
          },
          {
            "name": "X-API-Key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/campaigns": {
      "get": {
        "tags": [
          "v1-campaigns"
        ],
        "summary": "List Campaigns",
        "description": "List campaigns for the workspace, with optional status filter and pagination.",
        "operationId": "list_campaigns_api_v1_campaigns_get",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by status (draft, active, paused, completed)",
              "title": "Status"
            },
            "description": "Filter by status (draft, active, paused, completed)"
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1,
              "title": "Page"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "default": 20,
              "title": "Pagesize"
            }
          },
          {
            "name": "X-API-Key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "v1-campaigns"
        ],
        "summary": "Create Campaign",
        "description": "Create a new campaign in draft status.",
        "operationId": "create_campaign_api_v1_campaigns_post",
        "parameters": [
          {
            "name": "X-API-Key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CampaignCreateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/campaigns/{campaign_id}": {
      "get": {
        "tags": [
          "v1-campaigns"
        ],
        "summary": "Get Campaign",
        "description": "Get a single campaign including its sequence steps.",
        "operationId": "get_campaign_api_v1_campaigns__campaign_id__get",
        "parameters": [
          {
            "name": "campaign_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Campaign Id"
            }
          },
          {
            "name": "X-API-Key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "v1-campaigns"
        ],
        "summary": "Update Campaign",
        "description": "Update a campaign. Cannot edit while campaign is active.",
        "operationId": "update_campaign_api_v1_campaigns__campaign_id__patch",
        "parameters": [
          {
            "name": "campaign_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Campaign Id"
            }
          },
          {
            "name": "X-API-Key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CampaignUpdateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "v1-campaigns"
        ],
        "summary": "Delete Campaign",
        "description": "Delete a campaign. Only draft campaigns can be deleted.",
        "operationId": "delete_campaign_api_v1_campaigns__campaign_id__delete",
        "parameters": [
          {
            "name": "campaign_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Campaign Id"
            }
          },
          {
            "name": "X-API-Key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/campaigns/{campaign_id}/start": {
      "post": {
        "tags": [
          "v1-campaigns"
        ],
        "summary": "Start Campaign",
        "description": "Start a campaign (transitions from draft/paused to active).",
        "operationId": "start_campaign_api_v1_campaigns__campaign_id__start_post",
        "parameters": [
          {
            "name": "campaign_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Campaign Id"
            }
          },
          {
            "name": "X-API-Key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/campaigns/{campaign_id}/pause": {
      "post": {
        "tags": [
          "v1-campaigns"
        ],
        "summary": "Pause Campaign",
        "description": "Pause an active campaign.",
        "operationId": "pause_campaign_api_v1_campaigns__campaign_id__pause_post",
        "parameters": [
          {
            "name": "campaign_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Campaign Id"
            }
          },
          {
            "name": "X-API-Key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/email-accounts": {
      "get": {
        "tags": [
          "v1-email-accounts"
        ],
        "summary": "List Email Accounts",
        "description": "List all email accounts for the workspace (paginated).",
        "operationId": "list_email_accounts_api_v1_email_accounts_get",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "description": "Page number",
              "default": 1,
              "title": "Page"
            },
            "description": "Page number"
          },
          {
            "name": "pageSize",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "description": "Items per page",
              "default": 20,
              "title": "Pagesize"
            },
            "description": "Items per page"
          },
          {
            "name": "X-API-Key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/email-accounts/{account_id}": {
      "get": {
        "tags": [
          "v1-email-accounts"
        ],
        "summary": "Get Email Account",
        "description": "Get a single email account by ID.",
        "operationId": "get_email_account_api_v1_email_accounts__account_id__get",
        "parameters": [
          {
            "name": "account_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Account Id"
            }
          },
          {
            "name": "X-API-Key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "v1-email-accounts"
        ],
        "summary": "Delete Email Account",
        "description": "Delete an email account.",
        "operationId": "delete_email_account_api_v1_email_accounts__account_id__delete",
        "parameters": [
          {
            "name": "account_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Account Id"
            }
          },
          {
            "name": "X-API-Key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/templates": {
      "get": {
        "tags": [
          "v1-templates"
        ],
        "summary": "List Templates",
        "description": "List templates for the workspace (paginated, optional category filter).",
        "operationId": "list_templates_api_v1_templates_get",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "description": "Page number",
              "default": 1,
              "title": "Page"
            },
            "description": "Page number"
          },
          {
            "name": "pageSize",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "description": "Items per page",
              "default": 20,
              "title": "Pagesize"
            },
            "description": "Items per page"
          },
          {
            "name": "category",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by category (e.g. email, reply_macro)",
              "title": "Category"
            },
            "description": "Filter by category (e.g. email, reply_macro)"
          },
          {
            "name": "X-API-Key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "v1-templates"
        ],
        "summary": "Create Template",
        "description": "Create a new template.",
        "operationId": "create_template_api_v1_templates_post",
        "parameters": [
          {
            "name": "X-API-Key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/app__routers__v1__templates__TemplateCreate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/templates/{template_id}": {
      "get": {
        "tags": [
          "v1-templates"
        ],
        "summary": "Get Template",
        "description": "Get a single template by ID.",
        "operationId": "get_template_api_v1_templates__template_id__get",
        "parameters": [
          {
            "name": "template_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Template Id"
            }
          },
          {
            "name": "X-API-Key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "v1-templates"
        ],
        "summary": "Update Template",
        "description": "Update an existing template.",
        "operationId": "update_template_api_v1_templates__template_id__patch",
        "parameters": [
          {
            "name": "template_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Template Id"
            }
          },
          {
            "name": "X-API-Key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TemplateUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "v1-templates"
        ],
        "summary": "Delete Template",
        "description": "Delete a template.",
        "operationId": "delete_template_api_v1_templates__template_id__delete",
        "parameters": [
          {
            "name": "template_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Template Id"
            }
          },
          {
            "name": "X-API-Key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/webhooks/events": {
      "get": {
        "tags": [
          "v1-webhooks"
        ],
        "summary": "List Event Types",
        "description": "Return the static list of supported webhook event types.",
        "operationId": "list_event_types_api_v1_webhooks_events_get",
        "parameters": [
          {
            "name": "X-API-Key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/webhooks": {
      "get": {
        "tags": [
          "v1-webhooks"
        ],
        "summary": "List Webhooks",
        "description": "List all webhooks for the workspace (paginated).",
        "operationId": "list_webhooks_api_v1_webhooks_get",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "description": "Page number",
              "default": 1,
              "title": "Page"
            },
            "description": "Page number"
          },
          {
            "name": "pageSize",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "description": "Items per page",
              "default": 20,
              "title": "Pagesize"
            },
            "description": "Items per page"
          },
          {
            "name": "X-API-Key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "v1-webhooks"
        ],
        "summary": "Create Webhook",
        "description": "Create a new webhook. The signing secret is auto-generated and returned once.",
        "operationId": "create_webhook_api_v1_webhooks_post",
        "parameters": [
          {
            "name": "X-API-Key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookCreate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/webhooks/{webhook_id}": {
      "patch": {
        "tags": [
          "v1-webhooks"
        ],
        "summary": "Update Webhook",
        "description": "Update an existing webhook.",
        "operationId": "update_webhook_api_v1_webhooks__webhook_id__patch",
        "parameters": [
          {
            "name": "webhook_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Webhook Id"
            }
          },
          {
            "name": "X-API-Key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/app__routers__v1__webhooks__WebhookUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "v1-webhooks"
        ],
        "summary": "Delete Webhook",
        "description": "Delete a webhook.",
        "operationId": "delete_webhook_api_v1_webhooks__webhook_id__delete",
        "parameters": [
          {
            "name": "webhook_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Webhook Id"
            }
          },
          {
            "name": "X-API-Key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "X-Api-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/": {
      "get": {
        "summary": "Root",
        "description": "Root endpoint.",
        "operationId": "root__get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        }
      }
    },
    "/health": {
      "get": {
        "summary": "Health",
        "description": "Health check endpoint.",
        "operationId": "health_health_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "AccountAnalyticsResponse": {
        "properties": {
          "totalSent": {
            "type": "integer",
            "title": "Totalsent"
          },
          "totalWarmupSent": {
            "type": "integer",
            "title": "Totalwarmupsent"
          },
          "healthScore": {
            "type": "integer",
            "title": "Healthscore"
          },
          "bounceRate": {
            "type": "number",
            "title": "Bouncerate"
          },
          "replyRate": {
            "type": "number",
            "title": "Replyrate"
          },
          "sentByDay": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "type": "array",
            "title": "Sentbyday"
          }
        },
        "type": "object",
        "required": [
          "totalSent",
          "totalWarmupSent",
          "healthScore",
          "bounceRate",
          "replyRate",
          "sentByDay"
        ],
        "title": "AccountAnalyticsResponse"
      },
      "AddAccountsRequest": {
        "properties": {
          "accountIds": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Accountids"
          }
        },
        "type": "object",
        "required": [
          "accountIds"
        ],
        "title": "AddAccountsRequest"
      },
      "AddLeadsRequest": {
        "properties": {
          "leadIds": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Leadids"
          }
        },
        "type": "object",
        "required": [
          "leadIds"
        ],
        "title": "AddLeadsRequest"
      },
      "ApiKeyCreate": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "scopes": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Scopes"
          }
        },
        "type": "object",
        "required": [
          "name"
        ],
        "title": "ApiKeyCreate"
      },
      "ApiKeyCreatedResponse": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "prefix": {
            "type": "string",
            "title": "Prefix"
          },
          "scopes": {
            "items": {},
            "type": "array",
            "title": "Scopes"
          },
          "lastUsedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Lastusedat"
          },
          "expiresAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expiresat"
          },
          "createdAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Createdat"
          },
          "key": {
            "type": "string",
            "title": "Key"
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "prefix",
          "scopes",
          "key"
        ],
        "title": "ApiKeyCreatedResponse"
      },
      "ApiKeyResponse": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "prefix": {
            "type": "string",
            "title": "Prefix"
          },
          "scopes": {
            "items": {},
            "type": "array",
            "title": "Scopes"
          },
          "lastUsedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Lastusedat"
          },
          "expiresAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expiresat"
          },
          "createdAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Createdat"
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "prefix",
          "scopes"
        ],
        "title": "ApiKeyResponse"
      },
      "AuthUrlResponse": {
        "properties": {
          "url": {
            "type": "string",
            "title": "Url"
          }
        },
        "type": "object",
        "required": [
          "url"
        ],
        "title": "AuthUrlResponse"
      },
      "Body_preview_import_api_leads_import_preview_post": {
        "properties": {
          "file": {
            "type": "string",
            "format": "binary",
            "title": "File"
          }
        },
        "type": "object",
        "required": [
          "file"
        ],
        "title": "Body_preview_import_api_leads_import_preview_post"
      },
      "BulkDeleteRequest": {
        "properties": {
          "leadIds": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Leadids"
          }
        },
        "type": "object",
        "required": [
          "leadIds"
        ],
        "title": "BulkDeleteRequest"
      },
      "BulkTagRequest": {
        "properties": {
          "leadIds": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Leadids"
          },
          "tags": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Tags"
          }
        },
        "type": "object",
        "required": [
          "leadIds",
          "tags"
        ],
        "title": "BulkTagRequest"
      },
      "CSVPreviewResult": {
        "properties": {
          "headers": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Headers"
          },
          "sampleRows": {
            "items": {
              "additionalProperties": {
                "type": "string"
              },
              "type": "object"
            },
            "type": "array",
            "title": "Samplerows"
          },
          "totalRows": {
            "type": "integer",
            "title": "Totalrows"
          },
          "suggestedMapping": {
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "type": "object",
            "title": "Suggestedmapping"
          }
        },
        "type": "object",
        "required": [
          "headers",
          "sampleRows",
          "totalRows",
          "suggestedMapping"
        ],
        "title": "CSVPreviewResult",
        "description": "Result of CSV preview operation."
      },
      "CampaignAnalyticsResponse": {
        "properties": {
          "sent": {
            "type": "integer",
            "title": "Sent"
          },
          "delivered": {
            "type": "integer",
            "title": "Delivered"
          },
          "bounced": {
            "type": "integer",
            "title": "Bounced"
          },
          "replied": {
            "type": "integer",
            "title": "Replied"
          },
          "opened": {
            "type": "integer",
            "title": "Opened"
          },
          "replyRate": {
            "type": "number",
            "title": "Replyrate"
          },
          "bounceRate": {
            "type": "number",
            "title": "Bouncerate"
          },
          "dailyStats": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "type": "array",
            "title": "Dailystats"
          }
        },
        "type": "object",
        "required": [
          "sent",
          "delivered",
          "bounced",
          "replied",
          "opened",
          "replyRate",
          "bounceRate",
          "dailyStats"
        ],
        "title": "CampaignAnalyticsResponse"
      },
      "CampaignCreate": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "timezone": {
            "type": "string",
            "title": "Timezone",
            "default": "UTC"
          },
          "sendingDays": {
            "items": {
              "type": "integer"
            },
            "type": "array",
            "title": "Sendingdays",
            "default": [
              1,
              2,
              3,
              4,
              5
            ]
          },
          "sendingStartHour": {
            "type": "integer",
            "title": "Sendingstarthour",
            "default": 9
          },
          "sendingEndHour": {
            "type": "integer",
            "title": "Sendingendhour",
            "default": 17
          },
          "dailyLimit": {
            "type": "integer",
            "title": "Dailylimit",
            "default": 100
          },
          "context": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Context"
          }
        },
        "type": "object",
        "required": [
          "name"
        ],
        "title": "CampaignCreate"
      },
      "CampaignCreateRequest": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "timezone": {
            "type": "string",
            "title": "Timezone",
            "default": "UTC"
          },
          "sendingDays": {
            "items": {
              "type": "integer"
            },
            "type": "array",
            "title": "Sendingdays",
            "default": [
              1,
              2,
              3,
              4,
              5
            ]
          },
          "sendingStartHour": {
            "type": "integer",
            "title": "Sendingstarthour",
            "default": 9
          },
          "sendingEndHour": {
            "type": "integer",
            "title": "Sendingendhour",
            "default": 17
          },
          "dailyLimit": {
            "type": "integer",
            "title": "Dailylimit",
            "default": 50
          },
          "context": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Context"
          }
        },
        "type": "object",
        "required": [
          "name"
        ],
        "title": "CampaignCreateRequest"
      },
      "CampaignResponse": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "status": {
            "type": "string",
            "title": "Status"
          },
          "timezone": {
            "type": "string",
            "title": "Timezone"
          },
          "sendingDays": {
            "items": {
              "type": "integer"
            },
            "type": "array",
            "title": "Sendingdays"
          },
          "sendingStartHour": {
            "type": "integer",
            "title": "Sendingstarthour"
          },
          "sendingEndHour": {
            "type": "integer",
            "title": "Sendingendhour"
          },
          "dailyLimit": {
            "type": "integer",
            "title": "Dailylimit"
          },
          "context": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Context"
          },
          "sentToday": {
            "type": "integer",
            "title": "Senttoday"
          },
          "totalLeads": {
            "type": "integer",
            "title": "Totalleads"
          },
          "totalSent": {
            "type": "integer",
            "title": "Totalsent"
          },
          "totalDelivered": {
            "type": "integer",
            "title": "Totaldelivered"
          },
          "totalBounced": {
            "type": "integer",
            "title": "Totalbounced"
          },
          "totalReplied": {
            "type": "integer",
            "title": "Totalreplied"
          },
          "totalOpened": {
            "type": "integer",
            "title": "Totalopened"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "title": "Createdat"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "title": "Updatedat"
          },
          "startedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Startedat"
          },
          "completedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Completedat"
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "status",
          "timezone",
          "sendingDays",
          "sendingStartHour",
          "sendingEndHour",
          "dailyLimit",
          "sentToday",
          "totalLeads",
          "totalSent",
          "totalDelivered",
          "totalBounced",
          "totalReplied",
          "totalOpened",
          "createdAt",
          "updatedAt",
          "startedAt",
          "completedAt"
        ],
        "title": "CampaignResponse"
      },
      "CampaignUpdate": {
        "properties": {
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "timezone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Timezone"
          },
          "sendingDays": {
            "anyOf": [
              {
                "items": {
                  "type": "integer"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sendingdays"
          },
          "sendingStartHour": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sendingstarthour"
          },
          "sendingEndHour": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sendingendhour"
          },
          "dailyLimit": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Dailylimit"
          },
          "context": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Context"
          }
        },
        "type": "object",
        "title": "CampaignUpdate"
      },
      "CampaignUpdateRequest": {
        "properties": {
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "timezone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Timezone"
          },
          "sendingDays": {
            "anyOf": [
              {
                "items": {
                  "type": "integer"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sendingdays"
          },
          "sendingStartHour": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sendingstarthour"
          },
          "sendingEndHour": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sendingendhour"
          },
          "dailyLimit": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Dailylimit"
          },
          "context": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Context"
          }
        },
        "type": "object",
        "title": "CampaignUpdateRequest"
      },
      "ConnectionTestRequest": {
        "properties": {
          "email": {
            "type": "string",
            "format": "email",
            "title": "Email"
          },
          "password": {
            "type": "string",
            "title": "Password"
          },
          "smtpHost": {
            "type": "string",
            "title": "Smtphost"
          },
          "smtpPort": {
            "type": "integer",
            "title": "Smtpport",
            "default": 587
          },
          "imapHost": {
            "type": "string",
            "title": "Imaphost"
          },
          "imapPort": {
            "type": "integer",
            "title": "Imapport",
            "default": 993
          }
        },
        "type": "object",
        "required": [
          "email",
          "password",
          "smtpHost",
          "imapHost"
        ],
        "title": "ConnectionTestRequest"
      },
      "ConnectionTestResponse": {
        "properties": {
          "smtp_success": {
            "type": "boolean",
            "title": "Smtp Success"
          },
          "smtp_error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Smtp Error"
          },
          "imap_success": {
            "type": "boolean",
            "title": "Imap Success"
          },
          "imap_error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Imap Error"
          }
        },
        "type": "object",
        "required": [
          "smtp_success",
          "imap_success"
        ],
        "title": "ConnectionTestResponse"
      },
      "DashboardStatsResponse": {
        "properties": {
          "totalAccounts": {
            "type": "integer",
            "title": "Totalaccounts"
          },
          "activeAccounts": {
            "type": "integer",
            "title": "Activeaccounts"
          },
          "totalCampaigns": {
            "type": "integer",
            "title": "Totalcampaigns"
          },
          "activeCampaigns": {
            "type": "integer",
            "title": "Activecampaigns"
          },
          "totalLeads": {
            "type": "integer",
            "title": "Totalleads"
          },
          "totalSent": {
            "type": "integer",
            "title": "Totalsent"
          },
          "totalReplies": {
            "type": "integer",
            "title": "Totalreplies"
          },
          "replyRate": {
            "type": "number",
            "title": "Replyrate"
          },
          "accountHealthAvg": {
            "type": "number",
            "title": "Accounthealthavg"
          }
        },
        "type": "object",
        "required": [
          "totalAccounts",
          "activeAccounts",
          "totalCampaigns",
          "activeCampaigns",
          "totalLeads",
          "totalSent",
          "totalReplies",
          "replyRate",
          "accountHealthAvg"
        ],
        "title": "DashboardStatsResponse"
      },
      "DeliveryListResponse": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/DeliveryResponse"
            },
            "type": "array",
            "title": "Items"
          },
          "total": {
            "type": "integer",
            "title": "Total"
          },
          "page": {
            "type": "integer",
            "title": "Page"
          },
          "pageSize": {
            "type": "integer",
            "title": "Pagesize"
          }
        },
        "type": "object",
        "required": [
          "items",
          "total",
          "page",
          "pageSize"
        ],
        "title": "DeliveryListResponse"
      },
      "DeliveryResponse": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "webhookId": {
            "type": "string",
            "title": "Webhookid"
          },
          "eventId": {
            "type": "string",
            "title": "Eventid"
          },
          "status": {
            "type": "string",
            "title": "Status"
          },
          "statusCode": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Statuscode"
          },
          "response": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Response"
          },
          "attempts": {
            "type": "integer",
            "title": "Attempts"
          },
          "lastAttemptAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Lastattemptat"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "title": "Createdat"
          },
          "event": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/EventResponse"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "id",
          "webhookId",
          "eventId",
          "status",
          "statusCode",
          "response",
          "attempts",
          "lastAttemptAt",
          "createdAt"
        ],
        "title": "DeliveryResponse"
      },
      "EmailAccountCreate": {
        "properties": {
          "email": {
            "type": "string",
            "format": "email",
            "title": "Email"
          },
          "displayName": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Displayname"
          },
          "provider": {
            "type": "string",
            "title": "Provider",
            "default": "gmail"
          },
          "smtpHost": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Smtphost"
          },
          "smtpPort": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Smtpport"
          },
          "imapHost": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Imaphost"
          },
          "imapPort": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Imapport"
          },
          "password": {
            "type": "string",
            "title": "Password"
          },
          "dailyLimit": {
            "type": "integer",
            "title": "Dailylimit",
            "default": 50
          }
        },
        "type": "object",
        "required": [
          "email",
          "password"
        ],
        "title": "EmailAccountCreate"
      },
      "EmailAccountResponse": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "email": {
            "type": "string",
            "title": "Email"
          },
          "displayName": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Displayname"
          },
          "provider": {
            "type": "string",
            "title": "Provider"
          },
          "smtpHost": {
            "type": "string",
            "title": "Smtphost"
          },
          "smtpPort": {
            "type": "integer",
            "title": "Smtpport"
          },
          "imapHost": {
            "type": "string",
            "title": "Imaphost"
          },
          "imapPort": {
            "type": "integer",
            "title": "Imapport"
          },
          "dailyLimit": {
            "type": "integer",
            "title": "Dailylimit"
          },
          "sentToday": {
            "type": "integer",
            "title": "Senttoday"
          },
          "warmupEnabled": {
            "type": "boolean",
            "title": "Warmupenabled"
          },
          "warmupDailyLimit": {
            "type": "integer",
            "title": "Warmupdailylimit"
          },
          "warmupRampUpDays": {
            "type": "integer",
            "title": "Warmuprampupdays"
          },
          "warmupStartDate": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Warmupstartdate"
          },
          "healthScore": {
            "type": "integer",
            "title": "Healthscore"
          },
          "bounceRate": {
            "type": "number",
            "title": "Bouncerate"
          },
          "replyRate": {
            "type": "number",
            "title": "Replyrate"
          },
          "isActive": {
            "type": "boolean",
            "title": "Isactive"
          },
          "connectionStatus": {
            "type": "string",
            "title": "Connectionstatus"
          },
          "lastError": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Lasterror"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "title": "Createdat"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "title": "Updatedat"
          }
        },
        "type": "object",
        "required": [
          "id",
          "email",
          "displayName",
          "provider",
          "smtpHost",
          "smtpPort",
          "imapHost",
          "imapPort",
          "dailyLimit",
          "sentToday",
          "warmupEnabled",
          "warmupDailyLimit",
          "warmupRampUpDays",
          "warmupStartDate",
          "healthScore",
          "bounceRate",
          "replyRate",
          "isActive",
          "connectionStatus",
          "lastError",
          "createdAt",
          "updatedAt"
        ],
        "title": "EmailAccountResponse"
      },
      "EmailAccountUpdate": {
        "properties": {
          "displayName": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Displayname"
          },
          "dailyLimit": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Dailylimit"
          },
          "warmupEnabled": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Warmupenabled"
          },
          "warmupDailyLimit": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Warmupdailylimit"
          },
          "isActive": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Isactive"
          }
        },
        "type": "object",
        "title": "EmailAccountUpdate"
      },
      "EventListResponse": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/EventResponse"
            },
            "type": "array",
            "title": "Items"
          },
          "total": {
            "type": "integer",
            "title": "Total"
          },
          "page": {
            "type": "integer",
            "title": "Page"
          },
          "pageSize": {
            "type": "integer",
            "title": "Pagesize"
          }
        },
        "type": "object",
        "required": [
          "items",
          "total",
          "page",
          "pageSize"
        ],
        "title": "EventListResponse"
      },
      "EventResponse": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "type": {
            "type": "string",
            "title": "Type"
          },
          "payload": {
            "additionalProperties": true,
            "type": "object",
            "title": "Payload"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "title": "Createdat"
          }
        },
        "type": "object",
        "required": [
          "id",
          "type",
          "payload",
          "createdAt"
        ],
        "title": "EventResponse"
      },
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
          }
        },
        "type": "object",
        "title": "HTTPValidationError"
      },
      "ImpersonateResponse": {
        "properties": {
          "token": {
            "type": "string",
            "title": "Token"
          },
          "user": {
            "additionalProperties": true,
            "type": "object",
            "title": "User"
          }
        },
        "type": "object",
        "required": [
          "token",
          "user"
        ],
        "title": "ImpersonateResponse"
      },
      "ImportMappingRequest": {
        "properties": {
          "mapping": {
            "additionalProperties": true,
            "type": "object",
            "title": "Mapping"
          },
          "csvContent": {
            "type": "string",
            "title": "Csvcontent"
          }
        },
        "type": "object",
        "required": [
          "mapping",
          "csvContent"
        ],
        "title": "ImportMappingRequest"
      },
      "ImportResult": {
        "properties": {
          "imported": {
            "type": "integer",
            "title": "Imported"
          },
          "duplicates": {
            "type": "integer",
            "title": "Duplicates"
          },
          "errors": {
            "type": "integer",
            "title": "Errors"
          },
          "errorDetails": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Errordetails"
          }
        },
        "type": "object",
        "required": [
          "imported",
          "duplicates",
          "errors",
          "errorDetails"
        ],
        "title": "ImportResult"
      },
      "InviteCreate": {
        "properties": {
          "email": {
            "type": "string",
            "format": "email",
            "title": "Email"
          },
          "role": {
            "type": "string",
            "title": "Role",
            "default": "member"
          }
        },
        "type": "object",
        "required": [
          "email"
        ],
        "title": "InviteCreate"
      },
      "InviteResponse": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "email": {
            "type": "string",
            "title": "Email"
          },
          "role": {
            "type": "string",
            "title": "Role"
          },
          "invitedBy": {
            "type": "string",
            "title": "Invitedby"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time",
            "title": "Expiresat"
          },
          "acceptedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Acceptedat"
          },
          "createdAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Createdat"
          }
        },
        "type": "object",
        "required": [
          "id",
          "email",
          "role",
          "invitedBy",
          "expiresAt"
        ],
        "title": "InviteResponse"
      },
      "LeadCreate": {
        "properties": {
          "email": {
            "type": "string",
            "format": "email",
            "title": "Email"
          },
          "firstName": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Firstname"
          },
          "lastName": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Lastname"
          },
          "company": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Company"
          },
          "title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Title"
          },
          "phone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Phone"
          },
          "linkedin": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Linkedin"
          },
          "website": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Website"
          },
          "customFields": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customfields"
          },
          "tags": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tags"
          },
          "notes": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Notes"
          }
        },
        "type": "object",
        "required": [
          "email"
        ],
        "title": "LeadCreate"
      },
      "LeadListResponse": {
        "properties": {
          "leads": {
            "items": {
              "$ref": "#/components/schemas/LeadResponse"
            },
            "type": "array",
            "title": "Leads"
          },
          "total": {
            "type": "integer",
            "title": "Total"
          },
          "page": {
            "type": "integer",
            "title": "Page"
          },
          "pageSize": {
            "type": "integer",
            "title": "Pagesize"
          }
        },
        "type": "object",
        "required": [
          "leads",
          "total",
          "page",
          "pageSize"
        ],
        "title": "LeadListResponse"
      },
      "LeadResponse": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "email": {
            "type": "string",
            "title": "Email"
          },
          "firstName": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Firstname"
          },
          "lastName": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Lastname"
          },
          "company": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Company"
          },
          "title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Title"
          },
          "phone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Phone"
          },
          "linkedin": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Linkedin"
          },
          "website": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Website"
          },
          "customFields": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customfields"
          },
          "notes": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Notes"
          },
          "tags": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Tags",
            "default": []
          },
          "status": {
            "type": "string",
            "title": "Status"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "title": "Createdat"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "title": "Updatedat"
          }
        },
        "type": "object",
        "required": [
          "id",
          "email",
          "status",
          "createdAt",
          "updatedAt"
        ],
        "title": "LeadResponse"
      },
      "LeadUpdate": {
        "properties": {
          "firstName": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Firstname"
          },
          "lastName": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Lastname"
          },
          "company": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Company"
          },
          "title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Title"
          },
          "phone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Phone"
          },
          "linkedin": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Linkedin"
          },
          "website": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Website"
          },
          "customFields": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customfields"
          },
          "tags": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tags"
          },
          "notes": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Notes"
          }
        },
        "type": "object",
        "title": "LeadUpdate"
      },
      "ManualEmailRequest": {
        "properties": {
          "toEmail": {
            "type": "string",
            "title": "Toemail"
          },
          "accountId": {
            "type": "string",
            "title": "Accountid"
          },
          "subject": {
            "type": "string",
            "title": "Subject"
          },
          "body": {
            "type": "string",
            "title": "Body"
          },
          "isHtml": {
            "type": "boolean",
            "title": "Ishtml",
            "default": false
          }
        },
        "type": "object",
        "required": [
          "toEmail",
          "accountId",
          "subject",
          "body"
        ],
        "title": "ManualEmailRequest"
      },
      "ManualEmailResponse": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success"
          },
          "messageId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Messageid"
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          }
        },
        "type": "object",
        "required": [
          "success"
        ],
        "title": "ManualEmailResponse"
      },
      "MemberResponse": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "userId": {
            "type": "string",
            "title": "Userid"
          },
          "email": {
            "type": "string",
            "title": "Email"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "picture": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Picture"
          },
          "role": {
            "type": "string",
            "title": "Role"
          },
          "joinedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Joinedat"
          }
        },
        "type": "object",
        "required": [
          "id",
          "userId",
          "email",
          "role"
        ],
        "title": "MemberResponse"
      },
      "MemberRoleUpdate": {
        "properties": {
          "role": {
            "type": "string",
            "title": "Role"
          }
        },
        "type": "object",
        "required": [
          "role"
        ],
        "title": "MemberRoleUpdate"
      },
      "OpenAIKeyStatus": {
        "properties": {
          "isConfigured": {
            "type": "boolean",
            "title": "Isconfigured"
          },
          "maskedKey": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Maskedkey"
          }
        },
        "type": "object",
        "required": [
          "isConfigured",
          "maskedKey"
        ],
        "title": "OpenAIKeyStatus"
      },
      "OpenAIKeyUpdate": {
        "properties": {
          "apiKey": {
            "type": "string",
            "title": "Apikey"
          }
        },
        "type": "object",
        "required": [
          "apiKey"
        ],
        "title": "OpenAIKeyUpdate"
      },
      "PlatformStats": {
        "properties": {
          "totalUsers": {
            "type": "integer",
            "title": "Totalusers"
          },
          "totalCampaigns": {
            "type": "integer",
            "title": "Totalcampaigns"
          },
          "totalLeads": {
            "type": "integer",
            "title": "Totalleads"
          },
          "totalEmailsSent": {
            "type": "integer",
            "title": "Totalemailssent"
          },
          "totalReplies": {
            "type": "integer",
            "title": "Totalreplies"
          },
          "replyRate": {
            "type": "number",
            "title": "Replyrate"
          }
        },
        "type": "object",
        "required": [
          "totalUsers",
          "totalCampaigns",
          "totalLeads",
          "totalEmailsSent",
          "totalReplies",
          "replyRate"
        ],
        "title": "PlatformStats"
      },
      "PreviewRequest": {
        "properties": {
          "subject": {
            "type": "string",
            "title": "Subject"
          },
          "body": {
            "type": "string",
            "title": "Body"
          },
          "leadId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Leadid"
          }
        },
        "type": "object",
        "required": [
          "subject",
          "body"
        ],
        "title": "PreviewRequest"
      },
      "PreviewResponse": {
        "properties": {
          "subject": {
            "type": "string",
            "title": "Subject"
          },
          "body": {
            "type": "string",
            "title": "Body"
          },
          "subjectVariations": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Subjectvariations"
          },
          "bodyVariations": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Bodyvariations"
          }
        },
        "type": "object",
        "required": [
          "subject",
          "body",
          "subjectVariations",
          "bodyVariations"
        ],
        "title": "PreviewResponse"
      },
      "ProfileResponse": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "email": {
            "type": "string",
            "title": "Email"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "picture": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Picture"
          },
          "timezone": {
            "type": "string",
            "title": "Timezone"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "title": "Createdat"
          }
        },
        "type": "object",
        "required": [
          "id",
          "email",
          "name",
          "picture",
          "timezone",
          "createdAt"
        ],
        "title": "ProfileResponse"
      },
      "ProfileUpdate": {
        "properties": {
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "timezone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Timezone"
          }
        },
        "type": "object",
        "title": "ProfileUpdate"
      },
      "ReplyListResponse": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/ReplyResponse"
            },
            "type": "array",
            "title": "Items"
          },
          "total": {
            "type": "integer",
            "title": "Total"
          },
          "page": {
            "type": "integer",
            "title": "Page"
          },
          "pageSize": {
            "type": "integer",
            "title": "Pagesize"
          }
        },
        "type": "object",
        "required": [
          "items",
          "total",
          "page",
          "pageSize"
        ],
        "title": "ReplyListResponse"
      },
      "ReplyResponse": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "accountId": {
            "type": "string",
            "title": "Accountid"
          },
          "campaignId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Campaignid"
          },
          "leadId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Leadid"
          },
          "fromEmail": {
            "type": "string",
            "title": "Fromemail"
          },
          "toEmail": {
            "type": "string",
            "title": "Toemail"
          },
          "subject": {
            "type": "string",
            "title": "Subject"
          },
          "body": {
            "type": "string",
            "title": "Body"
          },
          "bodyPlain": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Bodyplain"
          },
          "messageId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Messageid"
          },
          "inReplyTo": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Inreplyto"
          },
          "category": {
            "type": "string",
            "title": "Category"
          },
          "isRead": {
            "type": "boolean",
            "title": "Isread"
          },
          "isStarred": {
            "type": "boolean",
            "title": "Isstarred"
          },
          "receivedAt": {
            "type": "string",
            "format": "date-time",
            "title": "Receivedat"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "title": "Createdat"
          },
          "draftReply": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Draftreply"
          },
          "draftReplyStatus": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Draftreplystatus"
          },
          "draftReplyError": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Draftreplyerror"
          },
          "account": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Account"
          },
          "lead": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Lead"
          },
          "campaign": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Campaign"
          }
        },
        "type": "object",
        "required": [
          "id",
          "accountId",
          "campaignId",
          "leadId",
          "fromEmail",
          "toEmail",
          "subject",
          "body",
          "bodyPlain",
          "messageId",
          "inReplyTo",
          "category",
          "isRead",
          "isStarred",
          "receivedAt",
          "createdAt"
        ],
        "title": "ReplyResponse"
      },
      "SendReplyRequest": {
        "properties": {
          "body": {
            "type": "string",
            "title": "Body"
          },
          "subject": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Subject"
          }
        },
        "type": "object",
        "required": [
          "body"
        ],
        "title": "SendReplyRequest"
      },
      "SequenceCreate": {
        "properties": {
          "stepNumber": {
            "type": "integer",
            "title": "Stepnumber"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "subject": {
            "type": "string",
            "title": "Subject"
          },
          "body": {
            "type": "string",
            "title": "Body"
          },
          "delayDays": {
            "type": "integer",
            "title": "Delaydays",
            "default": 0
          },
          "delayHours": {
            "type": "integer",
            "title": "Delayhours",
            "default": 0
          },
          "sendOnlyIfNoReply": {
            "type": "boolean",
            "title": "Sendonlyifnoreply",
            "default": true
          }
        },
        "type": "object",
        "required": [
          "stepNumber",
          "subject",
          "body"
        ],
        "title": "SequenceCreate"
      },
      "SequenceResponse": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "campaignId": {
            "type": "string",
            "title": "Campaignid"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "stepNumber": {
            "type": "integer",
            "title": "Stepnumber"
          },
          "subject": {
            "type": "string",
            "title": "Subject"
          },
          "body": {
            "type": "string",
            "title": "Body"
          },
          "delayDays": {
            "type": "integer",
            "title": "Delaydays"
          },
          "delayHours": {
            "type": "integer",
            "title": "Delayhours"
          },
          "sendOnlyIfNoReply": {
            "type": "boolean",
            "title": "Sendonlyifnoreply"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "title": "Createdat"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "title": "Updatedat"
          }
        },
        "type": "object",
        "required": [
          "id",
          "campaignId",
          "name",
          "stepNumber",
          "subject",
          "body",
          "delayDays",
          "delayHours",
          "sendOnlyIfNoReply",
          "createdAt",
          "updatedAt"
        ],
        "title": "SequenceResponse"
      },
      "SequenceUpdate": {
        "properties": {
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "subject": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Subject"
          },
          "body": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Body"
          },
          "delayDays": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Delaydays"
          },
          "delayHours": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Delayhours"
          },
          "sendOnlyIfNoReply": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sendonlyifnoreply"
          }
        },
        "type": "object",
        "title": "SequenceUpdate"
      },
      "TemplateCreate": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "subject": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Subject"
          },
          "body": {
            "type": "string",
            "title": "Body"
          },
          "templateType": {
            "type": "string",
            "title": "Templatetype",
            "default": "email"
          }
        },
        "type": "object",
        "required": [
          "name",
          "body"
        ],
        "title": "TemplateCreate"
      },
      "TemplateResponse": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "subject": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Subject"
          },
          "body": {
            "type": "string",
            "title": "Body"
          },
          "templateType": {
            "type": "string",
            "title": "Templatetype"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "title": "Createdat"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "title": "Updatedat"
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "subject",
          "body",
          "templateType",
          "createdAt",
          "updatedAt"
        ],
        "title": "TemplateResponse"
      },
      "TemplateUpdate": {
        "properties": {
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "subject": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Subject"
          },
          "body": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Body"
          },
          "category": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Category"
          }
        },
        "type": "object",
        "title": "TemplateUpdate"
      },
      "TokenResponse": {
        "properties": {
          "token": {
            "type": "string",
            "title": "Token"
          },
          "user": {
            "additionalProperties": true,
            "type": "object",
            "title": "User"
          }
        },
        "type": "object",
        "required": [
          "token",
          "user"
        ],
        "title": "TokenResponse"
      },
      "UniboxStatsResponse": {
        "properties": {
          "total": {
            "type": "integer",
            "title": "Total"
          },
          "unread": {
            "type": "integer",
            "title": "Unread"
          },
          "interested": {
            "type": "integer",
            "title": "Interested"
          },
          "notInterested": {
            "type": "integer",
            "title": "Notinterested"
          },
          "outOfOffice": {
            "type": "integer",
            "title": "Outofoffice"
          },
          "uncategorized": {
            "type": "integer",
            "title": "Uncategorized"
          }
        },
        "type": "object",
        "required": [
          "total",
          "unread",
          "interested",
          "notInterested",
          "outOfOffice",
          "uncategorized"
        ],
        "title": "UniboxStatsResponse"
      },
      "UpdateReplyRequest": {
        "properties": {
          "isRead": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Isread"
          },
          "isStarred": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Isstarred"
          },
          "category": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Category"
          }
        },
        "type": "object",
        "title": "UpdateReplyRequest"
      },
      "UserResponse": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "email": {
            "type": "string",
            "title": "Email"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "picture": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Picture"
          },
          "timezone": {
            "type": "string",
            "title": "Timezone"
          },
          "isAdmin": {
            "type": "boolean",
            "title": "Isadmin",
            "default": false
          }
        },
        "type": "object",
        "required": [
          "id",
          "email",
          "name",
          "picture",
          "timezone"
        ],
        "title": "UserResponse"
      },
      "UserStats": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "email": {
            "type": "string",
            "title": "Email"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "picture": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Picture"
          },
          "isAdmin": {
            "type": "boolean",
            "title": "Isadmin"
          },
          "createdAt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Createdat"
          },
          "campaignCount": {
            "type": "integer",
            "title": "Campaigncount"
          },
          "leadCount": {
            "type": "integer",
            "title": "Leadcount"
          },
          "accountCount": {
            "type": "integer",
            "title": "Accountcount"
          }
        },
        "type": "object",
        "required": [
          "id",
          "email",
          "name",
          "picture",
          "isAdmin",
          "createdAt",
          "campaignCount",
          "leadCount",
          "accountCount"
        ],
        "title": "UserStats"
      },
      "UsersListResponse": {
        "properties": {
          "users": {
            "items": {
              "$ref": "#/components/schemas/UserStats"
            },
            "type": "array",
            "title": "Users"
          }
        },
        "type": "object",
        "required": [
          "users"
        ],
        "title": "UsersListResponse"
      },
      "ValidationError": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "type": "array",
            "title": "Location"
          },
          "msg": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          },
          "input": {
            "title": "Input"
          },
          "ctx": {
            "type": "object",
            "title": "Context"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      },
      "WebhookCreate": {
        "properties": {
          "url": {
            "type": "string",
            "title": "Url"
          },
          "events": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Events"
          },
          "isActive": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Isactive",
            "default": true
          }
        },
        "type": "object",
        "required": [
          "url",
          "events"
        ],
        "title": "WebhookCreate"
      },
      "WebhookResponse": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "url": {
            "type": "string",
            "title": "Url"
          },
          "secret": {
            "type": "string",
            "title": "Secret"
          },
          "isActive": {
            "type": "boolean",
            "title": "Isactive"
          },
          "events": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Events"
          },
          "lastDeliveredAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Lastdeliveredat"
          },
          "consecutiveFailures": {
            "type": "integer",
            "title": "Consecutivefailures"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "title": "Createdat"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "title": "Updatedat"
          }
        },
        "type": "object",
        "required": [
          "id",
          "url",
          "secret",
          "isActive",
          "events",
          "lastDeliveredAt",
          "consecutiveFailures",
          "createdAt",
          "updatedAt"
        ],
        "title": "WebhookResponse"
      },
      "WebhookUpdate": {
        "properties": {
          "url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Url"
          },
          "secret": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Secret"
          },
          "isActive": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Isactive"
          },
          "events": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Events"
          }
        },
        "type": "object",
        "title": "WebhookUpdate"
      },
      "WorkspaceCreate": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          }
        },
        "type": "object",
        "required": [
          "name"
        ],
        "title": "WorkspaceCreate"
      },
      "WorkspaceDefaultsResponse": {
        "properties": {
          "dailyLimit": {
            "type": "integer",
            "title": "Dailylimit",
            "default": 50
          },
          "sendingStartHour": {
            "type": "integer",
            "title": "Sendingstarthour",
            "default": 9
          },
          "sendingEndHour": {
            "type": "integer",
            "title": "Sendingendhour",
            "default": 17
          },
          "warmupRampUpDays": {
            "type": "integer",
            "title": "Warmuprampupdays",
            "default": 30
          },
          "warmupDailyLimit": {
            "type": "integer",
            "title": "Warmupdailylimit",
            "default": 40
          }
        },
        "type": "object",
        "title": "WorkspaceDefaultsResponse"
      },
      "WorkspaceDefaultsUpdate": {
        "properties": {
          "dailyLimit": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Dailylimit"
          },
          "sendingStartHour": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sendingstarthour"
          },
          "sendingEndHour": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sendingendhour"
          },
          "warmupRampUpDays": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Warmuprampupdays"
          },
          "warmupDailyLimit": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Warmupdailylimit"
          }
        },
        "type": "object",
        "title": "WorkspaceDefaultsUpdate"
      },
      "WorkspaceResponse": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "slug": {
            "type": "string",
            "title": "Slug"
          },
          "ownerId": {
            "type": "string",
            "title": "Ownerid"
          },
          "isPersonal": {
            "type": "boolean",
            "title": "Ispersonal"
          },
          "role": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Role"
          },
          "memberCount": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Membercount"
          },
          "createdAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Createdat"
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "slug",
          "ownerId",
          "isPersonal"
        ],
        "title": "WorkspaceResponse"
      },
      "WorkspaceUpdate": {
        "properties": {
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "slug": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Slug"
          }
        },
        "type": "object",
        "title": "WorkspaceUpdate"
      },
      "app__routers__settings__WebhookCreate": {
        "properties": {
          "url": {
            "type": "string",
            "title": "Url"
          },
          "secret": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Secret"
          },
          "events": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Events"
          }
        },
        "type": "object",
        "required": [
          "url",
          "events"
        ],
        "title": "WebhookCreate"
      },
      "app__routers__templates__TemplateUpdate": {
        "properties": {
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "subject": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Subject"
          },
          "body": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Body"
          },
          "templateType": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Templatetype"
          }
        },
        "type": "object",
        "title": "TemplateUpdate"
      },
      "app__routers__v1__leads__LeadCreate": {
        "properties": {
          "email": {
            "type": "string",
            "format": "email",
            "title": "Email"
          },
          "firstName": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Firstname"
          },
          "lastName": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Lastname"
          },
          "company": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Company"
          },
          "title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Title"
          },
          "phone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Phone"
          },
          "linkedinUrl": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Linkedinurl"
          },
          "website": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Website"
          },
          "customFields": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customfields"
          },
          "notes": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Notes"
          },
          "source": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source"
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Status"
          }
        },
        "type": "object",
        "required": [
          "email"
        ],
        "title": "LeadCreate"
      },
      "app__routers__v1__leads__LeadUpdate": {
        "properties": {
          "email": {
            "anyOf": [
              {
                "type": "string",
                "format": "email"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "firstName": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Firstname"
          },
          "lastName": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Lastname"
          },
          "company": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Company"
          },
          "title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Title"
          },
          "phone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Phone"
          },
          "linkedinUrl": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Linkedinurl"
          },
          "website": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Website"
          },
          "customFields": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customfields"
          },
          "notes": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Notes"
          },
          "source": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source"
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Status"
          }
        },
        "type": "object",
        "title": "LeadUpdate"
      },
      "app__routers__v1__templates__TemplateCreate": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "subject": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Subject"
          },
          "body": {
            "type": "string",
            "title": "Body"
          },
          "category": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Category",
            "default": "email"
          }
        },
        "type": "object",
        "required": [
          "name",
          "body"
        ],
        "title": "TemplateCreate"
      },
      "app__routers__v1__webhooks__WebhookUpdate": {
        "properties": {
          "url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Url"
          },
          "events": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Events"
          },
          "isActive": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Isactive"
          }
        },
        "type": "object",
        "title": "WebhookUpdate"
      }
    }
  }
}