{
  "openapi": "3.1.0",
  "info": {
    "title": "Luso8 API",
    "version": "1.0.0-preview",
    "description": "The Luso8 public REST API (preview). Authenticate with a workspace API key sent as `Authorization: Bearer <key>` or `X-API-Key: <key>`. Every request is scoped to the workspace that owns the key.",
    "contact": {
      "name": "Rexplore Labs",
      "url": "https://docs.rexplore.ai"
    }
  },
  "servers": [
    {
      "url": "https://api.luso8.rexplore.ai",
      "description": "Production"
    }
  ],
  "security": [
    {
      "bearerApiKey": []
    },
    {
      "headerApiKey": []
    }
  ],
  "tags": [
    {
      "name": "Contacts",
      "description": "People in your workspace's CRM."
    },
    {
      "name": "Companies",
      "description": "Organizations your contacts belong to."
    },
    {
      "name": "Deals",
      "description": "Deals, prospects, customers and products in your sales pipeline."
    },
    {
      "name": "Leads",
      "description": "Qualified leads, and AI lead search runs."
    },
    {
      "name": "Lists",
      "description": "Static lists of contacts used for campaigns and dialing."
    },
    {
      "name": "Campaigns",
      "description": "Multi-step, multi-channel outreach sequences."
    },
    {
      "name": "Conversations",
      "description": "Inbox and support conversations across every channel."
    },
    {
      "name": "Calls",
      "description": "Call logs, recordings and scheduled calls."
    },
    {
      "name": "Appointments",
      "description": "Meetings and bookings on your team's calendars."
    },
    {
      "name": "Tickets",
      "description": "Customer issues raised from the inbox and the CRM."
    },
    {
      "name": "Agents",
      "description": "AI agents (chat and voice) and their conversations."
    },
    {
      "name": "Knowledge",
      "description": "Knowledge base folders and documents your agents search."
    },
    {
      "name": "Workflows",
      "description": "Event-driven AI workflows and their runs."
    },
    {
      "name": "Reports",
      "description": "Workspace metrics and report exports."
    }
  ],
  "paths": {
    "/api/v1/agents": {
      "get": {
        "tags": [
          "Agents"
        ],
        "summary": "List Agents",
        "description": "List agents for the current organization.\n\n**Required scope:** `agents:read`",
        "operationId": "list-agents",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "skip",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0,
              "title": "Skip"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "default": 100,
              "title": "Limit"
            }
          },
          {
            "name": "agent_type",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/app__schemas__agent__AgentType"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Agent Type"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/app__schemas__agent__AgentStatus"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Search"
            }
          },
          {
            "name": "voice_enabled",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Voice Enabled"
            }
          },
          {
            "name": "kind",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^(standard|sales_coach|all)$"
                },
                {
                  "type": "null"
                }
              ],
              "description": "standard (default), sales_coach, or all",
              "title": "Kind"
            },
            "description": "standard (default), sales_coach, or all"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AgentListResponse"
                  },
                  "title": "Response List Agents Api V1 Agents Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "x-luso8-scope": "agents:read"
      },
      "post": {
        "tags": [
          "Agents"
        ],
        "summary": "Create Agent",
        "description": "Create a new agent\n\n**Required scope:** `agents:write`",
        "operationId": "create-agent",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentCreate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "x-luso8-scope": "agents:write"
      }
    },
    "/api/v1/agents/conversations/{conversation_id}": {
      "get": {
        "tags": [
          "Agents"
        ],
        "summary": "Get Agent Conversation",
        "description": "Get a specific conversation with messages\n\n**Required scope:** `agents:read`",
        "operationId": "get-agent-conversation",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "conversation_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Conversation Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConversationResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "x-luso8-scope": "agents:read"
      }
    },
    "/api/v1/agents/conversations/{conversation_id}/messages": {
      "get": {
        "tags": [
          "Agents"
        ],
        "summary": "List Agent Messages",
        "description": "List messages in a conversation\n\n**Required scope:** `agents:read`",
        "operationId": "list-agent-messages",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "conversation_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Conversation Id"
            }
          },
          {
            "name": "skip",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0,
              "title": "Skip"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "default": 100,
              "title": "Limit"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/app__schemas__agent__MessageResponse"
                  },
                  "title": "Response List Messages Api V1 Agents Conversations  Conversation Id  Messages Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "x-luso8-scope": "agents:read"
      }
    },
    "/api/v1/agents/{agent_id}": {
      "get": {
        "tags": [
          "Agents"
        ],
        "summary": "Get Agent",
        "description": "Get a specific agent\n\n**Required scope:** `agents:read`",
        "operationId": "get-agent",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Agent Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "x-luso8-scope": "agents:read"
      },
      "put": {
        "tags": [
          "Agents"
        ],
        "summary": "Update Agent",
        "description": "Update an agent\n\n**Required scope:** `agents:write`",
        "operationId": "update-agent",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Agent Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "x-luso8-scope": "agents:write"
      },
      "delete": {
        "tags": [
          "Agents"
        ],
        "summary": "Delete Agent",
        "description": "Delete an agent\n\n**Required scope:** `agents:write`",
        "operationId": "delete-agent",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Agent Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "title": "Response Delete Agent Api V1 Agents  Agent Id  Delete"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "x-luso8-scope": "agents:write"
      }
    },
    "/api/v1/agents/{agent_id}/conversations": {
      "get": {
        "tags": [
          "Agents"
        ],
        "summary": "List Agent Conversations",
        "description": "List conversations for an agent\n\n**Required scope:** `agents:read`",
        "operationId": "list-agent-conversations",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Agent Id"
            }
          },
          {
            "name": "skip",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0,
              "title": "Skip"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "default": 100,
              "title": "Limit"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ConversationResponse"
                  },
                  "title": "Response List Agent Conversations Api V1 Agents  Agent Id  Conversations Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "x-luso8-scope": "agents:read"
      }
    },
    "/api/v1/agents/{agent_id}/status": {
      "patch": {
        "tags": [
          "Agents"
        ],
        "summary": "Update Agent Status",
        "description": "Update agent status\n\n**Required scope:** `agents:write`",
        "operationId": "update-agent-status",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Agent Id"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/app__schemas__agent__AgentStatus"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "x-luso8-scope": "agents:write"
      }
    },
    "/api/v1/ai-workflows": {
      "get": {
        "tags": [
          "Workflows"
        ],
        "summary": "List Workflows",
        "description": "List all workflows for the organization.\n\n**Required scope:** `workflows:read`",
        "operationId": "list-workflows",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "skip",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0,
              "title": "Skip"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 500,
              "minimum": 1,
              "default": 100,
              "title": "Limit"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          },
          {
            "name": "category",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Category"
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Search"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AIWorkflowListResponse"
                  },
                  "title": "Response List Workflows Api V1 Ai Workflows Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "x-luso8-scope": "workflows:read"
      },
      "post": {
        "tags": [
          "Workflows"
        ],
        "summary": "Create Workflow",
        "description": "Create a new workflow.\n\n**Required scope:** `workflows:write`",
        "operationId": "create-workflow",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AIWorkflowCreate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AIWorkflowResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "x-luso8-scope": "workflows:write"
      }
    },
    "/api/v1/ai-workflows/events": {
      "get": {
        "tags": [
          "Workflows"
        ],
        "summary": "List Workflow Events",
        "description": "Platform events a workflow can be triggered by (with sample payloads).\n\n**Required scope:** `workflows:read`",
        "operationId": "list-workflow-events",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "x-luso8-scope": "workflows:read"
      }
    },
    "/api/v1/ai-workflows/{workflow_id}": {
      "get": {
        "tags": [
          "Workflows"
        ],
        "summary": "Get Workflow",
        "description": "Get a workflow with steps.\n\n**Required scope:** `workflows:read`",
        "operationId": "get-workflow",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "workflow_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Workflow Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AIWorkflowDetailResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "x-luso8-scope": "workflows:read"
      },
      "put": {
        "tags": [
          "Workflows"
        ],
        "summary": "Update Workflow",
        "description": "Update a workflow. Activating requires a clean compile.\n\n**Required scope:** `workflows:write`",
        "operationId": "update-workflow",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "workflow_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Workflow Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AIWorkflowUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AIWorkflowResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "x-luso8-scope": "workflows:write"
      },
      "delete": {
        "tags": [
          "Workflows"
        ],
        "summary": "Delete Workflow",
        "description": "Delete a workflow.\n\n**Required scope:** `workflows:write`",
        "operationId": "delete-workflow",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "workflow_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Workflow Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "x-luso8-scope": "workflows:write"
      }
    },
    "/api/v1/ai-workflows/{workflow_id}/runs": {
      "get": {
        "tags": [
          "Workflows"
        ],
        "summary": "List Runs",
        "description": "List runs for a workflow.\n\n**Required scope:** `workflows:read`",
        "operationId": "list-runs",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "workflow_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Workflow Id"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          },
          {
            "name": "skip",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0,
              "title": "Skip"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 200,
              "minimum": 1,
              "default": 50,
              "title": "Limit"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AIWorkflowRunResponse"
                  },
                  "title": "Response List Runs Api V1 Ai Workflows  Workflow Id  Runs Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "x-luso8-scope": "workflows:read"
      }
    },
    "/api/v1/ai-workflows/{workflow_id}/runs/{run_id}": {
      "get": {
        "tags": [
          "Workflows"
        ],
        "summary": "Get Run",
        "description": "Get a specific run with step details.\n\n**Required scope:** `workflows:read`",
        "operationId": "get-run",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "workflow_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Workflow Id"
            }
          },
          {
            "name": "run_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Run Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AIWorkflowRunDetailResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "x-luso8-scope": "workflows:read"
      }
    },
    "/api/v1/ai-workflows/{workflow_id}/runs/{run_id}/cancel": {
      "post": {
        "tags": [
          "Workflows"
        ],
        "summary": "Cancel Workflow Run",
        "operationId": "cancel-workflow-run",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "workflow_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Workflow Id"
            }
          },
          {
            "name": "run_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Run Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AIWorkflowRunResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "description": "**Required scope:** `workflows:write`",
        "x-luso8-scope": "workflows:write"
      }
    },
    "/api/v1/ai-workflows/{workflow_id}/trigger": {
      "post": {
        "tags": [
          "Workflows"
        ],
        "summary": "Trigger Workflow",
        "description": "Start a run now.\n\n**Required scope:** `workflows:write`",
        "operationId": "trigger-workflow",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "workflow_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Workflow Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TriggerWorkflowRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TriggerWorkflowResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "x-luso8-scope": "workflows:write"
      }
    },
    "/api/v1/appointments": {
      "get": {
        "tags": [
          "Appointments"
        ],
        "summary": "List Appointments",
        "description": "List appointments for the current user's organization.\n\n**Required scope:** `appointments:read`",
        "operationId": "list-appointments",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "skip",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0,
              "title": "Skip"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 200,
              "minimum": 1,
              "default": 50,
              "title": "Limit"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          },
          {
            "name": "appointment_type",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Appointment Type"
            }
          },
          {
            "name": "start_date",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Start Date"
            }
          },
          {
            "name": "end_date",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "null"
                }
              ],
              "title": "End Date"
            }
          },
          {
            "name": "contact_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Contact Id"
            }
          },
          {
            "name": "source",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "engage_inbox | ai_agent | voice_agent | campaign | manual",
              "title": "Source"
            },
            "description": "engage_inbox | ai_agent | voice_agent | campaign | manual"
          },
          {
            "name": "conversation_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Inbox thread the booking was made from",
              "title": "Conversation Id"
            },
            "description": "Inbox thread the booking was made from"
          },
          {
            "name": "mine_only",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "Only bookings the caller created or is a participant of",
              "default": false,
              "title": "Mine Only"
            },
            "description": "Only bookings the caller created or is a participant of"
          },
          {
            "name": "order",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^(asc|desc)$",
              "description": "Sort by start time",
              "default": "asc",
              "title": "Order"
            },
            "description": "Sort by start time"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppointmentListResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "x-luso8-scope": "appointments:read"
      },
      "post": {
        "tags": [
          "Appointments"
        ],
        "summary": "Create Appointment",
        "description": "Create a new appointment.\n\n**Required scope:** `appointments:write`",
        "operationId": "create-appointment",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AppointmentCreate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppointmentResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "x-luso8-scope": "appointments:write"
      }
    },
    "/api/v1/appointments/range": {
      "get": {
        "tags": [
          "Appointments"
        ],
        "summary": "Get Appointments In Range",
        "description": "Get all appointments in a date range (for calendar view).\n\n**Required scope:** `appointments:read`",
        "operationId": "get-appointments-in-range",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "start",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date-time",
              "title": "Start"
            }
          },
          {
            "name": "end",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date-time",
              "title": "End"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppointmentListResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "x-luso8-scope": "appointments:read"
      }
    },
    "/api/v1/appointments/stats": {
      "get": {
        "tags": [
          "Appointments"
        ],
        "summary": "Get Appointment Stats",
        "description": "Get appointment statistics.\n\n**Required scope:** `appointments:read`",
        "operationId": "get-appointment-stats",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "start_date",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Start Date"
            }
          },
          {
            "name": "end_date",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "null"
                }
              ],
              "title": "End Date"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "title": "Response Get Appointment Stats Api V1 Appointments Stats Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "x-luso8-scope": "appointments:read"
      }
    },
    "/api/v1/appointments/upcoming": {
      "get": {
        "tags": [
          "Appointments"
        ],
        "summary": "Get Upcoming Appointments",
        "description": "Get upcoming appointments.\n\n**Required scope:** `appointments:read`",
        "operationId": "get-upcoming-appointments",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 50,
              "minimum": 1,
              "default": 10,
              "title": "Limit"
            }
          },
          {
            "name": "mine_only",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false,
              "title": "Mine Only"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppointmentListResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "x-luso8-scope": "appointments:read"
      }
    },
    "/api/v1/appointments/{appointment_id}": {
      "get": {
        "tags": [
          "Appointments"
        ],
        "summary": "Get Appointment",
        "description": "Get a single appointment by ID.\n\n**Required scope:** `appointments:read`",
        "operationId": "get-appointment",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "appointment_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Appointment Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppointmentResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "x-luso8-scope": "appointments:read"
      },
      "put": {
        "tags": [
          "Appointments"
        ],
        "summary": "Update Appointment",
        "description": "Update an appointment and sync with Google Calendar if connected.\n\n**Required scope:** `appointments:write`",
        "operationId": "update-appointment",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "appointment_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Appointment Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AppointmentUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppointmentResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "x-luso8-scope": "appointments:write"
      },
      "delete": {
        "tags": [
          "Appointments"
        ],
        "summary": "Delete Appointment",
        "description": "Delete an appointment and remove from Google Calendar if connected.\n\n**Required scope:** `appointments:write`",
        "operationId": "delete-appointment",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "appointment_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Appointment Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "title": "Response Delete Appointment Api V1 Appointments  Appointment Id  Delete"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "x-luso8-scope": "appointments:write"
      }
    },
    "/api/v1/appointments/{appointment_id}/status": {
      "patch": {
        "tags": [
          "Appointments"
        ],
        "summary": "Update Appointment Status",
        "description": "Update appointment status (confirm, cancel, complete, no-show).\n\n**Required scope:** `appointments:write`",
        "operationId": "update-appointment-status",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "appointment_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Appointment Id"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Status"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppointmentResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "x-luso8-scope": "appointments:write"
      }
    },
    "/api/v1/call-center/calls": {
      "get": {
        "tags": [
          "Calls"
        ],
        "summary": "List Calls",
        "description": "List call sessions with filters.\n\n**Required scope:** `calls:read`",
        "operationId": "list-calls",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "skip",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0,
              "title": "Skip"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 200,
              "minimum": 1,
              "default": 50,
              "title": "Limit"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          },
          {
            "name": "direction",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Direction"
            }
          },
          {
            "name": "agent_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Agent Id"
            }
          },
          {
            "name": "queue_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Queue Id"
            }
          },
          {
            "name": "start_date",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Start Date"
            }
          },
          {
            "name": "end_date",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "null"
                }
              ],
              "title": "End Date"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedCallSessions"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "x-luso8-scope": "calls:read"
      }
    },
    "/api/v1/call-center/calls/{call_id}": {
      "get": {
        "tags": [
          "Calls"
        ],
        "summary": "Get Call",
        "description": "Get a call session by ID.\n\n**Required scope:** `calls:read`",
        "operationId": "get-call",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "call_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Call Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CallSessionResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "x-luso8-scope": "calls:read"
      }
    },
    "/api/v1/campaigns": {
      "get": {
        "tags": [
          "Campaigns"
        ],
        "summary": "List Campaigns",
        "description": "List campaigns for the organization, one page at a time.\n\n**Required scope:** `campaigns:read`",
        "operationId": "list-campaigns",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "skip",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0,
              "title": "Skip"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "default": 50,
              "title": "Limit"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/CampaignStatus"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          },
          {
            "name": "campaign_type",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/CampaignType"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Campaign Type"
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Search"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CampaignListResponse"
                  },
                  "title": "Response List Campaigns Api V1 Campaigns Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "x-luso8-scope": "campaigns:read"
      },
      "post": {
        "tags": [
          "Campaigns"
        ],
        "summary": "Create Campaign",
        "description": "Create a new campaign.\n\n**Required scope:** `campaigns:write`",
        "operationId": "create-campaign",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "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"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "x-luso8-scope": "campaigns:write"
      }
    },
    "/api/v1/campaigns/analytics/summary": {
      "get": {
        "tags": [
          "Campaigns"
        ],
        "summary": "Get Campaigns Summary",
        "description": "Get summary analytics for all campaigns in the organization\n\n**Required scope:** `campaigns:read`",
        "operationId": "get-campaigns-summary",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "days",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 365,
              "minimum": 1,
              "description": "Period in days",
              "default": 30,
              "title": "Days"
            },
            "description": "Period in days"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "x-luso8-scope": "campaigns:read"
      }
    },
    "/api/v1/campaigns/stats": {
      "get": {
        "tags": [
          "Campaigns"
        ],
        "summary": "Get Campaigns Stats",
        "description": "Campaign counts per status, from one grouped query.\n\n**Required scope:** `campaigns:read`",
        "operationId": "get-campaigns-stats",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "x-luso8-scope": "campaigns:read"
      }
    },
    "/api/v1/campaigns/{campaign_id}": {
      "get": {
        "tags": [
          "Campaigns"
        ],
        "summary": "Get Campaign",
        "description": "Get a campaign by ID with all details\n\n**Required scope:** `campaigns:read`",
        "operationId": "get-campaign",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "campaign_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Campaign Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CampaignDetailResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "x-luso8-scope": "campaigns:read"
      },
      "put": {
        "tags": [
          "Campaigns"
        ],
        "summary": "Update Campaign",
        "description": "Update a campaign\n\n**Required scope:** `campaigns:write`",
        "operationId": "update-campaign",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "campaign_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Campaign 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"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "x-luso8-scope": "campaigns:write"
      },
      "delete": {
        "tags": [
          "Campaigns"
        ],
        "summary": "Delete Campaign",
        "description": "Delete a campaign that has never sent anything.\n\n**Required scope:** `campaigns:write`",
        "operationId": "delete-campaign",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "campaign_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Campaign Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "x-luso8-scope": "campaigns:write"
      }
    },
    "/api/v1/campaigns/{campaign_id}/analytics": {
      "get": {
        "tags": [
          "Campaigns"
        ],
        "summary": "Get Campaign Analytics",
        "description": "Basic analytics for a campaign's current run.\n\n**Required scope:** `campaigns:read`",
        "operationId": "get-campaign-analytics",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "campaign_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Campaign Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CampaignAnalytics"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "x-luso8-scope": "campaigns:read"
      }
    },
    "/api/v1/campaigns/{campaign_id}/archive": {
      "post": {
        "tags": [
          "Campaigns"
        ],
        "summary": "Archive Campaign",
        "description": "Archive a campaign: it stops running and keeps all of its history.\n\n**Required scope:** `campaigns:write`",
        "operationId": "archive-campaign",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "campaign_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Campaign Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CampaignActionResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "x-luso8-scope": "campaigns:write"
      }
    },
    "/api/v1/campaigns/{campaign_id}/complete": {
      "post": {
        "tags": [
          "Campaigns"
        ],
        "summary": "Complete Campaign",
        "description": "Mark a campaign as completed\n\n**Required scope:** `campaigns:write`",
        "operationId": "complete-campaign",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "campaign_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Campaign Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CampaignActionResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "x-luso8-scope": "campaigns:write"
      }
    },
    "/api/v1/campaigns/{campaign_id}/contacts": {
      "get": {
        "tags": [
          "Campaigns"
        ],
        "summary": "List Campaign Contacts",
        "description": "List contacts in a campaign\n\n**Required scope:** `campaigns:read`",
        "operationId": "list-campaign-contacts",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "campaign_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Campaign Id"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/ExecutionStatus"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          },
          {
            "name": "skip",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0,
              "title": "Skip"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "default": 50,
              "title": "Limit"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CampaignContactResponse"
                  },
                  "title": "Response List Campaign Contacts Api V1 Campaigns  Campaign Id  Contacts Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "x-luso8-scope": "campaigns:read"
      },
      "post": {
        "tags": [
          "Campaigns"
        ],
        "summary": "Add Contact To Campaign",
        "description": "Add a single contact to a campaign\n\n**Required scope:** `campaigns:write`",
        "operationId": "add-contact-to-campaign",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "campaign_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Campaign Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CampaignContactCreate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CampaignContactResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "x-luso8-scope": "campaigns:write"
      }
    },
    "/api/v1/campaigns/{campaign_id}/contacts/from-lists": {
      "post": {
        "tags": [
          "Campaigns"
        ],
        "summary": "Add Contacts From Lists",
        "description": "Add contacts from lists to a campaign\n\n**Required scope:** `campaigns:write`",
        "operationId": "add-contacts-from-lists",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "campaign_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Campaign Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BulkAddFromListRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CampaignActionResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "x-luso8-scope": "campaigns:write"
      }
    },
    "/api/v1/campaigns/{campaign_id}/contacts/{contact_id}": {
      "delete": {
        "tags": [
          "Campaigns"
        ],
        "summary": "Remove Contact From Campaign",
        "description": "Remove a contact from a campaign\n\n**Required scope:** `campaigns:write`",
        "operationId": "remove-contact-from-campaign",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "campaign_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Campaign Id"
            }
          },
          {
            "name": "contact_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Contact Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "x-luso8-scope": "campaigns:write"
      }
    },
    "/api/v1/campaigns/{campaign_id}/launch": {
      "post": {
        "tags": [
          "Campaigns"
        ],
        "summary": "Launch Campaign",
        "description": "Launch a campaign\n\n**Required scope:** `campaigns:write`",
        "operationId": "launch-campaign",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "campaign_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Campaign Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CampaignLaunchRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CampaignActionResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "x-luso8-scope": "campaigns:write"
      }
    },
    "/api/v1/campaigns/{campaign_id}/pause": {
      "post": {
        "tags": [
          "Campaigns"
        ],
        "summary": "Pause Campaign",
        "description": "Pause a campaign\n\n**Required scope:** `campaigns:write`",
        "operationId": "pause-campaign",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "campaign_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Campaign Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CampaignActionResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "x-luso8-scope": "campaigns:write"
      }
    },
    "/api/v1/campaigns/{campaign_id}/resume": {
      "post": {
        "tags": [
          "Campaigns"
        ],
        "summary": "Resume Campaign",
        "description": "Resume a paused campaign\n\n**Required scope:** `campaigns:write`",
        "operationId": "resume-campaign",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "campaign_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Campaign Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CampaignActionResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "x-luso8-scope": "campaigns:write"
      }
    },
    "/api/v1/campaigns/{campaign_id}/steps": {
      "get": {
        "tags": [
          "Campaigns"
        ],
        "summary": "List Campaign Steps",
        "description": "List all steps for a campaign\n\n**Required scope:** `campaigns:read`",
        "operationId": "list-campaign-steps",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "campaign_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Campaign Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CampaignStepResponse"
                  },
                  "title": "Response List Campaign Steps Api V1 Campaigns  Campaign Id  Steps Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "x-luso8-scope": "campaigns:read"
      },
      "post": {
        "tags": [
          "Campaigns"
        ],
        "summary": "Create Campaign Step",
        "description": "Add a step to a campaign\n\n**Required scope:** `campaigns:write`",
        "operationId": "create-campaign-step",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "campaign_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Campaign Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CampaignStepCreate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CampaignStepResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "x-luso8-scope": "campaigns:write"
      }
    },
    "/api/v1/campaigns/{campaign_id}/steps/{step_id}": {
      "put": {
        "tags": [
          "Campaigns"
        ],
        "summary": "Update Campaign Step",
        "description": "Update a campaign step\n\n**Required scope:** `campaigns:write`",
        "operationId": "update-campaign-step",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "campaign_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Campaign Id"
            }
          },
          {
            "name": "step_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Step Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CampaignStepUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CampaignStepResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "x-luso8-scope": "campaigns:write"
      },
      "delete": {
        "tags": [
          "Campaigns"
        ],
        "summary": "Delete Campaign Step",
        "description": "Delete a campaign step\n\n**Required scope:** `campaigns:write`",
        "operationId": "delete-campaign-step",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "campaign_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Campaign Id"
            }
          },
          {
            "name": "step_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Step Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "x-luso8-scope": "campaigns:write"
      }
    },
    "/api/v1/companies": {
      "post": {
        "tags": [
          "Companies"
        ],
        "summary": "Create Company",
        "description": "Create a new company.\n\n**Required scope:** `companies:write`",
        "operationId": "create-company",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "acting_user_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Acting User Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompanyCreate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Company"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "x-luso8-scope": "companies:write"
      },
      "get": {
        "tags": [
          "Companies"
        ],
        "summary": "List Companies",
        "description": "Get all companies with optional filtering.\n\n**Required scope:** `companies:read`",
        "operationId": "list-companies",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "skip",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0,
              "title": "Skip"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "default": 100,
              "title": "Limit"
            }
          },
          {
            "name": "name",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Name"
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Search"
            }
          },
          {
            "name": "industry",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "Industry"
            }
          },
          {
            "name": "size",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "Size"
            }
          },
          {
            "name": "revenue",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "Revenue"
            }
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Country"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CompanyStatus"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          },
          {
            "name": "account_manager",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Account Manager"
            }
          },
          {
            "name": "account_manager_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Account Manager Id"
            }
          },
          {
            "name": "tags",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tags"
            }
          },
          {
            "name": "enrichment_status",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "Enrichment Status"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Company"
                  },
                  "title": "Response Read Companies Api V1 Companies Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "x-luso8-scope": "companies:read"
      }
    },
    "/api/v1/companies/bulk": {
      "post": {
        "tags": [
          "Companies"
        ],
        "summary": "Bulk Create Companies",
        "description": "Bulk create companies (``acting_user_id``: see POST /companies).\n\n**Required scope:** `companies:write`",
        "operationId": "bulk-create-companies",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "acting_user_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Acting User Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompanyBulkCreate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Company"
                  },
                  "title": "Response Bulk Create Companies Api V1 Companies Bulk Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "x-luso8-scope": "companies:write"
      }
    },
    "/api/v1/companies/count": {
      "get": {
        "tags": [
          "Companies"
        ],
        "summary": "Count Companies",
        "description": "Count companies with the same filters as the list route.\n\n**Required scope:** `companies:read`",
        "operationId": "count-companies",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "name",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Name"
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Search"
            }
          },
          {
            "name": "industry",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "Industry"
            }
          },
          {
            "name": "size",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "Size"
            }
          },
          {
            "name": "revenue",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "Revenue"
            }
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Country"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CompanyStatus"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          },
          {
            "name": "account_manager",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Account Manager"
            }
          },
          {
            "name": "account_manager_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Account Manager Id"
            }
          },
          {
            "name": "tags",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tags"
            }
          },
          {
            "name": "enrichment_status",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "Enrichment Status"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "x-luso8-scope": "companies:read"
      }
    },
    "/api/v1/companies/search": {
      "get": {
        "tags": [
          "Companies"
        ],
        "summary": "Search Companies",
        "description": "Search companies by name, description, industry, or notes\n\n**Required scope:** `companies:read`",
        "operationId": "search-companies",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "query",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 2,
              "title": "Query"
            }
          },
          {
            "name": "skip",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0,
              "title": "Skip"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "default": 100,
              "title": "Limit"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Company"
                  },
                  "title": "Response Search Companies Api V1 Companies Search Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "x-luso8-scope": "companies:read"
      }
    },
    "/api/v1/companies/{company_id}": {
      "get": {
        "tags": [
          "Companies"
        ],
        "summary": "Get Company",
        "description": "Get a specific company with full pipeline data\n\n**Required scope:** `companies:read`",
        "operationId": "get-company",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "company_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Company Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Company"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "x-luso8-scope": "companies:read"
      },
      "put": {
        "tags": [
          "Companies"
        ],
        "summary": "Update Company",
        "description": "Update a company\n\n**Required scope:** `companies:write`",
        "operationId": "update-company",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "company_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Company Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompanyUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Company"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "x-luso8-scope": "companies:write"
      },
      "delete": {
        "tags": [
          "Companies"
        ],
        "summary": "Delete Company",
        "description": "Delete a company\n\n**Required scope:** `companies:write`",
        "operationId": "delete-company",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "company_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Company Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "x-luso8-scope": "companies:write"
      }
    },
    "/api/v1/contacts": {
      "post": {
        "tags": [
          "Contacts"
        ],
        "summary": "Create Contact",
        "description": "Create a new contact\n\n**Required scope:** `contacts:write`",
        "operationId": "create-contact",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ContactCreate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Contact"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "x-luso8-scope": "contacts:write"
      },
      "get": {
        "tags": [
          "Contacts"
        ],
        "summary": "List Contacts",
        "description": "Get contacts, newest first. Every filter given applies (AND):\n``status``, ``search``, ``country`` (English name, whole value,\ncase-insensitive), ``enrichment_status`` (repeatable: ``completed``,\n``failed``, ``none`` = never enriched), ``list_ids`` and\n``exclude_list_ids``.\n\n**Required scope:** `contacts:read`",
        "operationId": "list-contacts",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/ContactStatus"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Search"
            }
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Country"
            }
          },
          {
            "name": "enrichment_status",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "Enrichment Status"
            }
          },
          {
            "name": "list_ids",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "List Ids"
            }
          },
          {
            "name": "exclude_list_ids",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Exclude List Ids"
            }
          },
          {
            "name": "include_lists",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false,
              "title": "Include Lists"
            }
          },
          {
            "name": "skip",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0,
              "title": "Skip"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 500,
              "minimum": 1,
              "default": 100,
              "title": "Limit"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Contact"
                  },
                  "title": "Response Read Contacts Api V1 Contacts Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "x-luso8-scope": "contacts:read"
      }
    },
    "/api/v1/contacts/bulk": {
      "post": {
        "tags": [
          "Contacts"
        ],
        "summary": "Bulk Create Contacts",
        "description": "Bulk create contacts (CSV import).\n\n**Required scope:** `contacts:write`",
        "operationId": "bulk-create-contacts",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "items": {
                  "$ref": "#/components/schemas/ContactCreate"
                },
                "type": "array",
                "title": "Contacts Data"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/Contact"
                  },
                  "type": "array",
                  "title": "Response Bulk Create Contacts Api V1 Contacts Bulk Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "x-luso8-scope": "contacts:write"
      }
    },
    "/api/v1/contacts/{contact_id}": {
      "get": {
        "tags": [
          "Contacts"
        ],
        "summary": "Get Contact",
        "description": "Get a specific contact with full pipeline data\n\n**Required scope:** `contacts:read`",
        "operationId": "get-contact",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "contact_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Contact Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Contact"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "x-luso8-scope": "contacts:read"
      },
      "put": {
        "tags": [
          "Contacts"
        ],
        "summary": "Update Contact",
        "description": "Update a contact\n\n**Required scope:** `contacts:write`",
        "operationId": "update-contact",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "contact_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Contact Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ContactUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Contact"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "x-luso8-scope": "contacts:write"
      },
      "delete": {
        "tags": [
          "Contacts"
        ],
        "summary": "Delete Contact",
        "description": "Delete a contact\n\n**Required scope:** `contacts:write`",
        "operationId": "delete-contact",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "contact_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Contact Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Contact"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "x-luso8-scope": "contacts:write"
      }
    },
    "/api/v1/contacts/{contact_id}/extras": {
      "patch": {
        "tags": [
          "Contacts"
        ],
        "summary": "Update Contact Extras",
        "description": "Set per-org custom field values on a contact.\n\n**Required scope:** `contacts:write`",
        "operationId": "update-contact-extras",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "contact_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Contact Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true,
                "title": "Payload"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Contact"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "x-luso8-scope": "contacts:write"
      }
    },
    "/api/v1/dashboard/activity": {
      "get": {
        "tags": [
          "Reports"
        ],
        "summary": "Get Dashboard Activity",
        "description": "Recent events across the organisation for a period, newest first:\ncontacts, companies, intent signals, conversations, tickets, calls,\nappointments, pipeline records, deals, campaigns and published articles.\n\n**Required scope:** `reports:read`",
        "operationId": "get-dashboard-activity",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "period",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "1d | 7d | 30d",
              "default": "7d",
              "title": "Period"
            },
            "description": "1d | 7d | 30d"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 200,
              "minimum": 1,
              "default": 50,
              "title": "Limit"
            }
          },
          {
            "name": "types",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Comma-separated subset of the activity types; every type when omitted",
              "title": "Types"
            },
            "description": "Comma-separated subset of the activity types; every type when omitted"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ActivityFeedResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "x-luso8-scope": "reports:read"
      }
    },
    "/api/v1/dashboard/stats": {
      "get": {
        "tags": [
          "Reports"
        ],
        "summary": "Get Dashboard Stats",
        "description": "Get dashboard statistics for the current user's organization\n\n**Required scope:** `reports:read`",
        "operationId": "get-dashboard-stats",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DashboardResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "x-luso8-scope": "reports:read"
      }
    },
    "/api/v1/deals/customers": {
      "get": {
        "tags": [
          "Deals"
        ],
        "summary": "List Customers",
        "operationId": "list-customers",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "skip",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0,
              "title": "Skip"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 200,
              "minimum": 1,
              "default": 50,
              "title": "Limit"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          },
          {
            "name": "owner_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Owner Id"
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Search"
            }
          },
          {
            "name": "contact_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Contact Id"
            }
          },
          {
            "name": "company_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Company Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Customer"
                  },
                  "title": "Response List Customers Api V1 Deals Customers Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "description": "**Required scope:** `deals:read`",
        "x-luso8-scope": "deals:read"
      },
      "post": {
        "tags": [
          "Deals"
        ],
        "summary": "Create Customer",
        "operationId": "create-customer",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CustomerCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Customer"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "description": "**Required scope:** `deals:write`",
        "x-luso8-scope": "deals:write"
      }
    },
    "/api/v1/deals/customers/from-deal/{deal_id}": {
      "post": {
        "tags": [
          "Deals"
        ],
        "summary": "Close Deal As Customer",
        "description": "Close a Deal as won and convert it into a Customer (\"Close as Won\").\n\n**Required scope:** `deals:write`",
        "operationId": "close-deal-as-customer",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "deal_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Deal Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Customer"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "x-luso8-scope": "deals:write"
      }
    },
    "/api/v1/deals/customers/{customer_id}": {
      "get": {
        "tags": [
          "Deals"
        ],
        "summary": "Get Customer",
        "operationId": "get-customer",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "customer_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Customer Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Customer"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "description": "**Required scope:** `deals:read`",
        "x-luso8-scope": "deals:read"
      },
      "put": {
        "tags": [
          "Deals"
        ],
        "summary": "Update Customer",
        "operationId": "update-customer",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "customer_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Customer Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CustomerUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Customer"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "description": "**Required scope:** `deals:write`",
        "x-luso8-scope": "deals:write"
      },
      "delete": {
        "tags": [
          "Deals"
        ],
        "summary": "Delete Customer",
        "operationId": "delete-customer",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "customer_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Customer Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "description": "**Required scope:** `deals:write`",
        "x-luso8-scope": "deals:write"
      }
    },
    "/api/v1/deals/deals": {
      "get": {
        "tags": [
          "Deals"
        ],
        "summary": "List Deals",
        "operationId": "list-deals",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "skip",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0,
              "title": "Skip"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 200,
              "minimum": 1,
              "default": 50,
              "title": "Limit"
            }
          },
          {
            "name": "stage",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Stage"
            }
          },
          {
            "name": "owner_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Owner Id"
            }
          },
          {
            "name": "prospect_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Prospect Id"
            }
          },
          {
            "name": "contact_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Contact Id"
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Search"
            }
          },
          {
            "name": "company_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Company Id"
            }
          },
          {
            "name": "customer_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Customer Id"
            }
          },
          {
            "name": "lead_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Lead Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Deal"
                  },
                  "title": "Response List Deals Api V1 Deals Deals Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "description": "**Required scope:** `deals:read`",
        "x-luso8-scope": "deals:read"
      },
      "post": {
        "tags": [
          "Deals"
        ],
        "summary": "Create Deal",
        "operationId": "create-deal",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DealCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Deal"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "description": "**Required scope:** `deals:write`",
        "x-luso8-scope": "deals:write"
      }
    },
    "/api/v1/deals/deals/count": {
      "get": {
        "tags": [
          "Deals"
        ],
        "summary": "Count Deals",
        "description": "Count deals with the same filters as the list route (page totals).\n\n**Required scope:** `deals:read`",
        "operationId": "count-deals",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "stage",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Stage"
            }
          },
          {
            "name": "owner_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Owner Id"
            }
          },
          {
            "name": "prospect_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Prospect Id"
            }
          },
          {
            "name": "contact_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Contact Id"
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Search"
            }
          },
          {
            "name": "company_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Company Id"
            }
          },
          {
            "name": "customer_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Customer Id"
            }
          },
          {
            "name": "lead_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Lead Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "x-luso8-scope": "deals:read"
      }
    },
    "/api/v1/deals/deals/from-lead/{lead_id}": {
      "post": {
        "tags": [
          "Deals"
        ],
        "summary": "Create Deal From Lead",
        "description": "Promote a Lead to a Deal when it becomes sales-qualified.\n\n**Required scope:** `deals:write`",
        "operationId": "create-deal-from-lead",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "lead_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Lead Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConvertLeadToDealRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Deal"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "x-luso8-scope": "deals:write"
      }
    },
    "/api/v1/deals/deals/pipeline-summary": {
      "get": {
        "tags": [
          "Deals"
        ],
        "summary": "Pipeline Summary",
        "operationId": "pipeline-summary",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "description": "**Required scope:** `deals:read`",
        "x-luso8-scope": "deals:read"
      }
    },
    "/api/v1/deals/deals/{deal_id}": {
      "get": {
        "tags": [
          "Deals"
        ],
        "summary": "Get Deal",
        "operationId": "get-deal",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "deal_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Deal Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Deal"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "description": "**Required scope:** `deals:read`",
        "x-luso8-scope": "deals:read"
      },
      "put": {
        "tags": [
          "Deals"
        ],
        "summary": "Update Deal",
        "operationId": "update-deal",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "deal_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Deal Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DealUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Deal"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "description": "**Required scope:** `deals:write`",
        "x-luso8-scope": "deals:write"
      },
      "delete": {
        "tags": [
          "Deals"
        ],
        "summary": "Delete Deal",
        "operationId": "delete-deal",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "deal_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Deal Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "description": "**Required scope:** `deals:write`",
        "x-luso8-scope": "deals:write"
      }
    },
    "/api/v1/deals/leads": {
      "get": {
        "tags": [
          "Leads"
        ],
        "summary": "List Leads",
        "operationId": "list-leads",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "skip",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0,
              "title": "Skip"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 200,
              "minimum": 1,
              "default": 50,
              "title": "Limit"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          },
          {
            "name": "source",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Source"
            }
          },
          {
            "name": "owner_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Owner Id"
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Search"
            }
          },
          {
            "name": "contact_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Contact Id"
            }
          },
          {
            "name": "company_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Company Id"
            }
          },
          {
            "name": "source_list_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Source List Id"
            }
          },
          {
            "name": "lifecycle_stage",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Lifecycle Stage"
            }
          },
          {
            "name": "lead_type",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Lead Type"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Lead"
                  },
                  "title": "Response List Leads Api V1 Deals Leads Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "description": "**Required scope:** `leads:read`",
        "x-luso8-scope": "leads:read"
      },
      "post": {
        "tags": [
          "Leads"
        ],
        "summary": "Create Lead",
        "operationId": "create-lead",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LeadCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Lead"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "description": "**Required scope:** `leads:write`",
        "x-luso8-scope": "leads:write"
      }
    },
    "/api/v1/deals/leads/count": {
      "get": {
        "tags": [
          "Leads"
        ],
        "summary": "Count Leads",
        "description": "Count leads with the same filters as the list route (page totals).\n\n**Required scope:** `leads:read`",
        "operationId": "count-leads",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          },
          {
            "name": "source",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Source"
            }
          },
          {
            "name": "owner_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Owner Id"
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Search"
            }
          },
          {
            "name": "contact_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Contact Id"
            }
          },
          {
            "name": "company_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Company Id"
            }
          },
          {
            "name": "source_list_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Source List Id"
            }
          },
          {
            "name": "lifecycle_stage",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Lifecycle Stage"
            }
          },
          {
            "name": "lead_type",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Lead Type"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "x-luso8-scope": "leads:read"
      }
    },
    "/api/v1/deals/leads/from-prospect/{prospect_id}": {
      "post": {
        "tags": [
          "Leads"
        ],
        "summary": "Promote Prospect To Lead",
        "description": "Promote an ICP-matched Prospect to a Lead once they engage.\n\n**Required scope:** `leads:write`",
        "operationId": "promote-prospect-to-lead",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "prospect_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Prospect Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Lead"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "x-luso8-scope": "leads:write"
      }
    },
    "/api/v1/deals/leads/{lead_id}": {
      "get": {
        "tags": [
          "Leads"
        ],
        "summary": "Get Lead",
        "operationId": "get-lead",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "lead_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Lead Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Lead"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "description": "**Required scope:** `leads:read`",
        "x-luso8-scope": "leads:read"
      },
      "put": {
        "tags": [
          "Leads"
        ],
        "summary": "Update Lead",
        "operationId": "update-lead",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "lead_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Lead Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LeadUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Lead"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "description": "**Required scope:** `leads:write`",
        "x-luso8-scope": "leads:write"
      },
      "delete": {
        "tags": [
          "Leads"
        ],
        "summary": "Delete Lead",
        "operationId": "delete-lead",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "lead_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Lead Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "description": "**Required scope:** `leads:write`",
        "x-luso8-scope": "leads:write"
      }
    },
    "/api/v1/deals/products": {
      "get": {
        "tags": [
          "Deals"
        ],
        "summary": "List Products",
        "operationId": "list-products",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "skip",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0,
              "title": "Skip"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 200,
              "minimum": 1,
              "default": 50,
              "title": "Limit"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          },
          {
            "name": "product_type",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Product Type"
            }
          },
          {
            "name": "category",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Category"
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Search"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Product"
                  },
                  "title": "Response List Products Api V1 Deals Products Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "description": "**Required scope:** `deals:read`",
        "x-luso8-scope": "deals:read"
      },
      "post": {
        "tags": [
          "Deals"
        ],
        "summary": "Create Product",
        "operationId": "create-product",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProductCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Product"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "description": "**Required scope:** `deals:write`",
        "x-luso8-scope": "deals:write"
      }
    },
    "/api/v1/deals/products/{product_id}": {
      "get": {
        "tags": [
          "Deals"
        ],
        "summary": "Get Product",
        "operationId": "get-product",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "product_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Product Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Product"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "description": "**Required scope:** `deals:read`",
        "x-luso8-scope": "deals:read"
      },
      "put": {
        "tags": [
          "Deals"
        ],
        "summary": "Update Product",
        "description": "Update a product. Archiving / restoring is ``{\"status\": \"archived\"}``\n/ ``{\"status\": \"active\"}`` through this route.\n\n**Required scope:** `deals:write`",
        "operationId": "update-product",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "product_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Product Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProductUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Product"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "x-luso8-scope": "deals:write"
      },
      "delete": {
        "tags": [
          "Deals"
        ],
        "summary": "Delete Product",
        "description": "Delete a product that is not on any deal. A product that is attached\nto deals answers 409 ``product_in_use`` - archive it instead so the\ndeal history keeps its line items.\n\n**Required scope:** `deals:write`",
        "operationId": "delete-product",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "product_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Product Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "x-luso8-scope": "deals:write"
      }
    },
    "/api/v1/deals/prospects": {
      "get": {
        "tags": [
          "Deals"
        ],
        "summary": "List Prospects",
        "operationId": "list-prospects",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "skip",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0,
              "title": "Skip"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 200,
              "minimum": 1,
              "default": 50,
              "title": "Limit"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          },
          {
            "name": "owner_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Owner Id"
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Search"
            }
          },
          {
            "name": "list_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "List Id"
            }
          },
          {
            "name": "contact_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Contact Id"
            }
          },
          {
            "name": "company_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Company Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Prospect"
                  },
                  "title": "Response List Prospects Api V1 Deals Prospects Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "description": "**Required scope:** `deals:read`",
        "x-luso8-scope": "deals:read"
      },
      "post": {
        "tags": [
          "Deals"
        ],
        "summary": "Create Prospect",
        "operationId": "create-prospect",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProspectCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Prospect"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "description": "**Required scope:** `deals:write`",
        "x-luso8-scope": "deals:write"
      }
    },
    "/api/v1/deals/prospects/{prospect_id}": {
      "get": {
        "tags": [
          "Deals"
        ],
        "summary": "Get Prospect",
        "operationId": "get-prospect",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "prospect_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Prospect Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Prospect"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "description": "**Required scope:** `deals:read`",
        "x-luso8-scope": "deals:read"
      },
      "put": {
        "tags": [
          "Deals"
        ],
        "summary": "Update Prospect",
        "operationId": "update-prospect",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "prospect_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Prospect Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProspectUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Prospect"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "description": "**Required scope:** `deals:write`",
        "x-luso8-scope": "deals:write"
      },
      "delete": {
        "tags": [
          "Deals"
        ],
        "summary": "Delete Prospect",
        "operationId": "delete-prospect",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "prospect_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Prospect Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "description": "**Required scope:** `deals:write`",
        "x-luso8-scope": "deals:write"
      }
    },
    "/api/v1/engage-inbox/conversations": {
      "get": {
        "tags": [
          "Conversations"
        ],
        "summary": "List Inbox Conversations",
        "description": "One page of conversations, newest activity first.\n\n**Required scope:** `conversations:read`",
        "operationId": "list-inbox-conversations",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "channel",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Channel"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          },
          {
            "name": "assigned_to",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Assigned To"
            }
          },
          {
            "name": "workspace_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "name": "contact_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Contact Id"
            }
          },
          {
            "name": "deal_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Deal Id"
            }
          },
          {
            "name": "campaign_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Campaign Id"
            }
          },
          {
            "name": "is_starred",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Is Starred"
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Search"
            }
          },
          {
            "name": "folder",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "inbox|all|drafts|sent|ai|starred|assigned_to_me",
              "title": "Folder"
            },
            "description": "inbox|all|drafts|sent|ai|starred|assigned_to_me"
          },
          {
            "name": "skip",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0,
              "title": "Skip"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 200,
              "minimum": 1,
              "default": 50,
              "title": "Limit"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EngageConversationPage"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "x-luso8-scope": "conversations:read"
      },
      "post": {
        "tags": [
          "Conversations"
        ],
        "summary": "Create Inbox Conversation",
        "operationId": "create-inbox-conversation",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EngageConversationCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EngageConversationOut"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "description": "**Required scope:** `conversations:write`",
        "x-luso8-scope": "conversations:write"
      }
    },
    "/api/v1/engage-inbox/conversations/{conversation_id}": {
      "get": {
        "tags": [
          "Conversations"
        ],
        "summary": "Get Inbox Conversation",
        "operationId": "get-inbox-conversation",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "conversation_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Conversation Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EngageConversationOut"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "description": "**Required scope:** `conversations:read`",
        "x-luso8-scope": "conversations:read"
      },
      "patch": {
        "tags": [
          "Conversations"
        ],
        "summary": "Update Inbox Conversation",
        "operationId": "update-inbox-conversation",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "conversation_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Conversation Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EngageConversationUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EngageConversationOut"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "description": "**Required scope:** `conversations:write`",
        "x-luso8-scope": "conversations:write"
      }
    },
    "/api/v1/engage-inbox/conversations/{conversation_id}/messages": {
      "get": {
        "tags": [
          "Conversations"
        ],
        "summary": "List Inbox Conversation Messages",
        "description": "The NEWEST `limit` messages of a thread, oldest first.\n\n**Required scope:** `conversations:read`",
        "operationId": "list-inbox-conversation-messages",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "conversation_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Conversation Id"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 200,
              "minimum": 1,
              "default": 100,
              "title": "Limit"
            }
          },
          {
            "name": "before",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "null"
                }
              ],
              "description": "ISO timestamp: return messages created before it",
              "title": "Before"
            },
            "description": "ISO timestamp: return messages created before it"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EngageMessagePage"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "x-luso8-scope": "conversations:read"
      }
    },
    "/api/v1/engage-inbox/messages": {
      "get": {
        "tags": [
          "Conversations"
        ],
        "summary": "List Inbox Messages",
        "description": "One page of a thread, oldest first: `{items, total, has_more}`.\n\n**Required scope:** `conversations:read`",
        "operationId": "list-inbox-messages",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "conversation_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Conversation id",
              "title": "Conversation Id"
            },
            "description": "Conversation id"
          },
          {
            "name": "skip",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0,
              "title": "Skip"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 500,
              "minimum": 1,
              "default": 100,
              "title": "Limit"
            }
          },
          {
            "name": "before",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "null"
                }
              ],
              "description": "ISO timestamp: return messages created before it",
              "title": "Before"
            },
            "description": "ISO timestamp: return messages created before it"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EngageMessagePage"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "x-luso8-scope": "conversations:read"
      },
      "post": {
        "tags": [
          "Conversations"
        ],
        "summary": "Send Inbox Message",
        "description": "Send an outbound message, creating a new conversation if needed.\n\n**Required scope:** `conversations:write`",
        "operationId": "send-inbox-message",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EngageMessageCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EngageMessageResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "x-luso8-scope": "conversations:write"
      }
    },
    "/api/v1/knowledge/documents/{document_id}": {
      "get": {
        "tags": [
          "Knowledge"
        ],
        "summary": "Get Document",
        "description": "Get a specific document.\n\n**Required scope:** `knowledge:read`",
        "operationId": "get-document",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "document_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Document Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KnowledgeDocumentResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "x-luso8-scope": "knowledge:read"
      },
      "delete": {
        "tags": [
          "Knowledge"
        ],
        "summary": "Delete Document",
        "description": "Delete a document.\n\n**Required scope:** `knowledge:write`",
        "operationId": "delete-document",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "document_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Document Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "x-luso8-scope": "knowledge:write"
      }
    },
    "/api/v1/knowledge/folders": {
      "get": {
        "tags": [
          "Knowledge"
        ],
        "summary": "List Folders",
        "description": "List all knowledge folders for the organization.\n\n**Required scope:** `knowledge:read`",
        "operationId": "list-folders",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "knowledge_type",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by knowledge type",
              "title": "Knowledge Type"
            },
            "description": "Filter by knowledge type"
          },
          {
            "name": "parent_folder_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by parent folder",
              "title": "Parent Folder Id"
            },
            "description": "Filter by parent folder"
          },
          {
            "name": "skip",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0,
              "title": "Skip"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "default": 100,
              "title": "Limit"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/KnowledgeFolderResponse"
                  },
                  "title": "Response List Folders Api V1 Knowledge Folders Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "x-luso8-scope": "knowledge:read"
      },
      "post": {
        "tags": [
          "Knowledge"
        ],
        "summary": "Create Folder",
        "description": "Create a new knowledge folder.\n\n**Required scope:** `knowledge:write`",
        "operationId": "create-folder",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FolderCreatePayload"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KnowledgeFolderResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "x-luso8-scope": "knowledge:write"
      }
    },
    "/api/v1/knowledge/folders/{folder_id}": {
      "get": {
        "tags": [
          "Knowledge"
        ],
        "summary": "Get Folder",
        "description": "Get a specific folder.\n\n**Required scope:** `knowledge:read`",
        "operationId": "get-folder",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "folder_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Folder Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KnowledgeFolderResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "x-luso8-scope": "knowledge:read"
      },
      "put": {
        "tags": [
          "Knowledge"
        ],
        "summary": "Update Folder",
        "description": "Update a folder.\n\n**Required scope:** `knowledge:write`",
        "operationId": "update-folder",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "folder_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Folder Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/KnowledgeFolderUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KnowledgeFolderResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "x-luso8-scope": "knowledge:write"
      },
      "delete": {
        "tags": [
          "Knowledge"
        ],
        "summary": "Delete Folder",
        "description": "Delete a folder and all its documents.\n\n**Required scope:** `knowledge:write`",
        "operationId": "delete-folder",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "folder_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Folder Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "x-luso8-scope": "knowledge:write"
      }
    },
    "/api/v1/knowledge/folders/{folder_id}/documents": {
      "get": {
        "tags": [
          "Knowledge"
        ],
        "summary": "List Documents",
        "description": "List documents in a folder.\n\n**Required scope:** `knowledge:read`",
        "operationId": "list-documents",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "folder_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Folder Id"
            }
          },
          {
            "name": "document_type",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Document Type"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          },
          {
            "name": "skip",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0,
              "title": "Skip"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "default": 100,
              "title": "Limit"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/KnowledgeDocumentResponse"
                  },
                  "title": "Response List Documents Api V1 Knowledge Folders  Folder Id  Documents Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "x-luso8-scope": "knowledge:read"
      }
    },
    "/api/v1/knowledge/folders/{folder_id}/documents/markdown": {
      "post": {
        "tags": [
          "Knowledge"
        ],
        "summary": "Create Markdown",
        "description": "Create a markdown document.\n\n**Required scope:** `knowledge:write`",
        "operationId": "create-markdown",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "folder_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Folder Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MarkdownCreatePayload"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KnowledgeDocumentResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "x-luso8-scope": "knowledge:write"
      }
    },
    "/api/v1/knowledge/folders/{folder_id}/documents/upload": {
      "post": {
        "tags": [
          "Knowledge"
        ],
        "summary": "Upload Document",
        "description": "Upload a document file (PDF, TXT, CSV, Excel; images and Word with the pipeline).\n\n**Required scope:** `knowledge:write`",
        "operationId": "upload-document",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "folder_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Folder Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Body_upload_document_api_v1_knowledge_folders__folder_id__documents_upload_post"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KnowledgeDocumentResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "x-luso8-scope": "knowledge:write"
      }
    },
    "/api/v1/knowledge/search": {
      "post": {
        "tags": [
          "Knowledge"
        ],
        "summary": "Search Knowledge",
        "description": "Search across knowledge base using semantic search.\n\n**Required scope:** `knowledge:write`",
        "operationId": "search-knowledge",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/KnowledgeSearchRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KnowledgeSearchResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "x-luso8-scope": "knowledge:write"
      }
    },
    "/api/v1/knowledge/stats": {
      "get": {
        "tags": [
          "Knowledge"
        ],
        "summary": "Get Stats",
        "description": "Get overall knowledge base statistics.\n\n**Required scope:** `knowledge:read`",
        "operationId": "get-stats",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KnowledgeStats"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "x-luso8-scope": "knowledge:read"
      }
    },
    "/api/v1/lists": {
      "post": {
        "tags": [
          "Lists"
        ],
        "summary": "Create List",
        "description": "Create new list\n\n**Required scope:** `lists:write`",
        "operationId": "create-list",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ListCreate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "x-luso8-scope": "lists:write"
      },
      "get": {
        "tags": [
          "Lists"
        ],
        "summary": "List Lists",
        "description": "Retrieve lists for the organization with optional filtering\n\n**Required scope:** `lists:read`",
        "operationId": "list-lists",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "skip",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 0,
              "title": "Skip"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 100,
              "title": "Limit"
            }
          },
          {
            "name": "keyword",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Keyword"
            }
          },
          {
            "name": "companies",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Companies"
            }
          },
          {
            "name": "list_names",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "List Names"
            }
          },
          {
            "name": "list_names_exclude",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "List Names Exclude"
            }
          },
          {
            "name": "date_from",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Date From"
            }
          },
          {
            "name": "date_to",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Date To"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ListResponse"
                  },
                  "title": "Response Read Lists Api V1 Lists Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "x-luso8-scope": "lists:read"
      }
    },
    "/api/v1/lists/search": {
      "get": {
        "tags": [
          "Lists"
        ],
        "summary": "Search Lists",
        "description": "Search lists by name or description\n\n**Required scope:** `lists:read`",
        "operationId": "search-lists",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Q"
            }
          },
          {
            "name": "skip",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 0,
              "title": "Skip"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 100,
              "title": "Limit"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ListResponse"
                  },
                  "title": "Response Search Lists Api V1 Lists Search Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "x-luso8-scope": "lists:read"
      }
    },
    "/api/v1/lists/{list_id}": {
      "get": {
        "tags": [
          "Lists"
        ],
        "summary": "Get List",
        "description": "Get list by ID\n\n**Required scope:** `lists:read`",
        "operationId": "get-list",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "list_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "List Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "x-luso8-scope": "lists:read"
      },
      "put": {
        "tags": [
          "Lists"
        ],
        "summary": "Update List",
        "description": "Update list\n\n**Required scope:** `lists:write`",
        "operationId": "update-list",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "list_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "List Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ListUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "x-luso8-scope": "lists:write"
      },
      "delete": {
        "tags": [
          "Lists"
        ],
        "summary": "Delete List",
        "description": "Delete list\n\n**Required scope:** `lists:write`",
        "operationId": "delete-list",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "list_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "List Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "title": "Response Delete List Api V1 Lists  List Id  Delete"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "x-luso8-scope": "lists:write"
      }
    },
    "/api/v1/lists/{list_id}/contacts": {
      "get": {
        "tags": [
          "Lists"
        ],
        "summary": "List List With Contacts",
        "description": "Get list with its contacts\n\n**Required scope:** `lists:read`",
        "operationId": "list-list-with-contacts",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "list_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "List Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListWithContacts"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "x-luso8-scope": "lists:read"
      },
      "post": {
        "tags": [
          "Lists"
        ],
        "summary": "Add Contacts To List",
        "description": "Add contacts to a list.\n\n**Required scope:** `lists:write`",
        "operationId": "add-contacts-to-list",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "list_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "List Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ListContactOperation"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListAddContactsResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "x-luso8-scope": "lists:write"
      },
      "delete": {
        "tags": [
          "Lists"
        ],
        "summary": "Remove Contacts From List",
        "description": "Remove contacts from a list (the contacts themselves are kept).\n\n**Required scope:** `lists:write`",
        "operationId": "remove-contacts-from-list",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "list_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "List Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ListContactOperation"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListRemoveContactsResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "x-luso8-scope": "lists:write"
      }
    },
    "/api/v1/reports/export.pdf": {
      "get": {
        "tags": [
          "Reports"
        ],
        "summary": "Export Report Overview Pdf",
        "description": "Live report for the period as a PDF (cover, one page per section,\nsignature block). Same data as GET /content/reports/overview.\n\n**Required scope:** `reports:read`",
        "operationId": "export-report-overview-pdf",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "period",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "7d | 30d | 90d",
              "default": "30d",
              "title": "Period"
            },
            "description": "7d | 30d | 90d"
          },
          {
            "name": "sections",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Comma-separated subset of engagement,campaign,visitors,agents,calls,tickets,content,sales",
              "title": "Sections"
            },
            "description": "Comma-separated subset of engagement,campaign,visitors,agents,calls,tickets,content,sales"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "x-luso8-scope": "reports:read"
      }
    },
    "/api/v1/research": {
      "post": {
        "tags": [
          "Leads"
        ],
        "summary": "Initiate Lead Search",
        "description": "Initiate a new deep research task.\n\n**Required scope:** `leads:write`",
        "operationId": "initiate-lead-search",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeepResearchRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeepResearchResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "x-luso8-scope": "leads:write"
      }
    },
    "/api/v1/research/active": {
      "get": {
        "tags": [
          "Leads"
        ],
        "summary": "Get Active Research Tasks",
        "description": "Searches still running or waiting for the person's input, for the\ncurrent organization. Used on page load to reattach to in-flight searches.\n\n**Required scope:** `leads:read`",
        "operationId": "get-active-research-tasks",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "type": "object",
                  "title": "Response Get Active Research Tasks Api V1 Research Active Get"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "x-luso8-scope": "leads:read"
      }
    },
    "/api/v1/research/results/{task_id}": {
      "get": {
        "tags": [
          "Leads"
        ],
        "summary": "Get Research Status",
        "description": "Get the status and results of a research task.\n\n**Required scope:** `leads:read`",
        "operationId": "get-research-status",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "task_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Task Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResearchStatusResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "x-luso8-scope": "leads:read"
      }
    },
    "/api/v1/research/{task_id}/cancel": {
      "post": {
        "tags": [
          "Leads"
        ],
        "summary": "Cancel Research Task",
        "description": "Cancel a running or paused search (revokes the worker task).\n\n**Required scope:** `leads:write`",
        "operationId": "cancel-research-task",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "task_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Task Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Cancel Research Task Api V1 Research  Task Id  Cancel Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "x-luso8-scope": "leads:write"
      }
    },
    "/api/v1/research/{task_id}/respond": {
      "post": {
        "tags": [
          "Leads"
        ],
        "summary": "Respond To Research Review",
        "description": "Answer a review point (approve/edit the plan; accept/continue/stop at\nquality review) and resume the search in the background.\n\n**Required scope:** `leads:write`",
        "operationId": "respond-to-research-review",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "task_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Task Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReviewDecisionRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Respond To Research Review Api V1 Research  Task Id  Respond Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "x-luso8-scope": "leads:write"
      }
    },
    "/api/v1/support-chat/conversations": {
      "get": {
        "tags": [
          "Conversations"
        ],
        "summary": "List Support Conversations",
        "operationId": "list-support-conversations",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          },
          {
            "name": "folder_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Folder Id"
            }
          },
          {
            "name": "category_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Category Id"
            }
          },
          {
            "name": "assigned_user_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Assigned User Id"
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Search"
            }
          },
          {
            "name": "skip",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0,
              "title": "Skip"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 200,
              "minimum": 1,
              "default": 50,
              "title": "Limit"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SupportConversationListResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "description": "**Required scope:** `conversations:read`",
        "x-luso8-scope": "conversations:read"
      },
      "post": {
        "tags": [
          "Conversations"
        ],
        "summary": "Create Support Conversation",
        "operationId": "create-support-conversation",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SupportConversationCreate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SupportConversationResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "description": "**Required scope:** `conversations:write`",
        "x-luso8-scope": "conversations:write"
      }
    },
    "/api/v1/support-chat/conversations/{conversation_id}": {
      "get": {
        "tags": [
          "Conversations"
        ],
        "summary": "Get Support Conversation",
        "operationId": "get-support-conversation",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "conversation_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Conversation Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SupportConversationResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "description": "**Required scope:** `conversations:read`",
        "x-luso8-scope": "conversations:read"
      },
      "patch": {
        "tags": [
          "Conversations"
        ],
        "summary": "Update Support Conversation",
        "operationId": "update-support-conversation",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "conversation_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Conversation Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SupportConversationUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SupportConversationResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "description": "**Required scope:** `conversations:write`",
        "x-luso8-scope": "conversations:write"
      }
    },
    "/api/v1/support-chat/conversations/{conversation_id}/handoff": {
      "post": {
        "tags": [
          "Conversations"
        ],
        "summary": "Hand Off Support Conversation",
        "description": "Mark the conversation as needing a human: AI replies pause, the reason\n\n**Required scope:** `conversations:write`",
        "operationId": "hand-off-support-conversation",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "conversation_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Conversation Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/app__schemas__support_chat__HandoffRequest"
                  },
                  {
                    "type": "null"
                  }
                ],
                "title": "Body"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SupportConversationResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "x-luso8-scope": "conversations:write"
      }
    },
    "/api/v1/support-chat/conversations/{conversation_id}/messages": {
      "get": {
        "tags": [
          "Conversations"
        ],
        "summary": "List Support Messages",
        "operationId": "list-support-messages",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "conversation_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Conversation Id"
            }
          },
          {
            "name": "skip",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0,
              "title": "Skip"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 500,
              "minimum": 1,
              "default": 100,
              "title": "Limit"
            }
          },
          {
            "name": "include_internal",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": true,
              "title": "Include Internal"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SupportMessageResponse"
                  },
                  "title": "Response List Messages Api V1 Support Chat Conversations  Conversation Id  Messages Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "description": "**Required scope:** `conversations:read`",
        "x-luso8-scope": "conversations:read"
      },
      "post": {
        "tags": [
          "Conversations"
        ],
        "summary": "Send Support Message",
        "operationId": "send-support-message",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "conversation_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Conversation Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SupportMessageCreate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SupportMessageResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "description": "**Required scope:** `conversations:write`",
        "x-luso8-scope": "conversations:write"
      }
    },
    "/api/v1/tickets": {
      "get": {
        "tags": [
          "Tickets"
        ],
        "summary": "List Tickets",
        "operationId": "list-tickets",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          },
          {
            "name": "priority",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "Priority"
            }
          },
          {
            "name": "assigned_to",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "User id, or 'unassigned'",
              "title": "Assigned To"
            },
            "description": "User id, or 'unassigned'"
          },
          {
            "name": "contact_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Contact Id"
            }
          },
          {
            "name": "conversation_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Conversation Id"
            }
          },
          {
            "name": "support_conversation_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Support Conversation Id"
            }
          },
          {
            "name": "category",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Category"
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Search"
            }
          },
          {
            "name": "skip",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0,
              "title": "Skip"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 200,
              "minimum": 1,
              "default": 50,
              "title": "Limit"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TicketListResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "description": "**Required scope:** `tickets:read`",
        "x-luso8-scope": "tickets:read"
      },
      "post": {
        "tags": [
          "Tickets"
        ],
        "summary": "Create Ticket",
        "operationId": "create-ticket",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TicketCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TicketResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "description": "**Required scope:** `tickets:write`",
        "x-luso8-scope": "tickets:write"
      }
    },
    "/api/v1/tickets/categories": {
      "get": {
        "tags": [
          "Tickets"
        ],
        "summary": "List Categories",
        "description": "Categories already used in the org (most used first) followed by the defaults.\n\n**Required scope:** `tickets:read`",
        "operationId": "list-categories",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TicketCategoriesResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "x-luso8-scope": "tickets:read"
      }
    },
    "/api/v1/tickets/{ticket_id}": {
      "get": {
        "tags": [
          "Tickets"
        ],
        "summary": "Get Ticket",
        "operationId": "get-ticket",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "ticket_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Ticket Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TicketResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "description": "**Required scope:** `tickets:read`",
        "x-luso8-scope": "tickets:read"
      },
      "put": {
        "tags": [
          "Tickets"
        ],
        "summary": "Update Ticket",
        "operationId": "update-ticket",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "ticket_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Ticket Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TicketUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TicketResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "description": "**Required scope:** `tickets:write`",
        "x-luso8-scope": "tickets:write"
      },
      "delete": {
        "tags": [
          "Tickets"
        ],
        "summary": "Delete Ticket",
        "operationId": "delete-ticket",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "ticket_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Ticket Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "description": "**Required scope:** `tickets:write`",
        "x-luso8-scope": "tickets:write"
      }
    },
    "/api/v1/tickets/{ticket_id}/comments": {
      "get": {
        "tags": [
          "Tickets"
        ],
        "summary": "List Comments",
        "description": "Comments and system notes, oldest first.\n\n**Required scope:** `tickets:read`",
        "operationId": "list-comments",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "ticket_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Ticket Id"
            }
          },
          {
            "name": "skip",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0,
              "title": "Skip"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 500,
              "minimum": 1,
              "default": 200,
              "title": "Limit"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/TicketMessageResponse"
                  },
                  "title": "Response List Comments Api V1 Tickets  Ticket Id  Comments Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "x-luso8-scope": "tickets:read"
      },
      "post": {
        "tags": [
          "Tickets"
        ],
        "summary": "Add Comment",
        "operationId": "add-comment",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "ticket_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Ticket Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TicketCommentCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TicketMessageResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "description": "**Required scope:** `tickets:write`",
        "x-luso8-scope": "tickets:write"
      }
    },
    "/api/v1/voice-agents": {
      "get": {
        "tags": [
          "Agents"
        ],
        "summary": "List Voice Agents",
        "description": "List voice agents for the current organization.\n\n**Required scope:** `agents:read`",
        "operationId": "list-voice-agents",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "skip",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0,
              "title": "Skip"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 200,
              "minimum": 1,
              "default": 100,
              "title": "Limit"
            }
          },
          {
            "name": "active_only",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false,
              "title": "Active Only"
            }
          },
          {
            "name": "kind",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^(standard|sales_coach|all)$"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Kind of the parent agent: standard (default), sales_coach, or all",
              "title": "Kind"
            },
            "description": "Kind of the parent agent: standard (default), sales_coach, or all"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/VoiceAgentResponse"
                  },
                  "title": "Response List Voice Agents Api V1 Voice Agents Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "x-luso8-scope": "agents:read"
      },
      "post": {
        "tags": [
          "Agents"
        ],
        "summary": "Create Voice Agent",
        "description": "Create a new voice agent linked to an existing agent.\n\n**Required scope:** `agents:write`",
        "operationId": "create-voice-agent",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VoiceAgentCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VoiceAgentResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "x-luso8-scope": "agents:write"
      }
    },
    "/api/v1/voice-agents/{voice_agent_id}": {
      "get": {
        "tags": [
          "Agents"
        ],
        "summary": "Get Voice Agent",
        "description": "Get a voice agent by ID.\n\n**Required scope:** `agents:read`",
        "operationId": "get-voice-agent",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "voice_agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Voice Agent Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VoiceAgentResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "x-luso8-scope": "agents:read"
      },
      "put": {
        "tags": [
          "Agents"
        ],
        "summary": "Update Voice Agent",
        "description": "Update a voice agent.\n\n**Required scope:** `agents:write`",
        "operationId": "update-voice-agent",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "voice_agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Voice Agent Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VoiceAgentUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VoiceAgentResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "x-luso8-scope": "agents:write"
      },
      "delete": {
        "tags": [
          "Agents"
        ],
        "summary": "Delete Voice Agent",
        "description": "Delete a voice agent.\n\n**Required scope:** `agents:write`",
        "operationId": "delete-voice-agent",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "voice_agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Voice Agent Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "x-luso8-scope": "agents:write"
      }
    },
    "/api/v1/voice-calls/logs": {
      "get": {
        "tags": [
          "Calls"
        ],
        "summary": "List Call Logs",
        "description": "List call logs for the organization with optional filters.\n\n**Required scope:** `calls:read`",
        "operationId": "list-call-logs",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "voice_agent_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Voice Agent Id"
            }
          },
          {
            "name": "caller_type",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Caller Type"
            }
          },
          {
            "name": "disposition",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Disposition"
            }
          },
          {
            "name": "campaign_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Campaign Id"
            }
          },
          {
            "name": "contact_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only calls with this contact",
              "title": "Contact Id"
            },
            "description": "Only calls with this contact"
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          },
          {
            "name": "date_from",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Date From"
            }
          },
          {
            "name": "date_to",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Date To"
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Search"
            }
          },
          {
            "name": "source",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by extra_data->>'source' (e.g. 'sales_coach', 'dialer').",
              "title": "Source"
            },
            "description": "Filter by extra_data->>'source' (e.g. 'sales_coach', 'dialer')."
          },
          {
            "name": "exclude_source",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Drop logs tagged with this extra_data->>'source'. Defaults to 'sales_coach' so practice calls stay out of call-center views; pass an empty string to include everything. Ignored when 'source' is given.",
              "default": "sales_coach",
              "title": "Exclude Source"
            },
            "description": "Drop logs tagged with this extra_data->>'source'. Defaults to 'sales_coach' so practice calls stay out of call-center views; pass an empty string to include everything. Ignored when 'source' is given."
          },
          {
            "name": "user_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only logs practised by this user id; 'me' = the caller.",
              "title": "User Id"
            },
            "description": "Only logs practised by this user id; 'me' = the caller."
          },
          {
            "name": "skip",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0,
              "title": "Skip"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 200,
              "minimum": 1,
              "default": 50,
              "title": "Limit"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CallLogListWithWrapup"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "x-luso8-scope": "calls:read"
      }
    },
    "/api/v1/voice-calls/logs/{call_log_id}": {
      "get": {
        "tags": [
          "Calls"
        ],
        "summary": "Get Call Log",
        "description": "Get a specific call log.\n\n**Required scope:** `calls:read`",
        "operationId": "get-call-log",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "call_log_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Call Log Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CallLogWithWrapup"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "x-luso8-scope": "calls:read"
      },
      "patch": {
        "tags": [
          "Calls"
        ],
        "summary": "Update Call Log",
        "description": "Update a call log entry.\n\n**Required scope:** `calls:write`",
        "operationId": "update-call-log",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "call_log_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Call Log Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CallLogUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CallLogWithWrapup"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "x-luso8-scope": "calls:write"
      }
    },
    "/api/v1/voice-calls/logs/{call_log_id}/recording-url": {
      "get": {
        "tags": [
          "Calls"
        ],
        "summary": "Get Call Log Recording Url",
        "description": "**Required scope:** `calls:read`",
        "operationId": "get-call-log-recording-url",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "call_log_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Call Log Id"
            }
          },
          {
            "name": "expiry_seconds",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 86400,
              "minimum": 60,
              "default": 3600,
              "title": "Expiry Seconds"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "x-luso8-scope": "calls:read"
      }
    },
    "/api/v1/voice-calls/performance": {
      "get": {
        "tags": [
          "Calls"
        ],
        "summary": "Get Performance Stats",
        "description": "Get call performance statistics and KPIs (practice calls excluded).\n\n**Required scope:** `calls:read`",
        "operationId": "get-performance-stats",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "voice_agent_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Voice Agent Id"
            }
          },
          {
            "name": "date_from",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Date From"
            }
          },
          {
            "name": "date_to",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Date To"
            }
          },
          {
            "name": "exclude_source",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Drop logs tagged with this extra_data->>'source' from the KPIs. Defaults to 'sales_coach'; pass an empty string to include all.",
              "default": "sales_coach",
              "title": "Exclude Source"
            },
            "description": "Drop logs tagged with this extra_data->>'source' from the KPIs. Defaults to 'sales_coach'; pass an empty string to include all."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PerformanceStatsWithMix"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "x-luso8-scope": "calls:read"
      }
    },
    "/api/v1/voice-calls/scheduled": {
      "get": {
        "tags": [
          "Calls"
        ],
        "summary": "List Scheduled Calls",
        "description": "List scheduled calls for the organization.\n\n**Required scope:** `calls:read`",
        "operationId": "list-scheduled-calls",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "voice_agent_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Voice Agent Id"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "pending | in_progress | completed | failed | cancelled",
              "title": "Status"
            },
            "description": "pending | in_progress | completed | failed | cancelled"
          },
          {
            "name": "skip",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0,
              "title": "Skip"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 200,
              "minimum": 1,
              "default": 50,
              "title": "Limit"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScheduledCallListResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "x-luso8-scope": "calls:read"
      },
      "post": {
        "tags": [
          "Calls"
        ],
        "summary": "Create Scheduled Call",
        "description": "Schedule an outbound call.\n\n**Required scope:** `calls:write`",
        "operationId": "create-scheduled-call",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ScheduledCallCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScheduledCallResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "x-luso8-scope": "calls:write"
      }
    },
    "/api/v1/voice-calls/scheduled/{call_id}": {
      "get": {
        "tags": [
          "Calls"
        ],
        "summary": "Get Scheduled Call",
        "description": "Get a specific scheduled call.\n\n**Required scope:** `calls:read`",
        "operationId": "get-scheduled-call",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "call_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Call Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScheduledCallResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "x-luso8-scope": "calls:read"
      },
      "patch": {
        "tags": [
          "Calls"
        ],
        "summary": "Update Scheduled Call",
        "description": "Update a scheduled call (status, error_message, etc.).\n\n**Required scope:** `calls:write`",
        "operationId": "update-scheduled-call",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "call_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Call Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ScheduledCallUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScheduledCallResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "x-luso8-scope": "calls:write"
      },
      "delete": {
        "tags": [
          "Calls"
        ],
        "summary": "Delete Scheduled Call",
        "description": "Delete a scheduled call.\n\n**Required scope:** `calls:write`",
        "operationId": "delete-scheduled-call",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "call_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Call Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "x-luso8-scope": "calls:write"
      }
    },
    "/api/v1/voice-calls/scheduled/{call_id}/cancel": {
      "post": {
        "tags": [
          "Calls"
        ],
        "summary": "Cancel Scheduled Call",
        "description": "Cancel a pending scheduled call.\n\n**Required scope:** `calls:write`",
        "operationId": "cancel-scheduled-call",
        "security": [
          {
            "bearerApiKey": []
          },
          {
            "headerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "call_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Call Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScheduledCallResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key is valid but lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Missing scope: contacts:write"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                },
                "example": {
                  "detail": "Rate limit exceeded"
                }
              }
            }
          }
        },
        "x-luso8-scope": "calls:write"
      }
    }
  },
  "components": {
    "schemas": {
      "AIWorkflowCreate": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "icon": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Icon"
          },
          "color": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Color"
          },
          "category": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Category"
          },
          "tags": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tags"
          },
          "trigger_type": {
            "$ref": "#/components/schemas/WorkflowTriggerType",
            "default": "manual"
          },
          "trigger_config": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Trigger Config"
          },
          "input_schema": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Input Schema"
          },
          "variables": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Variables"
          },
          "max_retries": {
            "type": "integer",
            "title": "Max Retries",
            "default": 2
          },
          "timeout_seconds": {
            "type": "integer",
            "title": "Timeout Seconds",
            "default": 3600
          },
          "steps": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/AIWorkflowStepCreate"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Steps"
          },
          "owner_user_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Owner User Id"
          }
        },
        "type": "object",
        "required": [
          "name"
        ],
        "title": "AIWorkflowCreate"
      },
      "AIWorkflowDetailResponse": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "icon": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Icon"
          },
          "color": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Color"
          },
          "category": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Category"
          },
          "tags": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tags"
          },
          "trigger_type": {
            "$ref": "#/components/schemas/WorkflowTriggerType",
            "default": "manual"
          },
          "trigger_config": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Trigger Config"
          },
          "input_schema": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Input Schema"
          },
          "variables": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Variables"
          },
          "max_retries": {
            "type": "integer",
            "title": "Max Retries",
            "default": 2
          },
          "timeout_seconds": {
            "type": "integer",
            "title": "Timeout Seconds",
            "default": 3600
          },
          "id": {
            "type": "string",
            "title": "Id"
          },
          "organization_id": {
            "type": "string",
            "title": "Organization Id"
          },
          "created_by": {
            "type": "string",
            "title": "Created By"
          },
          "status": {
            "$ref": "#/components/schemas/WorkflowStatus",
            "default": "draft"
          },
          "is_template": {
            "type": "boolean",
            "title": "Is Template",
            "default": false
          },
          "is_public": {
            "type": "boolean",
            "title": "Is Public",
            "default": false
          },
          "total_runs": {
            "type": "integer",
            "title": "Total Runs",
            "default": 0
          },
          "successful_runs": {
            "type": "integer",
            "title": "Successful Runs",
            "default": 0
          },
          "failed_runs": {
            "type": "integer",
            "title": "Failed Runs",
            "default": 0
          },
          "avg_duration_seconds": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Avg Duration Seconds"
          },
          "version": {
            "type": "integer",
            "title": "Version",
            "default": 1
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "updated_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          },
          "last_run_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Run At"
          },
          "steps": {
            "items": {
              "$ref": "#/components/schemas/AIWorkflowStepResponse"
            },
            "type": "array",
            "title": "Steps",
            "default": []
          }
        },
        "type": "object",
        "required": [
          "name",
          "id",
          "organization_id",
          "created_by",
          "created_at"
        ],
        "title": "AIWorkflowDetailResponse"
      },
      "AIWorkflowListResponse": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "icon": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Icon"
          },
          "color": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Color"
          },
          "status": {
            "$ref": "#/components/schemas/WorkflowStatus"
          },
          "trigger_type": {
            "$ref": "#/components/schemas/WorkflowTriggerType"
          },
          "category": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Category"
          },
          "tags": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tags"
          },
          "total_runs": {
            "type": "integer",
            "title": "Total Runs",
            "default": 0
          },
          "successful_runs": {
            "type": "integer",
            "title": "Successful Runs",
            "default": 0
          },
          "failed_runs": {
            "type": "integer",
            "title": "Failed Runs",
            "default": 0
          },
          "version": {
            "type": "integer",
            "title": "Version",
            "default": 1
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "last_run_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Run At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "status",
          "trigger_type",
          "created_at"
        ],
        "title": "AIWorkflowListResponse"
      },
      "AIWorkflowResponse": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "icon": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Icon"
          },
          "color": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Color"
          },
          "category": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Category"
          },
          "tags": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tags"
          },
          "trigger_type": {
            "$ref": "#/components/schemas/WorkflowTriggerType",
            "default": "manual"
          },
          "trigger_config": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Trigger Config"
          },
          "input_schema": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Input Schema"
          },
          "variables": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Variables"
          },
          "max_retries": {
            "type": "integer",
            "title": "Max Retries",
            "default": 2
          },
          "timeout_seconds": {
            "type": "integer",
            "title": "Timeout Seconds",
            "default": 3600
          },
          "id": {
            "type": "string",
            "title": "Id"
          },
          "organization_id": {
            "type": "string",
            "title": "Organization Id"
          },
          "created_by": {
            "type": "string",
            "title": "Created By"
          },
          "status": {
            "$ref": "#/components/schemas/WorkflowStatus",
            "default": "draft"
          },
          "is_template": {
            "type": "boolean",
            "title": "Is Template",
            "default": false
          },
          "is_public": {
            "type": "boolean",
            "title": "Is Public",
            "default": false
          },
          "total_runs": {
            "type": "integer",
            "title": "Total Runs",
            "default": 0
          },
          "successful_runs": {
            "type": "integer",
            "title": "Successful Runs",
            "default": 0
          },
          "failed_runs": {
            "type": "integer",
            "title": "Failed Runs",
            "default": 0
          },
          "avg_duration_seconds": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Avg Duration Seconds"
          },
          "version": {
            "type": "integer",
            "title": "Version",
            "default": 1
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "updated_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          },
          "last_run_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Run At"
          }
        },
        "type": "object",
        "required": [
          "name",
          "id",
          "organization_id",
          "created_by",
          "created_at"
        ],
        "title": "AIWorkflowResponse"
      },
      "AIWorkflowRunDetailResponse": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "workflow_id": {
            "type": "string",
            "title": "Workflow Id"
          },
          "organization_id": {
            "type": "string",
            "title": "Organization Id"
          },
          "triggered_by": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Triggered By"
          },
          "status": {
            "$ref": "#/components/schemas/WorkflowRunStatus"
          },
          "trigger_type": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/WorkflowTriggerType"
              },
              {
                "type": "null"
              }
            ]
          },
          "trigger_data": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Trigger Data"
          },
          "input_data": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Input Data"
          },
          "output_data": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Output Data"
          },
          "current_step_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Current Step Id"
          },
          "steps_completed": {
            "type": "integer",
            "title": "Steps Completed",
            "default": 0
          },
          "total_steps": {
            "type": "integer",
            "title": "Total Steps",
            "default": 0
          },
          "error_message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error Message"
          },
          "error_step_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error Step Id"
          },
          "context": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Context"
          },
          "started_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Started At"
          },
          "completed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Completed At"
          },
          "duration_seconds": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Duration Seconds"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "step_runs": {
            "items": {
              "$ref": "#/components/schemas/AIWorkflowRunStepResponse"
            },
            "type": "array",
            "title": "Step Runs",
            "default": []
          }
        },
        "type": "object",
        "required": [
          "id",
          "workflow_id",
          "organization_id",
          "status",
          "created_at"
        ],
        "title": "AIWorkflowRunDetailResponse"
      },
      "AIWorkflowRunResponse": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "workflow_id": {
            "type": "string",
            "title": "Workflow Id"
          },
          "organization_id": {
            "type": "string",
            "title": "Organization Id"
          },
          "triggered_by": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Triggered By"
          },
          "status": {
            "$ref": "#/components/schemas/WorkflowRunStatus"
          },
          "trigger_type": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/WorkflowTriggerType"
              },
              {
                "type": "null"
              }
            ]
          },
          "trigger_data": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Trigger Data"
          },
          "input_data": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Input Data"
          },
          "output_data": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Output Data"
          },
          "current_step_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Current Step Id"
          },
          "steps_completed": {
            "type": "integer",
            "title": "Steps Completed",
            "default": 0
          },
          "total_steps": {
            "type": "integer",
            "title": "Total Steps",
            "default": 0
          },
          "error_message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error Message"
          },
          "error_step_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error Step Id"
          },
          "context": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Context"
          },
          "started_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Started At"
          },
          "completed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Completed At"
          },
          "duration_seconds": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Duration Seconds"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "workflow_id",
          "organization_id",
          "status",
          "created_at"
        ],
        "title": "AIWorkflowRunResponse"
      },
      "AIWorkflowRunStepResponse": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "run_id": {
            "type": "string",
            "title": "Run Id"
          },
          "step_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Step Id"
          },
          "step_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Step Name"
          },
          "step_type": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/WorkflowStepType"
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "$ref": "#/components/schemas/WorkflowRunStepStatus"
          },
          "input_data": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Input Data"
          },
          "output_data": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Output Data"
          },
          "error_message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error Message"
          },
          "retry_count": {
            "type": "integer",
            "title": "Retry Count",
            "default": 0
          },
          "started_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Started At"
          },
          "completed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Completed At"
          },
          "duration_ms": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Duration Ms"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "run_id",
          "status",
          "created_at"
        ],
        "title": "AIWorkflowRunStepResponse"
      },
      "AIWorkflowStepCreate": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "step_type": {
            "$ref": "#/components/schemas/WorkflowStepType"
          },
          "order": {
            "type": "integer",
            "title": "Order"
          },
          "config": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Config"
          },
          "agent_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Agent Id"
          },
          "skill_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Skill Id"
          },
          "connector_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Connector Id"
          },
          "input_mapping": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Input Mapping"
          },
          "output_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Output Key"
          },
          "next_step_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Step Id"
          },
          "true_branch_step_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "True Branch Step Id"
          },
          "false_branch_step_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "False Branch Step Id"
          },
          "is_active": {
            "type": "boolean",
            "title": "Is Active",
            "default": true
          },
          "retry_on_failure": {
            "type": "boolean",
            "title": "Retry On Failure",
            "default": true
          },
          "max_retries": {
            "type": "integer",
            "title": "Max Retries",
            "default": 2
          },
          "timeout_seconds": {
            "type": "integer",
            "title": "Timeout Seconds",
            "default": 300
          }
        },
        "type": "object",
        "required": [
          "name",
          "step_type",
          "order"
        ],
        "title": "AIWorkflowStepCreate"
      },
      "AIWorkflowStepResponse": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "step_type": {
            "$ref": "#/components/schemas/WorkflowStepType"
          },
          "order": {
            "type": "integer",
            "title": "Order"
          },
          "config": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Config"
          },
          "agent_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Agent Id"
          },
          "skill_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Skill Id"
          },
          "connector_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Connector Id"
          },
          "input_mapping": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Input Mapping"
          },
          "output_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Output Key"
          },
          "next_step_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Step Id"
          },
          "true_branch_step_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "True Branch Step Id"
          },
          "false_branch_step_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "False Branch Step Id"
          },
          "is_active": {
            "type": "boolean",
            "title": "Is Active",
            "default": true
          },
          "retry_on_failure": {
            "type": "boolean",
            "title": "Retry On Failure",
            "default": true
          },
          "max_retries": {
            "type": "integer",
            "title": "Max Retries",
            "default": 2
          },
          "timeout_seconds": {
            "type": "integer",
            "title": "Timeout Seconds",
            "default": 300
          },
          "id": {
            "type": "string",
            "title": "Id"
          },
          "workflow_id": {
            "type": "string",
            "title": "Workflow Id"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "updated_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          }
        },
        "type": "object",
        "required": [
          "name",
          "step_type",
          "order",
          "id",
          "workflow_id",
          "created_at"
        ],
        "title": "AIWorkflowStepResponse"
      },
      "AIWorkflowUpdate": {
        "properties": {
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "icon": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Icon"
          },
          "color": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Color"
          },
          "status": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/WorkflowStatus"
              },
              {
                "type": "null"
              }
            ]
          },
          "category": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Category"
          },
          "tags": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tags"
          },
          "trigger_type": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/WorkflowTriggerType"
              },
              {
                "type": "null"
              }
            ]
          },
          "trigger_config": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Trigger Config"
          },
          "input_schema": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Input Schema"
          },
          "variables": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Variables"
          },
          "max_retries": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Retries"
          },
          "timeout_seconds": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Timeout Seconds"
          }
        },
        "type": "object",
        "title": "AIWorkflowUpdate"
      },
      "AIWrapUp": {
        "properties": {
          "summary": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Summary"
          },
          "suggested_disposition": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Suggested Disposition"
          },
          "sentiment": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sentiment"
          },
          "sentiment_score": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sentiment Score"
          },
          "comments": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Comments"
          },
          "generated_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Generated At"
          }
        },
        "additionalProperties": true,
        "type": "object",
        "title": "AIWrapUp",
        "description": "The AI's post-call suggestion stored at ``extra_data[\"ai_wrapup\"]`` (contract C5)."
      },
      "ActivityFeedResponse": {
        "properties": {
          "period": {
            "type": "string",
            "title": "Period"
          },
          "since": {
            "type": "string",
            "format": "date-time",
            "title": "Since"
          },
          "until": {
            "type": "string",
            "format": "date-time",
            "title": "Until"
          },
          "types": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Types"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/ActivityItem"
            },
            "type": "array",
            "title": "Items"
          }
        },
        "type": "object",
        "required": [
          "period",
          "since",
          "until",
          "types",
          "items"
        ],
        "title": "ActivityFeedResponse"
      },
      "ActivityItem": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "type": {
            "type": "string",
            "title": "Type"
          },
          "title": {
            "type": "string",
            "title": "Title"
          },
          "description": {
            "type": "string",
            "title": "Description"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp"
          },
          "color": {
            "type": "string",
            "title": "Color"
          },
          "action_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Action Url"
          }
        },
        "type": "object",
        "required": [
          "id",
          "type",
          "title",
          "description",
          "timestamp",
          "color"
        ],
        "title": "ActivityItem",
        "description": "One event of GET /dashboard/activity. `type` is a stable key from\nACTIVITY_TYPES; `action_url` is an in-app path the row links to."
      },
      "AgentCreate": {
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 255,
            "minLength": 1,
            "title": "Name"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "avatar_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Avatar Url"
          },
          "agent_type": {
            "$ref": "#/components/schemas/app__schemas__agent__AgentType",
            "default": "custom"
          },
          "system_prompt": {
            "type": "string",
            "minLength": 1,
            "title": "System Prompt"
          },
          "welcome_message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Welcome Message"
          },
          "fallback_message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Fallback Message"
          },
          "task_description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Task Description"
          },
          "goals": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Goals"
          },
          "constraints": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Constraints"
          },
          "llm_provider": {
            "$ref": "#/components/schemas/LLMProvider",
            "default": "openai"
          },
          "llm_model": {
            "type": "string",
            "title": "Llm Model",
            "default": "gpt-4o"
          },
          "temperature": {
            "type": "integer",
            "maximum": 100.0,
            "minimum": 0.0,
            "title": "Temperature",
            "default": 70
          },
          "max_tokens": {
            "type": "integer",
            "maximum": 128000.0,
            "minimum": 1.0,
            "title": "Max Tokens",
            "default": 4096
          },
          "voice_enabled": {
            "type": "boolean",
            "title": "Voice Enabled",
            "default": false
          },
          "voice_provider": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/VoiceProvider"
              },
              {
                "type": "null"
              }
            ]
          },
          "voice_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Voice Id"
          },
          "voice_settings": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Voice Settings"
          },
          "stt_enabled": {
            "type": "boolean",
            "title": "Stt Enabled",
            "default": false
          },
          "stt_provider": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Stt Provider"
          },
          "stt_language": {
            "type": "string",
            "title": "Stt Language",
            "default": "en"
          },
          "tools": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/AgentTool"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tools"
          },
          "knowledge_base_ids": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Knowledge Base Ids"
          },
          "knowledge_folder_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "title": "Knowledge Folder Id"
          },
          "webhook_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Webhook Url"
          },
          "is_template": {
            "type": "boolean",
            "title": "Is Template",
            "default": false
          },
          "template_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Template Id"
          },
          "template_category": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Template Category"
          },
          "extra_data": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Extra Data"
          },
          "tags": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tags"
          },
          "agent_kind": {
            "type": "string",
            "enum": [
              "standard",
              "sales_coach"
            ],
            "title": "Agent Kind",
            "default": "standard"
          }
        },
        "type": "object",
        "required": [
          "name",
          "system_prompt"
        ],
        "title": "AgentCreate",
        "description": "Schema for creating a new agent"
      },
      "AgentListResponse": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "avatar_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Avatar Url"
          },
          "agent_type": {
            "$ref": "#/components/schemas/app__schemas__agent__AgentType"
          },
          "agent_kind": {
            "type": "string",
            "title": "Agent Kind",
            "default": "standard"
          },
          "status": {
            "$ref": "#/components/schemas/app__schemas__agent__AgentStatus"
          },
          "voice_enabled": {
            "type": "boolean",
            "title": "Voice Enabled",
            "default": false
          },
          "is_template": {
            "type": "boolean",
            "title": "Is Template",
            "default": false
          },
          "template_category": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Template Category"
          },
          "total_conversations": {
            "type": "integer",
            "title": "Total Conversations",
            "default": 0
          },
          "knowledge_folder_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "title": "Knowledge Folder Id"
          },
          "has_knowledge_base": {
            "type": "boolean",
            "title": "Has Knowledge Base",
            "default": false
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "updated_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "agent_type",
          "status",
          "created_at"
        ],
        "title": "AgentListResponse",
        "description": "Schema for listing agents"
      },
      "AgentResponse": {
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 255,
            "minLength": 1,
            "title": "Name"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "avatar_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Avatar Url"
          },
          "agent_type": {
            "$ref": "#/components/schemas/app__schemas__agent__AgentType",
            "default": "custom"
          },
          "system_prompt": {
            "type": "string",
            "minLength": 1,
            "title": "System Prompt"
          },
          "welcome_message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Welcome Message"
          },
          "fallback_message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Fallback Message"
          },
          "task_description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Task Description"
          },
          "goals": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Goals"
          },
          "constraints": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Constraints"
          },
          "llm_provider": {
            "$ref": "#/components/schemas/LLMProvider",
            "default": "openai"
          },
          "llm_model": {
            "type": "string",
            "title": "Llm Model",
            "default": "gpt-4o"
          },
          "temperature": {
            "type": "integer",
            "maximum": 100.0,
            "minimum": 0.0,
            "title": "Temperature",
            "default": 70
          },
          "max_tokens": {
            "type": "integer",
            "maximum": 128000.0,
            "minimum": 1.0,
            "title": "Max Tokens",
            "default": 4096
          },
          "voice_enabled": {
            "type": "boolean",
            "title": "Voice Enabled",
            "default": false
          },
          "voice_provider": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/VoiceProvider"
              },
              {
                "type": "null"
              }
            ]
          },
          "voice_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Voice Id"
          },
          "voice_settings": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Voice Settings"
          },
          "stt_enabled": {
            "type": "boolean",
            "title": "Stt Enabled",
            "default": false
          },
          "stt_provider": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Stt Provider"
          },
          "stt_language": {
            "type": "string",
            "title": "Stt Language",
            "default": "en"
          },
          "tools": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/AgentTool"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tools"
          },
          "knowledge_base_ids": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Knowledge Base Ids"
          },
          "knowledge_folder_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "title": "Knowledge Folder Id"
          },
          "webhook_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Webhook Url"
          },
          "is_template": {
            "type": "boolean",
            "title": "Is Template",
            "default": false
          },
          "template_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Template Id"
          },
          "template_category": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Template Category"
          },
          "extra_data": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Extra Data"
          },
          "tags": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tags"
          },
          "id": {
            "type": "string",
            "title": "Id"
          },
          "organization_id": {
            "type": "string",
            "title": "Organization Id"
          },
          "created_by": {
            "type": "string",
            "title": "Created By"
          },
          "status": {
            "$ref": "#/components/schemas/app__schemas__agent__AgentStatus",
            "default": "draft"
          },
          "agent_kind": {
            "type": "string",
            "title": "Agent Kind",
            "default": "standard"
          },
          "total_conversations": {
            "type": "integer",
            "title": "Total Conversations",
            "default": 0
          },
          "total_messages": {
            "type": "integer",
            "title": "Total Messages",
            "default": 0
          },
          "avg_response_time": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Avg Response Time"
          },
          "knowledge_folder": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/KnowledgeFolderSummary"
              },
              {
                "type": "null"
              }
            ]
          },
          "skills": {
            "items": {
              "$ref": "#/components/schemas/AgentSkillSummary"
            },
            "type": "array",
            "title": "Skills",
            "default": []
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "updated_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          },
          "last_active_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Active At"
          }
        },
        "type": "object",
        "required": [
          "name",
          "system_prompt",
          "id",
          "organization_id",
          "created_by",
          "created_at"
        ],
        "title": "AgentResponse",
        "description": "Schema for agent response"
      },
      "AgentSkillSummary": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "skill_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Skill Type"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          }
        },
        "type": "object",
        "required": [
          "id",
          "name"
        ],
        "title": "AgentSkillSummary",
        "description": "Lightweight view of a skill assigned to an agent - surfaced inline on\nthe agent response so the UI doesn't need a second roundtrip to render\n\"skills the agent can use\"."
      },
      "AgentTool": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "description": {
            "type": "string",
            "title": "Description"
          },
          "enabled": {
            "type": "boolean",
            "title": "Enabled",
            "default": true
          },
          "parameters": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parameters"
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "description"
        ],
        "title": "AgentTool",
        "description": "Tool/function that the agent can use"
      },
      "AgentUpdate": {
        "properties": {
          "name": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 255,
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "avatar_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Avatar Url"
          },
          "agent_type": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/app__schemas__agent__AgentType"
              },
              {
                "type": "null"
              }
            ]
          },
          "agent_kind": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "standard",
                  "sales_coach"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Agent Kind"
          },
          "status": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/app__schemas__agent__AgentStatus"
              },
              {
                "type": "null"
              }
            ]
          },
          "system_prompt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "System Prompt"
          },
          "welcome_message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Welcome Message"
          },
          "fallback_message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Fallback Message"
          },
          "task_description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Task Description"
          },
          "goals": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Goals"
          },
          "constraints": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Constraints"
          },
          "llm_provider": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/LLMProvider"
              },
              {
                "type": "null"
              }
            ]
          },
          "llm_model": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Llm Model"
          },
          "temperature": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 100.0,
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Temperature"
          },
          "max_tokens": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 128000.0,
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Tokens"
          },
          "voice_enabled": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Voice Enabled"
          },
          "voice_provider": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/VoiceProvider"
              },
              {
                "type": "null"
              }
            ]
          },
          "voice_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Voice Id"
          },
          "voice_settings": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Voice Settings"
          },
          "stt_enabled": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Stt Enabled"
          },
          "stt_provider": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Stt Provider"
          },
          "stt_language": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Stt Language"
          },
          "tools": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/AgentTool"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tools"
          },
          "knowledge_base_ids": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Knowledge Base Ids"
          },
          "knowledge_folder_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "title": "Knowledge Folder Id"
          },
          "webhook_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Webhook Url"
          },
          "is_template": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Is Template"
          },
          "template_category": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Template Category"
          },
          "extra_data": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Extra Data"
          },
          "tags": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tags"
          }
        },
        "type": "object",
        "title": "AgentUpdate",
        "description": "Schema for updating an agent"
      },
      "AppointmentCreate": {
        "properties": {
          "title": {
            "type": "string",
            "maxLength": 500,
            "minLength": 1,
            "title": "Title"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "location": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 500
              },
              {
                "type": "null"
              }
            ],
            "title": "Location"
          },
          "meeting_link": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 1000
              },
              {
                "type": "null"
              }
            ],
            "title": "Meeting Link"
          },
          "booking_kind": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 50
              },
              {
                "type": "null"
              }
            ],
            "title": "Booking Kind",
            "default": "meeting"
          },
          "location_type": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^(none|link|in_person|phone|custom)$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Location Type"
          },
          "start_time": {
            "type": "string",
            "format": "date-time",
            "title": "Start Time"
          },
          "end_time": {
            "type": "string",
            "format": "date-time",
            "title": "End Time"
          },
          "timezone": {
            "type": "string",
            "maxLength": 100,
            "title": "Timezone",
            "default": "UTC"
          },
          "all_day": {
            "type": "boolean",
            "title": "All Day",
            "default": false
          },
          "appointment_type": {
            "$ref": "#/components/schemas/AppointmentType",
            "default": "one_on_one"
          },
          "status": {
            "$ref": "#/components/schemas/AppointmentStatus",
            "default": "scheduled"
          },
          "recurrence": {
            "$ref": "#/components/schemas/RecurrenceRule",
            "default": "none"
          },
          "recurrence_end_date": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Recurrence End Date"
          },
          "participants": {
            "items": {
              "$ref": "#/components/schemas/ParticipantSchema"
            },
            "type": "array",
            "title": "Participants",
            "default": []
          },
          "contact_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Contact Id"
          },
          "reminders": {
            "items": {
              "$ref": "#/components/schemas/ReminderSchema"
            },
            "type": "array",
            "title": "Reminders",
            "default": []
          },
          "color": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 20
              },
              {
                "type": "null"
              }
            ],
            "title": "Color"
          },
          "notes": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Notes"
          },
          "metadata": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Metadata"
          },
          "notify_contact": {
            "type": "boolean",
            "title": "Notify Contact",
            "default": false
          },
          "source": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 32
              },
              {
                "type": "null"
              }
            ],
            "title": "Source"
          },
          "engage_conversation_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Engage Conversation Id"
          },
          "acting_user_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Acting User Id"
          },
          "agent_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Agent Id"
          }
        },
        "type": "object",
        "required": [
          "title",
          "start_time",
          "end_time"
        ],
        "title": "AppointmentCreate"
      },
      "AppointmentListResponse": {
        "properties": {
          "appointments": {
            "items": {
              "$ref": "#/components/schemas/AppointmentResponse"
            },
            "type": "array",
            "title": "Appointments"
          },
          "total": {
            "type": "integer",
            "title": "Total"
          }
        },
        "type": "object",
        "required": [
          "appointments",
          "total"
        ],
        "title": "AppointmentListResponse"
      },
      "AppointmentResponse": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "organization_id": {
            "type": "string",
            "title": "Organization Id"
          },
          "created_by": {
            "type": "string",
            "title": "Created By"
          },
          "title": {
            "type": "string",
            "title": "Title"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "location": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Location"
          },
          "meeting_link": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meeting Link"
          },
          "booking_kind": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Booking Kind",
            "default": "meeting"
          },
          "location_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Location Type"
          },
          "start_time": {
            "type": "string",
            "format": "date-time",
            "title": "Start Time"
          },
          "end_time": {
            "type": "string",
            "format": "date-time",
            "title": "End Time"
          },
          "timezone": {
            "type": "string",
            "title": "Timezone"
          },
          "all_day": {
            "type": "boolean",
            "title": "All Day"
          },
          "appointment_type": {
            "$ref": "#/components/schemas/AppointmentType"
          },
          "status": {
            "$ref": "#/components/schemas/AppointmentStatus"
          },
          "recurrence": {
            "$ref": "#/components/schemas/RecurrenceRule"
          },
          "recurrence_end_date": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Recurrence End Date"
          },
          "parent_appointment_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parent Appointment Id"
          },
          "participants": {
            "items": {
              "$ref": "#/components/schemas/ParticipantSchema"
            },
            "type": "array",
            "title": "Participants",
            "default": []
          },
          "contact_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Contact Id"
          },
          "contact_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Contact Name"
          },
          "source": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source"
          },
          "engage_conversation_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Engage Conversation Id"
          },
          "external_calendar_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Calendar Id"
          },
          "external_event_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Event Id"
          },
          "synced_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Synced At"
          },
          "reminders": {
            "items": {
              "$ref": "#/components/schemas/ReminderSchema"
            },
            "type": "array",
            "title": "Reminders",
            "default": []
          },
          "color": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Color"
          },
          "notes": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Notes"
          },
          "created_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          },
          "updated_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          },
          "notification": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Notification"
          }
        },
        "type": "object",
        "required": [
          "id",
          "organization_id",
          "created_by",
          "title",
          "start_time",
          "end_time",
          "timezone",
          "all_day",
          "appointment_type",
          "status",
          "recurrence"
        ],
        "title": "AppointmentResponse"
      },
      "AppointmentStatus": {
        "type": "string",
        "enum": [
          "scheduled",
          "confirmed",
          "cancelled",
          "completed",
          "no_show",
          "rescheduled"
        ],
        "title": "AppointmentStatus"
      },
      "AppointmentType": {
        "type": "string",
        "enum": [
          "one_on_one",
          "group",
          "team",
          "webinar",
          "phone_call",
          "in_person"
        ],
        "title": "AppointmentType"
      },
      "AppointmentUpdate": {
        "properties": {
          "title": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 500
              },
              {
                "type": "null"
              }
            ],
            "title": "Title"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "location": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 500
              },
              {
                "type": "null"
              }
            ],
            "title": "Location"
          },
          "meeting_link": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 1000
              },
              {
                "type": "null"
              }
            ],
            "title": "Meeting Link"
          },
          "booking_kind": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 50
              },
              {
                "type": "null"
              }
            ],
            "title": "Booking Kind"
          },
          "location_type": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^(none|link|in_person|phone|custom)$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Location Type"
          },
          "start_time": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Start Time"
          },
          "end_time": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "End Time"
          },
          "timezone": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 100
              },
              {
                "type": "null"
              }
            ],
            "title": "Timezone"
          },
          "all_day": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "All Day"
          },
          "appointment_type": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AppointmentType"
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AppointmentStatus"
              },
              {
                "type": "null"
              }
            ]
          },
          "recurrence": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RecurrenceRule"
              },
              {
                "type": "null"
              }
            ]
          },
          "recurrence_end_date": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Recurrence End Date"
          },
          "participants": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/ParticipantSchema"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Participants"
          },
          "contact_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Contact Id"
          },
          "reminders": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/ReminderSchema"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reminders"
          },
          "color": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 20
              },
              {
                "type": "null"
              }
            ],
            "title": "Color"
          },
          "notes": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Notes"
          },
          "metadata": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Metadata"
          }
        },
        "type": "object",
        "title": "AppointmentUpdate"
      },
      "Body_upload_document_api_v1_knowledge_folders__folder_id__documents_upload_post": {
        "properties": {
          "file": {
            "type": "string",
            "format": "binary",
            "title": "File"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          }
        },
        "type": "object",
        "required": [
          "file"
        ],
        "title": "Body_upload_document_api_v1_knowledge_folders__folder_id__documents_upload_post"
      },
      "BulkAddFromListRequest": {
        "properties": {
          "list_ids": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "List Ids"
          },
          "exclude_contact_ids": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Exclude Contact Ids"
          }
        },
        "type": "object",
        "required": [
          "list_ids"
        ],
        "title": "BulkAddFromListRequest",
        "description": "Request to add contacts from lists"
      },
      "CallDirection": {
        "type": "string",
        "enum": [
          "inbound",
          "outbound",
          "internal"
        ],
        "title": "CallDirection"
      },
      "CallDisposition": {
        "type": "string",
        "enum": [
          "booked",
          "callback",
          "not_interested",
          "dnc",
          "not_icp",
          "has_solution",
          "gatekeeper",
          "wrong_number",
          "left_org",
          "voicemail",
          "hangup",
          "no_voice",
          "dial_tree",
          "answering_machine"
        ],
        "title": "CallDisposition"
      },
      "CallLogListWithWrapup": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/CallLogWithWrapup"
            },
            "type": "array",
            "title": "Items"
          },
          "total": {
            "type": "integer",
            "title": "Total"
          }
        },
        "type": "object",
        "required": [
          "items",
          "total"
        ],
        "title": "CallLogListWithWrapup"
      },
      "CallLogUpdate": {
        "properties": {
          "status": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CallStatus"
              },
              {
                "type": "null"
              }
            ]
          },
          "duration_seconds": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Duration Seconds"
          },
          "started_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Started At"
          },
          "ended_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ended At"
          },
          "recording_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Recording Url"
          },
          "transcript": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Transcript"
          },
          "summary": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Summary"
          },
          "sentiment": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sentiment"
          },
          "cost": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cost"
          },
          "end_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "End Reason"
          },
          "extra_data": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Extra Data"
          },
          "disposition": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CallDisposition"
              },
              {
                "type": "null"
              }
            ]
          },
          "notes": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Notes"
          },
          "caller_type": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CallerType"
              },
              {
                "type": "null"
              }
            ]
          },
          "contact_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Contact Id"
          },
          "campaign_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Campaign Id"
          },
          "quality_score": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Quality Score"
          }
        },
        "type": "object",
        "title": "CallLogUpdate"
      },
      "CallLogWithWrapup": {
        "properties": {
          "call_type": {
            "$ref": "#/components/schemas/CallType"
          },
          "phone_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Phone Number"
          },
          "caller_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Caller Name"
          },
          "id": {
            "type": "string",
            "title": "Id"
          },
          "voice_agent_id": {
            "type": "string",
            "title": "Voice Agent Id"
          },
          "organization_id": {
            "type": "string",
            "title": "Organization Id"
          },
          "status": {
            "$ref": "#/components/schemas/CallStatus"
          },
          "duration_seconds": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Duration Seconds"
          },
          "started_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Started At"
          },
          "ended_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ended At"
          },
          "room_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Room Name"
          },
          "recording_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Recording Url"
          },
          "transcript": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Transcript"
          },
          "summary": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Summary"
          },
          "sentiment": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sentiment"
          },
          "cost": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cost"
          },
          "end_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "End Reason"
          },
          "extra_data": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Extra Data"
          },
          "disposition": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Disposition"
          },
          "notes": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Notes"
          },
          "caller_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Caller Type"
          },
          "contact_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Contact Id"
          },
          "campaign_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Campaign Id"
          },
          "quality_score": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Quality Score"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "updated_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          },
          "ai_wrapup": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ai Wrapup"
          }
        },
        "type": "object",
        "required": [
          "call_type",
          "id",
          "voice_agent_id",
          "organization_id",
          "status",
          "created_at"
        ],
        "title": "CallLogWithWrapup",
        "description": "Call log as returned by this API: the stored row plus ``ai_wrapup``\n(summary, suggested disposition, sentiment, comments) lifted out of\n``extra_data`` so clients do not have to dig for it."
      },
      "CallSessionResponse": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "call_center_id": {
            "type": "string",
            "title": "Call Center Id"
          },
          "organization_id": {
            "type": "string",
            "title": "Organization Id"
          },
          "direction": {
            "$ref": "#/components/schemas/CallDirection"
          },
          "status": {
            "$ref": "#/components/schemas/CallSessionStatus"
          },
          "queue_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Queue Id"
          },
          "caller_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Caller Number"
          },
          "caller_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Caller Name"
          },
          "caller_contact_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Caller Contact Id"
          },
          "agent_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Agent Id"
          },
          "transferred_from_agent_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Transferred From Agent Id"
          },
          "handler_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Handler Type"
          },
          "voice_agent_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Voice Agent Id"
          },
          "queued_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Queued At"
          },
          "answered_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Answered At"
          },
          "ended_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ended At"
          },
          "wrap_up_started_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Wrap Up Started At"
          },
          "wrap_up_ended_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Wrap Up Ended At"
          },
          "queue_wait_seconds": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Queue Wait Seconds"
          },
          "talk_time_seconds": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Talk Time Seconds"
          },
          "hold_time_seconds": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Hold Time Seconds"
          },
          "wrap_up_time_seconds": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Wrap Up Time Seconds"
          },
          "total_handle_time_seconds": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Total Handle Time Seconds"
          },
          "room_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Room Name"
          },
          "room_sid": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Room Sid"
          },
          "sip_call_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sip Call Id"
          },
          "recording_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Recording Url"
          },
          "transcript": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Transcript"
          },
          "summary": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Summary"
          },
          "sentiment": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sentiment"
          },
          "sentiment_score": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sentiment Score"
          },
          "ai_quality_score": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ai Quality Score"
          },
          "disposition_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Disposition Code"
          },
          "is_first_call_resolution": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Is First Call Resolution"
          },
          "is_escalated": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Is Escalated"
          },
          "agent_notes": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Agent Notes"
          },
          "end_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "End Reason"
          },
          "cost": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cost"
          },
          "tags": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tags"
          },
          "extra_data": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Extra Data"
          },
          "ai_wrapup": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AIWrapUp"
              },
              {
                "type": "null"
              }
            ]
          },
          "handoff_history": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "type": "array",
            "title": "Handoff History"
          },
          "agent_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Agent Name"
          },
          "voice_agent_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Voice Agent Name"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "updated_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "call_center_id",
          "organization_id",
          "direction",
          "status",
          "created_at"
        ],
        "title": "CallSessionResponse"
      },
      "CallSessionStatus": {
        "type": "string",
        "enum": [
          "queued",
          "ringing",
          "in_progress",
          "on_hold",
          "transferred",
          "wrap_up",
          "completed",
          "abandoned",
          "failed",
          "voicemail"
        ],
        "title": "CallSessionStatus"
      },
      "CallStatus": {
        "type": "string",
        "enum": [
          "pending",
          "ringing",
          "in_progress",
          "completed",
          "failed",
          "no_answer",
          "cancelled",
          "busy"
        ],
        "title": "CallStatus"
      },
      "CallType": {
        "type": "string",
        "enum": [
          "inbound",
          "outbound",
          "browser"
        ],
        "title": "CallType"
      },
      "CallerType": {
        "type": "string",
        "enum": [
          "human",
          "ai"
        ],
        "title": "CallerType"
      },
      "CallerTypeDisposition": {
        "properties": {
          "caller_type": {
            "type": "string",
            "title": "Caller Type"
          },
          "disposition": {
            "type": "string",
            "title": "Disposition"
          },
          "count": {
            "type": "integer",
            "title": "Count"
          }
        },
        "type": "object",
        "required": [
          "caller_type",
          "disposition",
          "count"
        ],
        "title": "CallerTypeDisposition"
      },
      "CallerTypeStats": {
        "properties": {
          "caller_type": {
            "type": "string",
            "title": "Caller Type"
          },
          "calls": {
            "type": "integer",
            "title": "Calls",
            "default": 0
          },
          "connected_calls": {
            "type": "integer",
            "title": "Connected Calls",
            "default": 0
          },
          "meetings_booked": {
            "type": "integer",
            "title": "Meetings Booked",
            "default": 0
          },
          "total_talk_time_seconds": {
            "type": "number",
            "title": "Total Talk Time Seconds",
            "default": 0
          }
        },
        "type": "object",
        "required": [
          "caller_type"
        ],
        "title": "CallerTypeStats"
      },
      "CampaignActionResponse": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success"
          },
          "message": {
            "type": "string",
            "title": "Message"
          },
          "campaign_id": {
            "type": "string",
            "title": "Campaign Id"
          },
          "affected_contacts": {
            "type": "integer",
            "title": "Affected Contacts",
            "default": 0
          },
          "not_found": {
            "type": "integer",
            "title": "Not Found",
            "default": 0
          },
          "already_enrolled": {
            "type": "integer",
            "title": "Already Enrolled",
            "default": 0
          }
        },
        "type": "object",
        "required": [
          "success",
          "message",
          "campaign_id"
        ],
        "title": "CampaignActionResponse",
        "description": "Response for campaign actions"
      },
      "CampaignAnalytics": {
        "properties": {
          "campaign_id": {
            "type": "string",
            "title": "Campaign Id"
          },
          "total_contacts": {
            "type": "integer",
            "title": "Total Contacts",
            "default": 0
          },
          "contacts_active": {
            "type": "integer",
            "title": "Contacts Active",
            "default": 0
          },
          "contacts_completed": {
            "type": "integer",
            "title": "Contacts Completed",
            "default": 0
          },
          "contacts_failed": {
            "type": "integer",
            "title": "Contacts Failed",
            "default": 0
          },
          "total_sent": {
            "type": "integer",
            "title": "Total Sent",
            "default": 0
          },
          "total_delivered": {
            "type": "integer",
            "title": "Total Delivered",
            "default": 0
          },
          "delivery_rate": {
            "type": "number",
            "title": "Delivery Rate",
            "default": 0.0
          },
          "total_opened": {
            "type": "integer",
            "title": "Total Opened",
            "default": 0
          },
          "open_rate": {
            "type": "number",
            "title": "Open Rate",
            "default": 0.0
          },
          "total_clicked": {
            "type": "integer",
            "title": "Total Clicked",
            "default": 0
          },
          "click_rate": {
            "type": "number",
            "title": "Click Rate",
            "default": 0.0
          },
          "total_replied": {
            "type": "integer",
            "title": "Total Replied",
            "default": 0
          },
          "reply_rate": {
            "type": "number",
            "title": "Reply Rate",
            "default": 0.0
          },
          "total_converted": {
            "type": "integer",
            "title": "Total Converted",
            "default": 0
          },
          "conversion_rate": {
            "type": "number",
            "title": "Conversion Rate",
            "default": 0.0
          },
          "total_conversion_value": {
            "type": "number",
            "title": "Total Conversion Value",
            "default": 0.0
          },
          "total_bounced": {
            "type": "integer",
            "title": "Total Bounced",
            "default": 0
          },
          "bounce_rate": {
            "type": "number",
            "title": "Bounce Rate",
            "default": 0.0
          },
          "total_unsubscribed": {
            "type": "integer",
            "title": "Total Unsubscribed",
            "default": 0
          },
          "unsubscribe_rate": {
            "type": "number",
            "title": "Unsubscribe Rate",
            "default": 0.0
          },
          "channel_stats": {
            "additionalProperties": {
              "additionalProperties": {
                "type": "integer"
              },
              "type": "object"
            },
            "type": "object",
            "title": "Channel Stats",
            "default": {}
          },
          "step_stats": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "type": "array",
            "title": "Step Stats",
            "default": []
          },
          "daily_stats": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "type": "array",
            "title": "Daily Stats",
            "default": []
          }
        },
        "type": "object",
        "required": [
          "campaign_id"
        ],
        "title": "CampaignAnalytics",
        "description": "Campaign analytics summary"
      },
      "CampaignContactCreate": {
        "properties": {
          "contact_id": {
            "type": "string",
            "title": "Contact Id"
          },
          "personalization_data": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Personalization Data"
          }
        },
        "type": "object",
        "required": [
          "contact_id"
        ],
        "title": "CampaignContactCreate",
        "description": "Schema for adding a contact to a campaign"
      },
      "CampaignContactRef": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "first_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "First Name"
          },
          "last_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Name"
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "phone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Phone"
          },
          "job_title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Job Title"
          },
          "company": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Company"
          }
        },
        "type": "object",
        "required": [
          "id"
        ],
        "title": "CampaignContactRef",
        "description": "Lightweight contact shape for embedding in campaign-contact responses."
      },
      "CampaignContactResponse": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "campaign_id": {
            "type": "string",
            "title": "Campaign Id"
          },
          "contact_id": {
            "type": "string",
            "title": "Contact Id"
          },
          "contact": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CampaignContactRef"
              },
              {
                "type": "null"
              }
            ]
          },
          "current_step_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Current Step Id"
          },
          "status": {
            "$ref": "#/components/schemas/ExecutionStatus",
            "default": "pending"
          },
          "steps_completed": {
            "type": "integer",
            "title": "Steps Completed",
            "default": 0
          },
          "last_step_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Step At"
          },
          "next_step_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Step At"
          },
          "emails_sent": {
            "type": "integer",
            "title": "Emails Sent",
            "default": 0
          },
          "emails_opened": {
            "type": "integer",
            "title": "Emails Opened",
            "default": 0
          },
          "emails_clicked": {
            "type": "integer",
            "title": "Emails Clicked",
            "default": 0
          },
          "sms_sent": {
            "type": "integer",
            "title": "Sms Sent",
            "default": 0
          },
          "sms_replied": {
            "type": "integer",
            "title": "Sms Replied",
            "default": 0
          },
          "calls_made": {
            "type": "integer",
            "title": "Calls Made",
            "default": 0
          },
          "calls_answered": {
            "type": "integer",
            "title": "Calls Answered",
            "default": 0
          },
          "messages_sent": {
            "type": "integer",
            "title": "Messages Sent",
            "default": 0
          },
          "messages_replied": {
            "type": "integer",
            "title": "Messages Replied",
            "default": 0
          },
          "is_converted": {
            "type": "boolean",
            "title": "Is Converted",
            "default": false
          },
          "converted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Converted At"
          },
          "conversion_value": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Conversion Value"
          },
          "exit_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Exit Reason"
          },
          "enrolled_at": {
            "type": "string",
            "format": "date-time",
            "title": "Enrolled At"
          },
          "started_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Started At"
          },
          "completed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Completed At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "campaign_id",
          "contact_id",
          "enrolled_at"
        ],
        "title": "CampaignContactResponse",
        "description": "Schema for campaign contact response"
      },
      "CampaignCreate": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "campaign_type": {
            "$ref": "#/components/schemas/CampaignType",
            "default": "outbound"
          },
          "target_audience": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Target Audience"
          },
          "exclude_criteria": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Exclude Criteria"
          },
          "agent_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Agent Id"
          },
          "start_date": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Start Date"
          },
          "end_date": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "End Date"
          },
          "timezone": {
            "type": "string",
            "title": "Timezone",
            "default": "UTC"
          },
          "language": {
            "$ref": "#/components/schemas/CampaignLanguage",
            "default": "en"
          },
          "send_windows": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/SendWindow"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Send Windows"
          },
          "trigger_type": {
            "$ref": "#/components/schemas/TriggerType",
            "default": "manual"
          },
          "trigger_config": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Trigger Config"
          },
          "goals": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Goals"
          },
          "conversion_event": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Conversion Event"
          },
          "settings": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Settings"
          },
          "tags": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tags"
          },
          "list_ids": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "List Ids"
          },
          "steps": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/CampaignStepCreate"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Steps"
          },
          "owner_user_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Owner User Id"
          }
        },
        "type": "object",
        "required": [
          "name"
        ],
        "title": "CampaignCreate",
        "description": "Schema for creating a campaign"
      },
      "CampaignDetailResponse": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "campaign_type": {
            "$ref": "#/components/schemas/CampaignType",
            "default": "outbound"
          },
          "target_audience": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Target Audience"
          },
          "exclude_criteria": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Exclude Criteria"
          },
          "agent_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Agent Id"
          },
          "start_date": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Start Date"
          },
          "end_date": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "End Date"
          },
          "timezone": {
            "type": "string",
            "title": "Timezone",
            "default": "UTC"
          },
          "language": {
            "$ref": "#/components/schemas/CampaignLanguage",
            "default": "en"
          },
          "send_windows": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/SendWindow"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Send Windows"
          },
          "trigger_type": {
            "$ref": "#/components/schemas/TriggerType",
            "default": "manual"
          },
          "trigger_config": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Trigger Config"
          },
          "goals": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Goals"
          },
          "conversion_event": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Conversion Event"
          },
          "settings": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Settings"
          },
          "tags": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tags"
          },
          "id": {
            "type": "string",
            "title": "Id"
          },
          "organization_id": {
            "type": "string",
            "title": "Organization Id"
          },
          "created_by": {
            "type": "string",
            "title": "Created By"
          },
          "status": {
            "$ref": "#/components/schemas/CampaignStatus",
            "default": "draft"
          },
          "copy_generation_status": {
            "$ref": "#/components/schemas/CopyGenerationStatus",
            "default": "idle"
          },
          "copy_generation_job_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Copy Generation Job Id"
          },
          "total_contacts": {
            "type": "integer",
            "title": "Total Contacts",
            "default": 0
          },
          "contacts_completed": {
            "type": "integer",
            "title": "Contacts Completed",
            "default": 0
          },
          "contacts_in_progress": {
            "type": "integer",
            "title": "Contacts In Progress",
            "default": 0
          },
          "total_sent": {
            "type": "integer",
            "title": "Total Sent",
            "default": 0
          },
          "total_delivered": {
            "type": "integer",
            "title": "Total Delivered",
            "default": 0
          },
          "total_opened": {
            "type": "integer",
            "title": "Total Opened",
            "default": 0
          },
          "total_clicked": {
            "type": "integer",
            "title": "Total Clicked",
            "default": 0
          },
          "total_replied": {
            "type": "integer",
            "title": "Total Replied",
            "default": 0
          },
          "total_converted": {
            "type": "integer",
            "title": "Total Converted",
            "default": 0
          },
          "total_bounced": {
            "type": "integer",
            "title": "Total Bounced",
            "default": 0
          },
          "total_unsubscribed": {
            "type": "integer",
            "title": "Total Unsubscribed",
            "default": 0
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "updated_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          },
          "launched_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Launched At"
          },
          "completed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Completed At"
          },
          "steps": {
            "items": {
              "$ref": "#/components/schemas/CampaignStepResponse"
            },
            "type": "array",
            "title": "Steps",
            "default": []
          },
          "list_ids": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "List Ids",
            "default": []
          },
          "owner_has_signature": {
            "type": "boolean",
            "title": "Owner Has Signature",
            "default": false
          }
        },
        "type": "object",
        "required": [
          "name",
          "id",
          "organization_id",
          "created_by",
          "created_at"
        ],
        "title": "CampaignDetailResponse",
        "description": "Detailed campaign response with steps"
      },
      "CampaignLanguage": {
        "type": "string",
        "enum": [
          "en",
          "ny",
          "sw"
        ],
        "title": "CampaignLanguage"
      },
      "CampaignLaunchRequest": {
        "properties": {
          "start_immediately": {
            "type": "boolean",
            "title": "Start Immediately",
            "default": true
          },
          "scheduled_start": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Scheduled Start"
          }
        },
        "type": "object",
        "title": "CampaignLaunchRequest",
        "description": "Request to launch a campaign"
      },
      "CampaignListResponse": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "campaign_type": {
            "$ref": "#/components/schemas/CampaignType"
          },
          "status": {
            "$ref": "#/components/schemas/CampaignStatus"
          },
          "total_contacts": {
            "type": "integer",
            "title": "Total Contacts",
            "default": 0
          },
          "contacts_completed": {
            "type": "integer",
            "title": "Contacts Completed",
            "default": 0
          },
          "total_sent": {
            "type": "integer",
            "title": "Total Sent",
            "default": 0
          },
          "total_opened": {
            "type": "integer",
            "title": "Total Opened",
            "default": 0
          },
          "total_replied": {
            "type": "integer",
            "title": "Total Replied",
            "default": 0
          },
          "total_converted": {
            "type": "integer",
            "title": "Total Converted",
            "default": 0
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "launched_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Launched At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "campaign_type",
          "status",
          "created_at"
        ],
        "title": "CampaignListResponse",
        "description": "Schema for campaign list response"
      },
      "CampaignPerformanceDataPoint": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "sent": {
            "type": "integer",
            "title": "Sent"
          },
          "opened": {
            "type": "integer",
            "title": "Opened"
          },
          "clicked": {
            "type": "integer",
            "title": "Clicked"
          },
          "converted": {
            "type": "integer",
            "title": "Converted"
          }
        },
        "type": "object",
        "required": [
          "name",
          "sent",
          "opened",
          "clicked",
          "converted"
        ],
        "title": "CampaignPerformanceDataPoint"
      },
      "CampaignResponse": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "campaign_type": {
            "$ref": "#/components/schemas/CampaignType",
            "default": "outbound"
          },
          "target_audience": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Target Audience"
          },
          "exclude_criteria": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Exclude Criteria"
          },
          "agent_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Agent Id"
          },
          "start_date": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Start Date"
          },
          "end_date": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "End Date"
          },
          "timezone": {
            "type": "string",
            "title": "Timezone",
            "default": "UTC"
          },
          "language": {
            "$ref": "#/components/schemas/CampaignLanguage",
            "default": "en"
          },
          "send_windows": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/SendWindow"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Send Windows"
          },
          "trigger_type": {
            "$ref": "#/components/schemas/TriggerType",
            "default": "manual"
          },
          "trigger_config": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Trigger Config"
          },
          "goals": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Goals"
          },
          "conversion_event": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Conversion Event"
          },
          "settings": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Settings"
          },
          "tags": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tags"
          },
          "id": {
            "type": "string",
            "title": "Id"
          },
          "organization_id": {
            "type": "string",
            "title": "Organization Id"
          },
          "created_by": {
            "type": "string",
            "title": "Created By"
          },
          "status": {
            "$ref": "#/components/schemas/CampaignStatus",
            "default": "draft"
          },
          "copy_generation_status": {
            "$ref": "#/components/schemas/CopyGenerationStatus",
            "default": "idle"
          },
          "copy_generation_job_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Copy Generation Job Id"
          },
          "total_contacts": {
            "type": "integer",
            "title": "Total Contacts",
            "default": 0
          },
          "contacts_completed": {
            "type": "integer",
            "title": "Contacts Completed",
            "default": 0
          },
          "contacts_in_progress": {
            "type": "integer",
            "title": "Contacts In Progress",
            "default": 0
          },
          "total_sent": {
            "type": "integer",
            "title": "Total Sent",
            "default": 0
          },
          "total_delivered": {
            "type": "integer",
            "title": "Total Delivered",
            "default": 0
          },
          "total_opened": {
            "type": "integer",
            "title": "Total Opened",
            "default": 0
          },
          "total_clicked": {
            "type": "integer",
            "title": "Total Clicked",
            "default": 0
          },
          "total_replied": {
            "type": "integer",
            "title": "Total Replied",
            "default": 0
          },
          "total_converted": {
            "type": "integer",
            "title": "Total Converted",
            "default": 0
          },
          "total_bounced": {
            "type": "integer",
            "title": "Total Bounced",
            "default": 0
          },
          "total_unsubscribed": {
            "type": "integer",
            "title": "Total Unsubscribed",
            "default": 0
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "updated_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          },
          "launched_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Launched At"
          },
          "completed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Completed At"
          }
        },
        "type": "object",
        "required": [
          "name",
          "id",
          "organization_id",
          "created_by",
          "created_at"
        ],
        "title": "CampaignResponse",
        "description": "Schema for campaign response"
      },
      "CampaignStatus": {
        "type": "string",
        "enum": [
          "draft",
          "scheduled",
          "active",
          "paused",
          "completed",
          "archived"
        ],
        "title": "CampaignStatus"
      },
      "CampaignStepCreate": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "step_type": {
            "$ref": "#/components/schemas/StepType"
          },
          "order": {
            "type": "integer",
            "title": "Order"
          },
          "channel": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ChannelType"
              },
              {
                "type": "null"
              }
            ]
          },
          "subject": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Subject"
          },
          "content": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Content"
          },
          "content_html": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Content Html"
          },
          "template_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Template Id"
          },
          "agent_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Agent Id"
          },
          "agent_config": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Agent Config"
          },
          "ai_message_config": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ai Message Config"
          },
          "wait_duration": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Wait Duration"
          },
          "wait_unit": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Wait Unit"
          },
          "wait_until": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Wait Until"
          },
          "condition_type": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/StepConditionType"
              },
              {
                "type": "null"
              }
            ]
          },
          "condition_config": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Condition Config"
          },
          "condition_timeout": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Condition Timeout"
          },
          "next_step_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Step Id"
          },
          "true_branch_step_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "True Branch Step Id"
          },
          "false_branch_step_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "False Branch Step Id"
          },
          "action_config": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Action Config"
          },
          "webhook_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Webhook Url"
          },
          "webhook_method": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Webhook Method",
            "default": "POST"
          },
          "webhook_headers": {
            "anyOf": [
              {
                "additionalProperties": {
                  "type": "string"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Webhook Headers"
          },
          "webhook_payload": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Webhook Payload"
          },
          "is_active": {
            "type": "boolean",
            "title": "Is Active",
            "default": true
          },
          "skip_if_contacted": {
            "type": "boolean",
            "title": "Skip If Contacted",
            "default": false
          },
          "retry_on_failure": {
            "type": "boolean",
            "title": "Retry On Failure",
            "default": true
          },
          "max_retries": {
            "type": "integer",
            "title": "Max Retries",
            "default": 3
          },
          "include_signature": {
            "type": "boolean",
            "title": "Include Signature",
            "default": true
          },
          "trigger_workflow_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Trigger Workflow Id"
          },
          "ab_test_enabled": {
            "type": "boolean",
            "title": "Ab Test Enabled",
            "default": false
          },
          "ab_variants": {
            "anyOf": [
              {
                "items": {
                  "additionalProperties": true,
                  "type": "object"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ab Variants"
          },
          "review_status": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/StepReviewStatus"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "name",
          "step_type",
          "order"
        ],
        "title": "CampaignStepCreate",
        "description": "Schema for creating a campaign step.\n\nKeywords (`step_type`, `channel`, `condition_type`, `review_status`) are\nmatched ignoring case, and a blank id is no id.\n\n`review_status` lets a client that just wrote the copy itself save the\nstep as `reviewed` in one call (the detail page's step dialog does this).\nOnly `pending` / `reviewed` are meaningful here; `generated` / `edited`\nare derived server-side. Leave it unset for AI / template-created steps\nso they still go through human review before launch."
      },
      "CampaignStepResponse": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "step_type": {
            "$ref": "#/components/schemas/StepType"
          },
          "order": {
            "type": "integer",
            "title": "Order"
          },
          "channel": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ChannelType"
              },
              {
                "type": "null"
              }
            ]
          },
          "subject": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Subject"
          },
          "content": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Content"
          },
          "content_html": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Content Html"
          },
          "template_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Template Id"
          },
          "agent_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Agent Id"
          },
          "agent_config": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Agent Config"
          },
          "ai_message_config": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ai Message Config"
          },
          "wait_duration": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Wait Duration"
          },
          "wait_unit": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Wait Unit"
          },
          "wait_until": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Wait Until"
          },
          "condition_type": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/StepConditionType"
              },
              {
                "type": "null"
              }
            ]
          },
          "condition_config": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Condition Config"
          },
          "condition_timeout": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Condition Timeout"
          },
          "next_step_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Step Id"
          },
          "true_branch_step_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "True Branch Step Id"
          },
          "false_branch_step_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "False Branch Step Id"
          },
          "action_config": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Action Config"
          },
          "webhook_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Webhook Url"
          },
          "webhook_method": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Webhook Method",
            "default": "POST"
          },
          "webhook_headers": {
            "anyOf": [
              {
                "additionalProperties": {
                  "type": "string"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Webhook Headers"
          },
          "webhook_payload": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Webhook Payload"
          },
          "is_active": {
            "type": "boolean",
            "title": "Is Active",
            "default": true
          },
          "skip_if_contacted": {
            "type": "boolean",
            "title": "Skip If Contacted",
            "default": false
          },
          "retry_on_failure": {
            "type": "boolean",
            "title": "Retry On Failure",
            "default": true
          },
          "max_retries": {
            "type": "integer",
            "title": "Max Retries",
            "default": 3
          },
          "include_signature": {
            "type": "boolean",
            "title": "Include Signature",
            "default": true
          },
          "trigger_workflow_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Trigger Workflow Id"
          },
          "ab_test_enabled": {
            "type": "boolean",
            "title": "Ab Test Enabled",
            "default": false
          },
          "ab_variants": {
            "anyOf": [
              {
                "items": {
                  "additionalProperties": true,
                  "type": "object"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ab Variants"
          },
          "id": {
            "type": "string",
            "title": "Id"
          },
          "campaign_id": {
            "type": "string",
            "title": "Campaign Id"
          },
          "total_executed": {
            "type": "integer",
            "title": "Total Executed",
            "default": 0
          },
          "total_success": {
            "type": "integer",
            "title": "Total Success",
            "default": 0
          },
          "total_failed": {
            "type": "integer",
            "title": "Total Failed",
            "default": 0
          },
          "review_status": {
            "$ref": "#/components/schemas/StepReviewStatus",
            "default": "pending"
          },
          "reviewed_by": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reviewed By"
          },
          "reviewed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reviewed At"
          },
          "generated_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Generated At"
          },
          "generation_job_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Generation Job Id"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "updated_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          }
        },
        "type": "object",
        "required": [
          "name",
          "step_type",
          "order",
          "id",
          "campaign_id",
          "created_at"
        ],
        "title": "CampaignStepResponse",
        "description": "Schema for campaign step response"
      },
      "CampaignStepUpdate": {
        "properties": {
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "step_type": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/StepType"
              },
              {
                "type": "null"
              }
            ]
          },
          "order": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Order"
          },
          "channel": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ChannelType"
              },
              {
                "type": "null"
              }
            ]
          },
          "subject": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Subject"
          },
          "content": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Content"
          },
          "content_html": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Content Html"
          },
          "template_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Template Id"
          },
          "agent_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Agent Id"
          },
          "agent_config": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Agent Config"
          },
          "ai_message_config": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ai Message Config"
          },
          "wait_duration": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Wait Duration"
          },
          "wait_unit": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Wait Unit"
          },
          "wait_until": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Wait Until"
          },
          "condition_type": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/StepConditionType"
              },
              {
                "type": "null"
              }
            ]
          },
          "condition_config": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Condition Config"
          },
          "condition_timeout": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Condition Timeout"
          },
          "next_step_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Step Id"
          },
          "true_branch_step_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "True Branch Step Id"
          },
          "false_branch_step_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "False Branch Step Id"
          },
          "action_config": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Action Config"
          },
          "webhook_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Webhook Url"
          },
          "webhook_method": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Webhook Method"
          },
          "webhook_headers": {
            "anyOf": [
              {
                "additionalProperties": {
                  "type": "string"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Webhook Headers"
          },
          "webhook_payload": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Webhook Payload"
          },
          "is_active": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Is Active"
          },
          "skip_if_contacted": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Skip If Contacted"
          },
          "retry_on_failure": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Retry On Failure"
          },
          "max_retries": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Retries"
          },
          "include_signature": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Include Signature"
          },
          "trigger_workflow_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Trigger Workflow Id"
          },
          "ab_test_enabled": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ab Test Enabled"
          },
          "ab_variants": {
            "anyOf": [
              {
                "items": {
                  "additionalProperties": true,
                  "type": "object"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ab Variants"
          },
          "review_status": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/StepReviewStatus"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "title": "CampaignStepUpdate",
        "description": "Schema for updating a campaign step"
      },
      "CampaignType": {
        "type": "string",
        "enum": [
          "outbound",
          "nurture",
          "reengagement",
          "onboarding",
          "upsell",
          "event",
          "sequence",
          "custom"
        ],
        "title": "CampaignType"
      },
      "CampaignUpdate": {
        "properties": {
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "campaign_type": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CampaignType"
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CampaignStatus"
              },
              {
                "type": "null"
              }
            ]
          },
          "target_audience": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Target Audience"
          },
          "exclude_criteria": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Exclude Criteria"
          },
          "agent_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Agent Id"
          },
          "start_date": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Start Date"
          },
          "end_date": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "End Date"
          },
          "timezone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Timezone"
          },
          "language": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CampaignLanguage"
              },
              {
                "type": "null"
              }
            ]
          },
          "send_windows": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/SendWindow"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Send Windows"
          },
          "trigger_type": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TriggerType"
              },
              {
                "type": "null"
              }
            ]
          },
          "trigger_config": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Trigger Config"
          },
          "goals": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Goals"
          },
          "conversion_event": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Conversion Event"
          },
          "settings": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Settings"
          },
          "tags": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tags"
          },
          "list_ids": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "List Ids"
          }
        },
        "type": "object",
        "title": "CampaignUpdate",
        "description": "Schema for updating a campaign"
      },
      "ChannelType": {
        "type": "string",
        "enum": [
          "email",
          "sms",
          "phone",
          "ai_call",
          "linkedin",
          "facebook",
          "whatsapp",
          "webhook"
        ],
        "title": "ChannelType"
      },
      "ChartData": {
        "properties": {
          "growth_data": {
            "items": {
              "$ref": "#/components/schemas/GrowthDataPoint"
            },
            "type": "array",
            "title": "Growth Data"
          },
          "engagement_data": {
            "items": {
              "$ref": "#/components/schemas/EngagementDataPoint"
            },
            "type": "array",
            "title": "Engagement Data"
          },
          "contact_sources": {
            "items": {
              "$ref": "#/components/schemas/ContactSourceDataPoint"
            },
            "type": "array",
            "title": "Contact Sources"
          },
          "campaign_performance": {
            "items": {
              "$ref": "#/components/schemas/CampaignPerformanceDataPoint"
            },
            "type": "array",
            "title": "Campaign Performance"
          }
        },
        "type": "object",
        "required": [
          "growth_data",
          "engagement_data",
          "contact_sources",
          "campaign_performance"
        ],
        "title": "ChartData"
      },
      "Company": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "website": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Website"
          },
          "industry": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Industry"
          },
          "size": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Size"
          },
          "employee_count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Employee Count"
          },
          "revenue": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Revenue"
          },
          "key_people": {
            "anyOf": [
              {
                "items": {
                  "additionalProperties": true,
                  "type": "object"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Key People"
          },
          "founded": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Founded"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "headquarters": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Headquarters"
          },
          "country": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Country"
          },
          "city": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "City"
          },
          "address": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Address"
          },
          "phone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Phone"
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "linkedin": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Linkedin"
          },
          "twitter": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Twitter"
          },
          "facebook": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Facebook"
          },
          "tags": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tags",
            "default": []
          },
          "status": {
            "$ref": "#/components/schemas/CompanyStatus",
            "default": "Lead"
          },
          "account_manager": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Account Manager"
          },
          "account_manager_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Account Manager Id"
          },
          "last_interaction": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Interaction"
          },
          "notes": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Notes"
          },
          "id": {
            "type": "string",
            "title": "Id"
          },
          "organization_id": {
            "type": "string",
            "title": "Organization Id"
          },
          "created_by": {
            "type": "string",
            "title": "Created By"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "updated_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          },
          "account_manager_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Account Manager Name"
          },
          "enrichment_score": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Enrichment Score"
          },
          "enrichment_data": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Enrichment Data"
          },
          "enrichment_status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Enrichment Status"
          },
          "last_enriched_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Enriched At"
          }
        },
        "type": "object",
        "required": [
          "name",
          "id",
          "organization_id",
          "created_by",
          "created_at"
        ],
        "title": "Company"
      },
      "CompanyBulkCreate": {
        "properties": {
          "companies": {
            "items": {
              "$ref": "#/components/schemas/CompanyCreate"
            },
            "type": "array",
            "title": "Companies"
          }
        },
        "type": "object",
        "required": [
          "companies"
        ],
        "title": "CompanyBulkCreate"
      },
      "CompanyCreate": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "website": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Website"
          },
          "industry": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Industry"
          },
          "size": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Size"
          },
          "employee_count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Employee Count"
          },
          "revenue": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Revenue"
          },
          "key_people": {
            "anyOf": [
              {
                "items": {
                  "additionalProperties": true,
                  "type": "object"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Key People"
          },
          "founded": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Founded"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "headquarters": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Headquarters"
          },
          "country": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Country"
          },
          "city": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "City"
          },
          "address": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Address"
          },
          "phone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Phone"
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "linkedin": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Linkedin"
          },
          "twitter": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Twitter"
          },
          "facebook": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Facebook"
          },
          "tags": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tags",
            "default": []
          },
          "status": {
            "$ref": "#/components/schemas/CompanyStatus",
            "default": "Lead"
          },
          "account_manager": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Account Manager"
          },
          "account_manager_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Account Manager Id"
          },
          "last_interaction": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Interaction"
          },
          "notes": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Notes"
          },
          "organization_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Organization Id"
          }
        },
        "type": "object",
        "required": [
          "name"
        ],
        "title": "CompanyCreate"
      },
      "CompanyStatus": {
        "type": "string",
        "enum": [
          "Lead",
          "Prospect",
          "Customer",
          "Churned",
          "Partner"
        ],
        "title": "CompanyStatus"
      },
      "CompanyUpdate": {
        "properties": {
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "website": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Website"
          },
          "industry": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Industry"
          },
          "size": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Size"
          },
          "employee_count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Employee Count"
          },
          "revenue": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Revenue"
          },
          "key_people": {
            "anyOf": [
              {
                "items": {
                  "additionalProperties": true,
                  "type": "object"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Key People"
          },
          "founded": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Founded"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "headquarters": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Headquarters"
          },
          "country": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Country"
          },
          "city": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "City"
          },
          "address": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Address"
          },
          "phone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Phone"
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "linkedin": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Linkedin"
          },
          "twitter": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Twitter"
          },
          "facebook": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Facebook"
          },
          "tags": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tags"
          },
          "status": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CompanyStatus"
              },
              {
                "type": "null"
              }
            ]
          },
          "account_manager": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Account Manager"
          },
          "account_manager_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Account Manager Id"
          },
          "last_interaction": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Interaction"
          },
          "notes": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Notes"
          },
          "enrichment_score": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Enrichment Score"
          },
          "enrichment_data": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Enrichment Data"
          },
          "enrichment_status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Enrichment Status"
          },
          "last_enriched_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Enriched At"
          }
        },
        "type": "object",
        "title": "CompanyUpdate"
      },
      "Contact": {
        "properties": {
          "email": {
            "anyOf": [
              {
                "type": "string",
                "format": "email"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "work_email": {
            "anyOf": [
              {
                "type": "string",
                "format": "email"
              },
              {
                "type": "null"
              }
            ],
            "title": "Work Email"
          },
          "personal_email": {
            "anyOf": [
              {
                "type": "string",
                "format": "email"
              },
              {
                "type": "null"
              }
            ],
            "title": "Personal Email"
          },
          "first_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "First Name"
          },
          "last_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Name"
          },
          "phone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Phone"
          },
          "mobile_phone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Mobile Phone"
          },
          "company_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Company Name"
          },
          "company": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Company"
          },
          "job_title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Job Title"
          },
          "country": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Country"
          },
          "town": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Town"
          },
          "social_links": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Social Links"
          },
          "notes": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Notes"
          },
          "organization_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Organization Id"
          },
          "pipeline_stage": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pipeline Stage"
          },
          "id": {
            "type": "string",
            "title": "Id"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "updated_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          },
          "lists": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/ListBasic"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Lists"
          },
          "enrichment_score": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Enrichment Score"
          },
          "enrichment_data": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Enrichment Data"
          },
          "enrichment_status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Enrichment Status"
          },
          "last_enriched_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Enriched At"
          },
          "extras_data": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Extras Data"
          }
        },
        "type": "object",
        "required": [
          "id",
          "created_at"
        ],
        "title": "Contact"
      },
      "ContactBasic": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "first_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "First Name"
          },
          "last_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Name"
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "phone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Phone"
          },
          "company": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Company"
          }
        },
        "type": "object",
        "required": [
          "id"
        ],
        "title": "ContactBasic"
      },
      "ContactCreate": {
        "properties": {
          "email": {
            "anyOf": [
              {
                "type": "string",
                "format": "email"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "work_email": {
            "anyOf": [
              {
                "type": "string",
                "format": "email"
              },
              {
                "type": "null"
              }
            ],
            "title": "Work Email"
          },
          "personal_email": {
            "anyOf": [
              {
                "type": "string",
                "format": "email"
              },
              {
                "type": "null"
              }
            ],
            "title": "Personal Email"
          },
          "first_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "First Name"
          },
          "last_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Name"
          },
          "phone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Phone"
          },
          "mobile_phone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Mobile Phone"
          },
          "company_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Company Name"
          },
          "company": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Company"
          },
          "job_title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Job Title"
          },
          "country": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Country"
          },
          "town": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Town"
          },
          "social_links": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Social Links"
          },
          "notes": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Notes"
          },
          "organization_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Organization Id"
          },
          "pipeline_stage": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pipeline Stage"
          },
          "source": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source"
          },
          "source_details": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source Details"
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Status"
          },
          "tags": {
            "anyOf": [
              {
                "items": {},
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tags"
          },
          "extras_data": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Extras Data"
          }
        },
        "type": "object",
        "title": "ContactCreate"
      },
      "ContactSourceDataPoint": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "value": {
            "type": "integer",
            "title": "Value"
          },
          "color": {
            "type": "string",
            "title": "Color"
          }
        },
        "type": "object",
        "required": [
          "name",
          "value",
          "color"
        ],
        "title": "ContactSourceDataPoint"
      },
      "ContactStatus": {
        "type": "string",
        "enum": [
          "active",
          "inactive",
          "unsubscribed",
          "bounced"
        ],
        "title": "ContactStatus"
      },
      "ContactUpdate": {
        "properties": {
          "email": {
            "anyOf": [
              {
                "type": "string",
                "format": "email"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "work_email": {
            "anyOf": [
              {
                "type": "string",
                "format": "email"
              },
              {
                "type": "null"
              }
            ],
            "title": "Work Email"
          },
          "personal_email": {
            "anyOf": [
              {
                "type": "string",
                "format": "email"
              },
              {
                "type": "null"
              }
            ],
            "title": "Personal Email"
          },
          "first_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "First Name"
          },
          "last_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Name"
          },
          "phone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Phone"
          },
          "mobile_phone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Mobile Phone"
          },
          "company_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Company Name"
          },
          "company": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Company"
          },
          "job_title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Job Title"
          },
          "country": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Country"
          },
          "town": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Town"
          },
          "social_links": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Social Links"
          },
          "notes": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Notes"
          },
          "tags": {
            "anyOf": [
              {
                "items": {},
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tags"
          },
          "enrichment_score": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Enrichment Score"
          },
          "enrichment_data": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Enrichment Data"
          },
          "enrichment_status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Enrichment Status"
          },
          "last_enriched_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Enriched At"
          }
        },
        "type": "object",
        "title": "ContactUpdate"
      },
      "ConversationChannel": {
        "type": "string",
        "enum": [
          "widget",
          "email",
          "whatsapp",
          "api",
          "manual",
          "messenger",
          "instagram"
        ],
        "title": "ConversationChannel"
      },
      "ConversationPriority": {
        "type": "string",
        "enum": [
          "low",
          "normal",
          "high",
          "urgent"
        ],
        "title": "ConversationPriority"
      },
      "ConversationResponse": {
        "properties": {
          "channel": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Channel"
          },
          "extra_data": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Extra Data"
          },
          "id": {
            "type": "string",
            "title": "Id"
          },
          "agent_id": {
            "type": "string",
            "title": "Agent Id"
          },
          "organization_id": {
            "type": "string",
            "title": "Organization Id"
          },
          "contact_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Contact Id"
          },
          "visitor_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Visitor Id"
          },
          "session_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Session Id"
          },
          "status": {
            "type": "string",
            "title": "Status",
            "default": "active"
          },
          "message_count": {
            "type": "integer",
            "title": "Message Count",
            "default": 0
          },
          "duration_seconds": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Duration Seconds"
          },
          "sentiment_score": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sentiment Score"
          },
          "started_at": {
            "type": "string",
            "format": "date-time",
            "title": "Started At"
          },
          "ended_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ended At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "agent_id",
          "organization_id",
          "started_at"
        ],
        "title": "ConversationResponse",
        "description": "Schema for conversation response"
      },
      "ConversationStatus": {
        "type": "string",
        "enum": [
          "open",
          "assigned",
          "pending",
          "resolved",
          "closed"
        ],
        "title": "ConversationStatus"
      },
      "ConvertLeadToDealRequest": {
        "properties": {
          "product_line_items": {
            "items": {
              "$ref": "#/components/schemas/DealProductCreate"
            },
            "type": "array",
            "title": "Product Line Items"
          }
        },
        "type": "object",
        "required": [
          "product_line_items"
        ],
        "title": "ConvertLeadToDealRequest"
      },
      "CopyGenerationStatus": {
        "type": "string",
        "enum": [
          "idle",
          "running",
          "complete",
          "failed"
        ],
        "title": "CopyGenerationStatus",
        "description": "Campaign-level state for the async generate-copy job."
      },
      "Customer": {
        "properties": {
          "company_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Company Name"
          },
          "domain": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Domain"
          },
          "industry": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Industry"
          },
          "employees": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Employees"
          },
          "revenue": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Revenue"
          },
          "headquarters": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Headquarters"
          },
          "country": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Country"
          },
          "website": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Website"
          },
          "phone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Phone"
          },
          "founded": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Founded"
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Status"
          },
          "subscription_plan": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Subscription Plan"
          },
          "subscription_status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Subscription Status"
          },
          "mrr": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Mrr"
          },
          "arr": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Arr"
          },
          "lifetime_value": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Lifetime Value"
          },
          "contract_start": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Contract Start"
          },
          "contract_end": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Contract End"
          },
          "owner_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Owner Id"
          },
          "owner_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Owner Name"
          },
          "account_manager": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Account Manager"
          },
          "stakeholders": {
            "anyOf": [
              {
                "items": {},
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Stakeholders"
          },
          "primary_contact_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Primary Contact Id"
          },
          "company_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Company Id"
          },
          "stripe_customer_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Stripe Customer Id"
          },
          "health_score": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Health Score"
          },
          "nps_score": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Nps Score"
          },
          "documents": {
            "anyOf": [
              {
                "items": {},
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Documents"
          },
          "tags": {
            "anyOf": [
              {
                "items": {},
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tags"
          },
          "notes": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Notes"
          },
          "custom_fields": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Custom Fields"
          },
          "id": {
            "type": "string",
            "title": "Id"
          },
          "organization_id": {
            "type": "string",
            "title": "Organization Id"
          },
          "deal_count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Deal Count"
          },
          "total_deal_value": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Total Deal Value"
          },
          "last_interaction": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Interaction"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "updated_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          },
          "contact_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Contact Name"
          },
          "contact_email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Contact Email"
          }
        },
        "type": "object",
        "required": [
          "id",
          "organization_id",
          "created_at"
        ],
        "title": "Customer"
      },
      "CustomerCreate": {
        "properties": {
          "contact": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RecordContactInput"
              },
              {
                "type": "null"
              }
            ]
          },
          "company_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Company Name"
          },
          "domain": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Domain"
          },
          "industry": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Industry"
          },
          "employees": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Employees"
          },
          "revenue": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Revenue"
          },
          "headquarters": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Headquarters"
          },
          "country": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Country"
          },
          "website": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Website"
          },
          "phone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Phone"
          },
          "founded": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Founded"
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Status"
          },
          "subscription_plan": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Subscription Plan"
          },
          "subscription_status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Subscription Status"
          },
          "mrr": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string",
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Mrr"
          },
          "arr": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string",
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Arr"
          },
          "lifetime_value": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string",
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Lifetime Value"
          },
          "contract_start": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Contract Start"
          },
          "contract_end": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Contract End"
          },
          "owner_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Owner Id"
          },
          "owner_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Owner Name"
          },
          "account_manager": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Account Manager"
          },
          "stakeholders": {
            "anyOf": [
              {
                "items": {},
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Stakeholders"
          },
          "primary_contact_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Primary Contact Id"
          },
          "company_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Company Id"
          },
          "stripe_customer_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Stripe Customer Id"
          },
          "health_score": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Health Score"
          },
          "nps_score": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Nps Score"
          },
          "documents": {
            "anyOf": [
              {
                "items": {},
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Documents"
          },
          "tags": {
            "anyOf": [
              {
                "items": {},
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tags"
          },
          "notes": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Notes"
          },
          "custom_fields": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Custom Fields"
          },
          "organization_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Organization Id"
          }
        },
        "type": "object",
        "title": "CustomerCreate"
      },
      "CustomerUpdate": {
        "properties": {
          "contact": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RecordContactInput"
              },
              {
                "type": "null"
              }
            ]
          },
          "company_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Company Name"
          },
          "domain": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Domain"
          },
          "industry": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Industry"
          },
          "employees": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Employees"
          },
          "revenue": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Revenue"
          },
          "headquarters": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Headquarters"
          },
          "country": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Country"
          },
          "website": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Website"
          },
          "phone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Phone"
          },
          "founded": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Founded"
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Status"
          },
          "subscription_plan": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Subscription Plan"
          },
          "subscription_status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Subscription Status"
          },
          "mrr": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string",
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Mrr"
          },
          "arr": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string",
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Arr"
          },
          "lifetime_value": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string",
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Lifetime Value"
          },
          "contract_start": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Contract Start"
          },
          "contract_end": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Contract End"
          },
          "owner_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Owner Id"
          },
          "owner_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Owner Name"
          },
          "account_manager": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Account Manager"
          },
          "stakeholders": {
            "anyOf": [
              {
                "items": {},
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Stakeholders"
          },
          "primary_contact_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Primary Contact Id"
          },
          "company_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Company Id"
          },
          "stripe_customer_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Stripe Customer Id"
          },
          "health_score": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Health Score"
          },
          "nps_score": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Nps Score"
          },
          "documents": {
            "anyOf": [
              {
                "items": {},
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Documents"
          },
          "tags": {
            "anyOf": [
              {
                "items": {},
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tags"
          },
          "notes": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Notes"
          },
          "custom_fields": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Custom Fields"
          },
          "deal_count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Deal Count"
          },
          "total_deal_value": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string",
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Total Deal Value"
          },
          "last_interaction": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Interaction"
          }
        },
        "type": "object",
        "title": "CustomerUpdate"
      },
      "DailyCallCount": {
        "properties": {
          "date": {
            "type": "string",
            "title": "Date"
          },
          "count": {
            "type": "integer",
            "title": "Count"
          }
        },
        "type": "object",
        "required": [
          "date",
          "count"
        ],
        "title": "DailyCallCount"
      },
      "DashboardResponse": {
        "properties": {
          "stats": {
            "$ref": "#/components/schemas/DashboardStats"
          },
          "recent_activities": {
            "items": {
              "$ref": "#/components/schemas/RecentActivity"
            },
            "type": "array",
            "title": "Recent Activities"
          },
          "chart_data": {
            "$ref": "#/components/schemas/ChartData"
          }
        },
        "type": "object",
        "required": [
          "stats",
          "recent_activities",
          "chart_data"
        ],
        "title": "DashboardResponse"
      },
      "DashboardStats": {
        "properties": {
          "total_contacts": {
            "type": "integer",
            "title": "Total Contacts"
          },
          "contacts_change": {
            "type": "number",
            "title": "Contacts Change"
          },
          "total_companies": {
            "type": "integer",
            "title": "Total Companies"
          },
          "companies_change": {
            "type": "number",
            "title": "Companies Change"
          },
          "active_visitors": {
            "type": "integer",
            "title": "Active Visitors"
          },
          "intent_signals": {
            "type": "integer",
            "title": "Intent Signals"
          },
          "intent_change": {
            "type": "number",
            "title": "Intent Change"
          },
          "total_lists": {
            "type": "integer",
            "title": "Total Lists"
          },
          "total_campaigns": {
            "type": "integer",
            "title": "Total Campaigns"
          },
          "active_campaigns": {
            "type": "integer",
            "title": "Active Campaigns"
          },
          "total_agents": {
            "type": "integer",
            "title": "Total Agents"
          },
          "active_agents": {
            "type": "integer",
            "title": "Active Agents"
          },
          "total_voice_agents": {
            "type": "integer",
            "title": "Total Voice Agents"
          },
          "total_calls": {
            "type": "integer",
            "title": "Total Calls"
          },
          "total_knowledge_docs": {
            "type": "integer",
            "title": "Total Knowledge Docs"
          },
          "total_knowledge_folders": {
            "type": "integer",
            "title": "Total Knowledge Folders"
          }
        },
        "type": "object",
        "required": [
          "total_contacts",
          "contacts_change",
          "total_companies",
          "companies_change",
          "active_visitors",
          "intent_signals",
          "intent_change",
          "total_lists",
          "total_campaigns",
          "active_campaigns",
          "total_agents",
          "active_agents",
          "total_voice_agents",
          "total_calls",
          "total_knowledge_docs",
          "total_knowledge_folders"
        ],
        "title": "DashboardStats"
      },
      "Deal": {
        "properties": {
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "stage": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Stage"
          },
          "priority": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Priority"
          },
          "amount": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Amount"
          },
          "currency": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Currency",
            "default": "USD"
          },
          "probability": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Probability"
          },
          "expected_revenue": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expected Revenue"
          },
          "prospect_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Prospect Id"
          },
          "customer_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Id"
          },
          "lead_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Lead Id"
          },
          "contact_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Contact Id"
          },
          "company_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Company Id"
          },
          "owner_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Owner Id"
          },
          "owner_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Owner Name"
          },
          "close_date": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Close Date"
          },
          "tags": {
            "anyOf": [
              {
                "items": {},
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tags"
          },
          "notes": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Notes"
          },
          "custom_fields": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Custom Fields"
          },
          "id": {
            "type": "string",
            "title": "Id"
          },
          "organization_id": {
            "type": "string",
            "title": "Organization Id"
          },
          "won_date": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Won Date"
          },
          "lost_date": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Lost Date"
          },
          "lost_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Lost Reason"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "updated_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          },
          "contact_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Contact Name"
          },
          "contact_email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Contact Email"
          },
          "company_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Company Name"
          },
          "product_line_items": {
            "items": {
              "$ref": "#/components/schemas/DealProductRead"
            },
            "type": "array",
            "title": "Product Line Items",
            "default": []
          }
        },
        "type": "object",
        "required": [
          "id",
          "organization_id",
          "created_at"
        ],
        "title": "Deal"
      },
      "DealCreate": {
        "properties": {
          "contact": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RecordContactInput"
              },
              {
                "type": "null"
              }
            ]
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "stage": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Stage"
          },
          "priority": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Priority"
          },
          "amount": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string",
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Amount"
          },
          "currency": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Currency",
            "default": "USD"
          },
          "probability": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Probability"
          },
          "expected_revenue": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string",
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expected Revenue"
          },
          "prospect_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Prospect Id"
          },
          "customer_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Id"
          },
          "lead_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Lead Id"
          },
          "contact_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Contact Id"
          },
          "company_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Company Id"
          },
          "owner_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Owner Id"
          },
          "owner_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Owner Name"
          },
          "close_date": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Close Date"
          },
          "tags": {
            "anyOf": [
              {
                "items": {},
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tags"
          },
          "notes": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Notes"
          },
          "custom_fields": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Custom Fields"
          },
          "organization_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Organization Id"
          },
          "company_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Company Name"
          },
          "product_line_items": {
            "items": {
              "$ref": "#/components/schemas/DealProductCreate"
            },
            "type": "array",
            "title": "Product Line Items"
          }
        },
        "type": "object",
        "required": [
          "name",
          "product_line_items"
        ],
        "title": "DealCreate"
      },
      "DealProductCreate": {
        "properties": {
          "product_id": {
            "type": "string",
            "title": "Product Id"
          },
          "variant_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Variant Id"
          },
          "quantity": {
            "type": "integer",
            "title": "Quantity",
            "default": 1
          },
          "unit_price": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string",
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Unit Price"
          },
          "discount": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string",
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Discount",
            "default": "0"
          },
          "notes": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Notes"
          }
        },
        "type": "object",
        "required": [
          "product_id"
        ],
        "title": "DealProductCreate"
      },
      "DealProductRead": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "product_id": {
            "type": "string",
            "title": "Product Id"
          },
          "product_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Product Name"
          },
          "variant_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Variant Id"
          },
          "variant_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Variant Name"
          },
          "quantity": {
            "type": "integer",
            "title": "Quantity"
          },
          "unit_price": {
            "type": "string",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Unit Price"
          },
          "discount": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Discount"
          },
          "total": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Total"
          },
          "notes": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Notes"
          }
        },
        "type": "object",
        "required": [
          "id",
          "product_id",
          "quantity",
          "unit_price"
        ],
        "title": "DealProductRead",
        "description": "Response shape for a single product line item on a deal."
      },
      "DealUpdate": {
        "properties": {
          "contact": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RecordContactInput"
              },
              {
                "type": "null"
              }
            ]
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "stage": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Stage"
          },
          "priority": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Priority"
          },
          "amount": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string",
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Amount"
          },
          "currency": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Currency",
            "default": "USD"
          },
          "probability": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Probability"
          },
          "expected_revenue": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string",
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expected Revenue"
          },
          "prospect_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Prospect Id"
          },
          "customer_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Id"
          },
          "lead_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Lead Id"
          },
          "contact_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Contact Id"
          },
          "company_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Company Id"
          },
          "owner_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Owner Id"
          },
          "owner_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Owner Name"
          },
          "close_date": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Close Date"
          },
          "tags": {
            "anyOf": [
              {
                "items": {},
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tags"
          },
          "notes": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Notes"
          },
          "custom_fields": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Custom Fields"
          },
          "company_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Company Name"
          },
          "won_date": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Won Date"
          },
          "lost_date": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Lost Date"
          },
          "lost_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Lost Reason"
          },
          "product_line_items": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/DealProductCreate"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Product Line Items"
          }
        },
        "type": "object",
        "title": "DealUpdate"
      },
      "DeepResearchRequest": {
        "properties": {
          "query": {
            "type": "string",
            "title": "Query"
          },
          "search_type": {
            "type": "string",
            "pattern": "^(company|people|both)$",
            "title": "Search Type",
            "default": "company"
          },
          "research_depth": {
            "type": "string",
            "title": "Research Depth",
            "default": "basic"
          },
          "max_results": {
            "type": "integer",
            "maximum": 100.0,
            "minimum": 1.0,
            "title": "Max Results",
            "default": 50
          },
          "review_plan": {
            "type": "boolean",
            "title": "Review Plan",
            "default": false
          },
          "review_quality": {
            "type": "boolean",
            "title": "Review Quality",
            "default": true
          }
        },
        "type": "object",
        "required": [
          "query"
        ],
        "title": "DeepResearchRequest"
      },
      "DeepResearchResponse": {
        "properties": {
          "task_id": {
            "type": "string",
            "title": "Task Id"
          },
          "status": {
            "type": "string",
            "title": "Status"
          },
          "message": {
            "type": "string",
            "title": "Message"
          }
        },
        "type": "object",
        "required": [
          "task_id",
          "status",
          "message"
        ],
        "title": "DeepResearchResponse"
      },
      "DispositionBreakdown": {
        "properties": {
          "disposition": {
            "type": "string",
            "title": "Disposition"
          },
          "count": {
            "type": "integer",
            "title": "Count"
          }
        },
        "type": "object",
        "required": [
          "disposition",
          "count"
        ],
        "title": "DispositionBreakdown"
      },
      "EngageChannel": {
        "type": "string",
        "enum": [
          "email",
          "chat",
          "sms",
          "linkedin",
          "whatsapp",
          "whatsapp_call",
          "voice_call",
          "ai_call",
          "meeting",
          "messenger",
          "instagram"
        ],
        "title": "EngageChannel"
      },
      "EngageConversationCreate": {
        "properties": {
          "channel": {
            "$ref": "#/components/schemas/EngageChannel"
          },
          "subject": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Subject"
          },
          "status": {
            "$ref": "#/components/schemas/EngageConversationStatus",
            "default": "open"
          },
          "priority": {
            "$ref": "#/components/schemas/EngageConversationPriority",
            "default": "normal"
          },
          "contact_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Contact Id"
          },
          "deal_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Deal Id"
          },
          "campaign_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Campaign Id"
          },
          "workspace_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Workspace Id"
          },
          "assigned_user_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Assigned User Id"
          },
          "ai_agent_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ai Agent Id"
          },
          "tags": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tags"
          },
          "extra_data": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Extra Data"
          }
        },
        "type": "object",
        "required": [
          "channel"
        ],
        "title": "EngageConversationCreate"
      },
      "EngageConversationOut": {
        "properties": {
          "channel": {
            "$ref": "#/components/schemas/EngageChannel"
          },
          "subject": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Subject"
          },
          "status": {
            "$ref": "#/components/schemas/EngageConversationStatus",
            "default": "open"
          },
          "priority": {
            "$ref": "#/components/schemas/EngageConversationPriority",
            "default": "normal"
          },
          "contact_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Contact Id"
          },
          "deal_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Deal Id"
          },
          "campaign_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Campaign Id"
          },
          "workspace_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Workspace Id"
          },
          "assigned_user_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Assigned User Id"
          },
          "ai_agent_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ai Agent Id"
          },
          "tags": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tags"
          },
          "extra_data": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Extra Data"
          },
          "id": {
            "type": "string",
            "title": "Id"
          },
          "organization_id": {
            "type": "string",
            "title": "Organization Id"
          },
          "is_starred": {
            "type": "boolean",
            "title": "Is Starred",
            "default": false
          },
          "unread_count": {
            "type": "integer",
            "title": "Unread Count",
            "default": 0
          },
          "last_message_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Message At"
          },
          "last_message_preview": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Message Preview"
          },
          "external_thread_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Thread Id"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "updated_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          },
          "contact": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ContactBasic"
              },
              {
                "type": "null"
              }
            ]
          },
          "last_read_by_contact_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Read By Contact At"
          },
          "campaign_status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Campaign Status"
          }
        },
        "type": "object",
        "required": [
          "channel",
          "id",
          "organization_id",
          "created_at"
        ],
        "title": "EngageConversationOut",
        "description": "Conversation plus two derived fields:\n\n- ``last_read_by_contact_at``: the latest time the customer read one of\n  our messages (WhatsApp / Messenger / Instagram read receipts), for \"Seen\";\n- ``campaign_status``: the linked campaign's status (``active``,\n  ``completed``, ``archived``, ...), null when the thread has no campaign,\n  so threads of finished campaigns can be tagged."
      },
      "EngageConversationPage": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/EngageConversationOut"
            },
            "type": "array",
            "title": "Items"
          },
          "total": {
            "type": "integer",
            "title": "Total"
          },
          "skip": {
            "type": "integer",
            "title": "Skip"
          },
          "limit": {
            "type": "integer",
            "title": "Limit"
          }
        },
        "type": "object",
        "required": [
          "items",
          "total",
          "skip",
          "limit"
        ],
        "title": "EngageConversationPage"
      },
      "EngageConversationPriority": {
        "type": "string",
        "enum": [
          "low",
          "normal",
          "high",
          "urgent"
        ],
        "title": "EngageConversationPriority"
      },
      "EngageConversationStatus": {
        "type": "string",
        "enum": [
          "open",
          "pending",
          "snoozed",
          "resolved",
          "archived"
        ],
        "title": "EngageConversationStatus"
      },
      "EngageConversationUpdate": {
        "properties": {
          "contact_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Contact Id"
          },
          "status": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/EngageConversationStatus"
              },
              {
                "type": "null"
              }
            ]
          },
          "priority": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/EngageConversationPriority"
              },
              {
                "type": "null"
              }
            ]
          },
          "subject": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Subject"
          },
          "assigned_user_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Assigned User Id"
          },
          "ai_agent_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ai Agent Id"
          },
          "workspace_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Workspace Id"
          },
          "is_starred": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Is Starred"
          },
          "tags": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tags"
          },
          "extra_data": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Extra Data"
          }
        },
        "type": "object",
        "title": "EngageConversationUpdate"
      },
      "EngageMessageCreate": {
        "properties": {
          "content": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Content"
          },
          "html_content": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Html Content"
          },
          "content_type": {
            "type": "string",
            "title": "Content Type",
            "default": "text"
          },
          "attachments": {
            "anyOf": [
              {
                "items": {
                  "additionalProperties": true,
                  "type": "object"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Attachments"
          },
          "direction": {
            "$ref": "#/components/schemas/EngageMessageDirection",
            "default": "outbound"
          },
          "sender_type": {
            "$ref": "#/components/schemas/EngageSenderType",
            "default": "user"
          },
          "sender_user_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sender User Id"
          },
          "sender_contact_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sender Contact Id"
          },
          "sender_display_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sender Display Name"
          },
          "channel_message_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Channel Message Id"
          },
          "campaign_execution_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Campaign Execution Id"
          },
          "call_session_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Call Session Id"
          },
          "appointment_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Appointment Id"
          },
          "is_ai_generated": {
            "type": "boolean",
            "title": "Is Ai Generated",
            "default": false
          },
          "is_note": {
            "type": "boolean",
            "title": "Is Note",
            "default": false
          },
          "extra_data": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Extra Data"
          },
          "conversation_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Conversation Id"
          },
          "channel": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/EngageChannel"
              },
              {
                "type": "null"
              }
            ]
          },
          "contact_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Contact Id"
          },
          "subject": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Subject"
          },
          "whatsapp_account_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Whatsapp Account Id"
          },
          "meta_account_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta Account Id"
          },
          "include_signature": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Include Signature"
          }
        },
        "type": "object",
        "title": "EngageMessageCreate"
      },
      "EngageMessageDirection": {
        "type": "string",
        "enum": [
          "inbound",
          "outbound"
        ],
        "title": "EngageMessageDirection"
      },
      "EngageMessagePage": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/EngageMessageResponse"
            },
            "type": "array",
            "title": "Items"
          },
          "total": {
            "type": "integer",
            "title": "Total"
          },
          "has_more": {
            "type": "boolean",
            "title": "Has More",
            "default": false
          }
        },
        "type": "object",
        "required": [
          "items",
          "total"
        ],
        "title": "EngageMessagePage",
        "description": "One page of a thread, oldest first. `has_more` mirrors `X-Has-More`."
      },
      "EngageMessageResponse": {
        "properties": {
          "content": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Content"
          },
          "html_content": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Html Content"
          },
          "content_type": {
            "type": "string",
            "title": "Content Type",
            "default": "text"
          },
          "attachments": {
            "anyOf": [
              {
                "items": {
                  "additionalProperties": true,
                  "type": "object"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Attachments"
          },
          "direction": {
            "$ref": "#/components/schemas/EngageMessageDirection",
            "default": "outbound"
          },
          "sender_type": {
            "$ref": "#/components/schemas/EngageSenderType",
            "default": "user"
          },
          "sender_user_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sender User Id"
          },
          "sender_contact_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sender Contact Id"
          },
          "sender_display_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sender Display Name"
          },
          "channel_message_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Channel Message Id"
          },
          "campaign_execution_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Campaign Execution Id"
          },
          "call_session_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Call Session Id"
          },
          "appointment_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Appointment Id"
          },
          "is_ai_generated": {
            "type": "boolean",
            "title": "Is Ai Generated",
            "default": false
          },
          "is_note": {
            "type": "boolean",
            "title": "Is Note",
            "default": false
          },
          "extra_data": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Extra Data"
          },
          "id": {
            "type": "string",
            "title": "Id"
          },
          "conversation_id": {
            "type": "string",
            "title": "Conversation Id"
          },
          "organization_id": {
            "type": "string",
            "title": "Organization Id"
          },
          "status": {
            "$ref": "#/components/schemas/EngageMessageStatus"
          },
          "sent_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sent At"
          },
          "delivered_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Delivered At"
          },
          "read_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Read At"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "conversation_id",
          "organization_id",
          "status",
          "created_at"
        ],
        "title": "EngageMessageResponse"
      },
      "EngageMessageStatus": {
        "type": "string",
        "enum": [
          "draft",
          "queued",
          "sent",
          "delivered",
          "read",
          "failed"
        ],
        "title": "EngageMessageStatus"
      },
      "EngageSenderType": {
        "type": "string",
        "enum": [
          "user",
          "contact",
          "ai",
          "system"
        ],
        "title": "EngageSenderType"
      },
      "EngagementDataPoint": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "contacts": {
            "type": "integer",
            "title": "Contacts"
          },
          "conversations": {
            "type": "integer",
            "title": "Conversations"
          },
          "messages": {
            "type": "integer",
            "title": "Messages"
          },
          "visitors": {
            "type": "integer",
            "title": "Visitors"
          },
          "calls": {
            "type": "integer",
            "title": "Calls"
          }
        },
        "type": "object",
        "required": [
          "name",
          "contacts",
          "conversations",
          "messages",
          "visitors",
          "calls"
        ],
        "title": "EngagementDataPoint"
      },
      "ExecutionStatus": {
        "type": "string",
        "enum": [
          "pending",
          "in_progress",
          "waiting",
          "completed",
          "failed",
          "skipped",
          "bounced",
          "unsubscribed"
        ],
        "title": "ExecutionStatus"
      },
      "FolderCreatePayload": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "knowledge_type": {
            "type": "string",
            "title": "Knowledge Type",
            "default": "vector"
          },
          "vector_db_config_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "title": "Vector Db Config Id"
          },
          "graph_db_config_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "title": "Graph Db Config Id"
          },
          "vector_db_config": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Vector Db Config"
          },
          "graph_db_config": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Graph Db Config"
          },
          "parent_folder_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parent Folder Id"
          },
          "icon": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Icon"
          },
          "color": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Color"
          }
        },
        "type": "object",
        "required": [
          "name"
        ],
        "title": "FolderCreatePayload"
      },
      "GrowthDataPoint": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "contacts": {
            "type": "integer",
            "title": "Contacts"
          },
          "companies": {
            "type": "integer",
            "title": "Companies"
          }
        },
        "type": "object",
        "required": [
          "name",
          "contacts",
          "companies"
        ],
        "title": "GrowthDataPoint"
      },
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
          }
        },
        "type": "object",
        "title": "HTTPValidationError"
      },
      "KnowledgeDocumentResponse": {
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 500,
            "title": "Name"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "document_type": {
            "type": "string",
            "title": "Document Type"
          },
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "folder_id": {
            "type": "string",
            "format": "uuid",
            "title": "Folder Id"
          },
          "created_by": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created By"
          },
          "original_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Original Type"
          },
          "status": {
            "type": "string",
            "title": "Status",
            "default": "pending"
          },
          "error_message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error Message"
          },
          "source_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source Url"
          },
          "file_path": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "File Path"
          },
          "file_size": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "File Size"
          },
          "mime_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Mime Type"
          },
          "content": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Content"
          },
          "processed_content": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Processed Content"
          },
          "chunk_count": {
            "type": "integer",
            "title": "Chunk Count",
            "default": 0
          },
          "vector_ids": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Vector Ids"
          },
          "doc_metadata": {
            "additionalProperties": true,
            "type": "object",
            "title": "Doc Metadata"
          },
          "crawled_pages": {
            "anyOf": [
              {
                "items": {
                  "additionalProperties": true,
                  "type": "object"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Crawled Pages"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "updated_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          },
          "indexed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Indexed At"
          },
          "processing_started_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Processing Started At"
          },
          "processing_completed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Processing Completed At"
          }
        },
        "type": "object",
        "required": [
          "name",
          "document_type",
          "id",
          "folder_id",
          "created_at"
        ],
        "title": "KnowledgeDocumentResponse"
      },
      "KnowledgeFolderResponse": {
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 255,
            "title": "Name"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "knowledge_type": {
            "$ref": "#/components/schemas/KnowledgeType"
          },
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "organization_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "title": "Organization Id"
          },
          "created_by": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created By"
          },
          "vector_db_config_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "title": "Vector Db Config Id"
          },
          "graph_db_config_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "title": "Graph Db Config Id"
          },
          "vector_db_config": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Vector Db Config"
          },
          "graph_db_config": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Graph Db Config"
          },
          "document_count": {
            "type": "integer",
            "title": "Document Count",
            "default": 0
          },
          "total_chunks": {
            "type": "integer",
            "title": "Total Chunks",
            "default": 0
          },
          "storage_bytes": {
            "type": "integer",
            "title": "Storage Bytes",
            "default": 0
          },
          "icon": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Icon"
          },
          "color": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Color"
          },
          "parent_folder_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parent Folder Id"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "updated_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          }
        },
        "type": "object",
        "required": [
          "name",
          "knowledge_type",
          "id",
          "created_at"
        ],
        "title": "KnowledgeFolderResponse"
      },
      "KnowledgeFolderSummary": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "knowledge_type": {
            "type": "string",
            "title": "Knowledge Type"
          },
          "document_count": {
            "type": "integer",
            "title": "Document Count",
            "default": 0
          },
          "total_chunks": {
            "type": "integer",
            "title": "Total Chunks",
            "default": 0
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "knowledge_type"
        ],
        "title": "KnowledgeFolderSummary",
        "description": "Summary of a knowledge folder for agent responses"
      },
      "KnowledgeFolderUpdate": {
        "properties": {
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "vector_db_config_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "title": "Vector Db Config Id"
          },
          "graph_db_config_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "title": "Graph Db Config Id"
          },
          "vector_db_config": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Vector Db Config"
          },
          "graph_db_config": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Graph Db Config"
          },
          "icon": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Icon"
          },
          "color": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Color"
          }
        },
        "type": "object",
        "title": "KnowledgeFolderUpdate"
      },
      "KnowledgeSearchRequest": {
        "properties": {
          "query": {
            "type": "string",
            "title": "Query"
          },
          "folder_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "title": "Folder Id"
          },
          "top_k": {
            "type": "integer",
            "title": "Top K",
            "default": 5
          },
          "filter_dict": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Filter Dict"
          },
          "document_types": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Document Types"
          }
        },
        "type": "object",
        "required": [
          "query"
        ],
        "title": "KnowledgeSearchRequest"
      },
      "KnowledgeSearchResponse": {
        "properties": {
          "results": {
            "items": {
              "$ref": "#/components/schemas/KnowledgeSearchResult"
            },
            "type": "array",
            "title": "Results"
          },
          "total": {
            "type": "integer",
            "title": "Total"
          },
          "query": {
            "type": "string",
            "title": "Query"
          }
        },
        "type": "object",
        "required": [
          "results",
          "total",
          "query"
        ],
        "title": "KnowledgeSearchResponse"
      },
      "KnowledgeSearchResult": {
        "properties": {
          "document_id": {
            "type": "string",
            "title": "Document Id"
          },
          "document_name": {
            "type": "string",
            "title": "Document Name"
          },
          "chunk_id": {
            "type": "string",
            "title": "Chunk Id"
          },
          "content": {
            "type": "string",
            "title": "Content"
          },
          "score": {
            "type": "number",
            "title": "Score"
          },
          "metadata": {
            "additionalProperties": true,
            "type": "object",
            "title": "Metadata"
          }
        },
        "type": "object",
        "required": [
          "document_id",
          "document_name",
          "chunk_id",
          "content",
          "score",
          "metadata"
        ],
        "title": "KnowledgeSearchResult"
      },
      "KnowledgeStats": {
        "properties": {
          "total_folders": {
            "type": "integer",
            "title": "Total Folders"
          },
          "total_documents": {
            "type": "integer",
            "title": "Total Documents"
          },
          "total_chunks": {
            "type": "integer",
            "title": "Total Chunks"
          },
          "documents_by_type": {
            "additionalProperties": {
              "type": "integer"
            },
            "type": "object",
            "title": "Documents By Type"
          },
          "documents_by_status": {
            "additionalProperties": {
              "type": "integer"
            },
            "type": "object",
            "title": "Documents By Status"
          },
          "storage_used_bytes": {
            "type": "integer",
            "title": "Storage Used Bytes"
          }
        },
        "type": "object",
        "required": [
          "total_folders",
          "total_documents",
          "total_chunks",
          "documents_by_type",
          "documents_by_status",
          "storage_used_bytes"
        ],
        "title": "KnowledgeStats"
      },
      "KnowledgeType": {
        "type": "string",
        "enum": [
          "vector",
          "graph",
          "hybrid"
        ],
        "title": "KnowledgeType"
      },
      "LLMProvider": {
        "type": "string",
        "enum": [
          "openai",
          "anthropic",
          "google",
          "azure_openai",
          "groq"
        ],
        "title": "LLMProvider"
      },
      "Lead": {
        "properties": {
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Status"
          },
          "source": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source"
          },
          "source_details": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source Details"
          },
          "score": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Score"
          },
          "pipeline": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pipeline"
          },
          "pipeline_stage": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pipeline Stage"
          },
          "lifecycle_stage": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Lifecycle Stage"
          },
          "qualified_by": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Qualified By"
          },
          "lead_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Lead Type"
          },
          "converted": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Converted"
          },
          "converted_date": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Converted Date"
          },
          "crm_source": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Crm Source"
          },
          "owner_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Owner Id"
          },
          "assigned_to": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Assigned To"
          },
          "first_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "First Name"
          },
          "middle_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Middle Name"
          },
          "last_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Name"
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "phone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Phone"
          },
          "mobile_phone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Mobile Phone"
          },
          "personal_emails": {
            "anyOf": [
              {
                "items": {},
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Personal Emails"
          },
          "job_title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Job Title"
          },
          "linkedin_headline": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Linkedin Headline"
          },
          "linkedin_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Linkedin Url"
          },
          "company_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Company Name"
          },
          "company_domain": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Company Domain"
          },
          "company_website": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Company Website"
          },
          "company_phone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Company Phone"
          },
          "company_industry": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Company Industry"
          },
          "company_employee_count": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Company Employee Count"
          },
          "company_revenue": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Company Revenue"
          },
          "company_founded": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Company Founded"
          },
          "company_linkedin": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Company Linkedin"
          },
          "company_city": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Company City"
          },
          "company_state": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Company State"
          },
          "company_country": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Company Country"
          },
          "gender": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Gender"
          },
          "age": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Age"
          },
          "about": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "About"
          },
          "skills": {
            "anyOf": [
              {
                "items": {},
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Skills"
          },
          "interests": {
            "anyOf": [
              {
                "items": {},
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Interests"
          },
          "salary_range": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Salary Range"
          },
          "net_worth": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Net Worth"
          },
          "city": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "City"
          },
          "state": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "State"
          },
          "country": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Country"
          },
          "zip_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Zip Code"
          },
          "address": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Address"
          },
          "seniority": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Seniority"
          },
          "role": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Role"
          },
          "department": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Department"
          },
          "job_category": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Job Category"
          },
          "job_start_date": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Job Start Date"
          },
          "degree": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Degree"
          },
          "field_of_study": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Field Of Study"
          },
          "school": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "School"
          },
          "budget": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Budget"
          },
          "authority": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Authority"
          },
          "need": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Need"
          },
          "timeline": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Timeline"
          },
          "qualification_notes": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Qualification Notes"
          },
          "contact_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Contact Id"
          },
          "company_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Company Id"
          },
          "website": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Website"
          },
          "social_links": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Social Links"
          },
          "next_follow_up": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Follow Up"
          },
          "tags": {
            "anyOf": [
              {
                "items": {},
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tags"
          },
          "notes": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Notes"
          },
          "custom_fields": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Custom Fields"
          },
          "id": {
            "type": "string",
            "title": "Id"
          },
          "organization_id": {
            "type": "string",
            "title": "Organization Id"
          },
          "converted_to_prospect_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Converted To Prospect Id"
          },
          "last_contacted": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Contacted"
          },
          "interaction_count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Interaction Count"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "updated_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          },
          "contact_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Contact Name"
          }
        },
        "type": "object",
        "required": [
          "id",
          "organization_id",
          "created_at"
        ],
        "title": "Lead"
      },
      "LeadCreate": {
        "properties": {
          "contact": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RecordContactInput"
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Status"
          },
          "source": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source"
          },
          "source_details": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source Details"
          },
          "score": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Score"
          },
          "pipeline": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pipeline"
          },
          "pipeline_stage": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pipeline Stage"
          },
          "lifecycle_stage": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Lifecycle Stage"
          },
          "qualified_by": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Qualified By"
          },
          "lead_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Lead Type"
          },
          "converted": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Converted"
          },
          "converted_date": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Converted Date"
          },
          "crm_source": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Crm Source"
          },
          "owner_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Owner Id"
          },
          "assigned_to": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Assigned To"
          },
          "first_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "First Name"
          },
          "middle_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Middle Name"
          },
          "last_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Name"
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "phone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Phone"
          },
          "mobile_phone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Mobile Phone"
          },
          "personal_emails": {
            "anyOf": [
              {
                "items": {},
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Personal Emails"
          },
          "job_title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Job Title"
          },
          "linkedin_headline": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Linkedin Headline"
          },
          "linkedin_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Linkedin Url"
          },
          "company_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Company Name"
          },
          "company_domain": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Company Domain"
          },
          "company_website": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Company Website"
          },
          "company_phone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Company Phone"
          },
          "company_industry": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Company Industry"
          },
          "company_employee_count": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Company Employee Count"
          },
          "company_revenue": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Company Revenue"
          },
          "company_founded": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Company Founded"
          },
          "company_linkedin": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Company Linkedin"
          },
          "company_city": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Company City"
          },
          "company_state": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Company State"
          },
          "company_country": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Company Country"
          },
          "gender": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Gender"
          },
          "age": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Age"
          },
          "about": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "About"
          },
          "skills": {
            "anyOf": [
              {
                "items": {},
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Skills"
          },
          "interests": {
            "anyOf": [
              {
                "items": {},
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Interests"
          },
          "salary_range": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Salary Range"
          },
          "net_worth": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Net Worth"
          },
          "city": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "City"
          },
          "state": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "State"
          },
          "country": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Country"
          },
          "zip_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Zip Code"
          },
          "address": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Address"
          },
          "seniority": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Seniority"
          },
          "role": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Role"
          },
          "department": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Department"
          },
          "job_category": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Job Category"
          },
          "job_start_date": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Job Start Date"
          },
          "degree": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Degree"
          },
          "field_of_study": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Field Of Study"
          },
          "school": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "School"
          },
          "budget": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Budget"
          },
          "authority": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Authority"
          },
          "need": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Need"
          },
          "timeline": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Timeline"
          },
          "qualification_notes": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Qualification Notes"
          },
          "contact_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Contact Id"
          },
          "company_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Company Id"
          },
          "website": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Website"
          },
          "social_links": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Social Links"
          },
          "next_follow_up": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Follow Up"
          },
          "tags": {
            "anyOf": [
              {
                "items": {},
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tags"
          },
          "notes": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Notes"
          },
          "custom_fields": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Custom Fields"
          },
          "organization_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Organization Id"
          }
        },
        "type": "object",
        "title": "LeadCreate"
      },
      "LeadUpdate": {
        "properties": {
          "contact": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RecordContactInput"
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Status"
          },
          "source": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source"
          },
          "source_details": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source Details"
          },
          "score": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Score"
          },
          "pipeline": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pipeline"
          },
          "pipeline_stage": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pipeline Stage"
          },
          "lifecycle_stage": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Lifecycle Stage"
          },
          "qualified_by": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Qualified By"
          },
          "lead_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Lead Type"
          },
          "converted": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Converted"
          },
          "converted_date": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Converted Date"
          },
          "crm_source": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Crm Source"
          },
          "owner_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Owner Id"
          },
          "assigned_to": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Assigned To"
          },
          "first_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "First Name"
          },
          "middle_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Middle Name"
          },
          "last_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Name"
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "phone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Phone"
          },
          "mobile_phone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Mobile Phone"
          },
          "personal_emails": {
            "anyOf": [
              {
                "items": {},
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Personal Emails"
          },
          "job_title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Job Title"
          },
          "linkedin_headline": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Linkedin Headline"
          },
          "linkedin_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Linkedin Url"
          },
          "company_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Company Name"
          },
          "company_domain": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Company Domain"
          },
          "company_website": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Company Website"
          },
          "company_phone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Company Phone"
          },
          "company_industry": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Company Industry"
          },
          "company_employee_count": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Company Employee Count"
          },
          "company_revenue": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Company Revenue"
          },
          "company_founded": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Company Founded"
          },
          "company_linkedin": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Company Linkedin"
          },
          "company_city": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Company City"
          },
          "company_state": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Company State"
          },
          "company_country": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Company Country"
          },
          "gender": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Gender"
          },
          "age": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Age"
          },
          "about": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "About"
          },
          "skills": {
            "anyOf": [
              {
                "items": {},
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Skills"
          },
          "interests": {
            "anyOf": [
              {
                "items": {},
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Interests"
          },
          "salary_range": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Salary Range"
          },
          "net_worth": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Net Worth"
          },
          "city": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "City"
          },
          "state": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "State"
          },
          "country": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Country"
          },
          "zip_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Zip Code"
          },
          "address": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Address"
          },
          "seniority": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Seniority"
          },
          "role": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Role"
          },
          "department": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Department"
          },
          "job_category": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Job Category"
          },
          "job_start_date": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Job Start Date"
          },
          "degree": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Degree"
          },
          "field_of_study": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Field Of Study"
          },
          "school": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "School"
          },
          "budget": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Budget"
          },
          "authority": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Authority"
          },
          "need": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Need"
          },
          "timeline": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Timeline"
          },
          "qualification_notes": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Qualification Notes"
          },
          "contact_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Contact Id"
          },
          "company_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Company Id"
          },
          "website": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Website"
          },
          "social_links": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Social Links"
          },
          "next_follow_up": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Follow Up"
          },
          "tags": {
            "anyOf": [
              {
                "items": {},
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tags"
          },
          "notes": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Notes"
          },
          "custom_fields": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Custom Fields"
          },
          "converted_to_prospect_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Converted To Prospect Id"
          },
          "last_contacted": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Contacted"
          },
          "interaction_count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Interaction Count"
          }
        },
        "type": "object",
        "title": "LeadUpdate"
      },
      "ListAddContactsResponse": {
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 255,
            "minLength": 1,
            "title": "Name"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "is_active": {
            "type": "boolean",
            "title": "Is Active",
            "default": true
          },
          "is_dynamic": {
            "type": "boolean",
            "title": "Is Dynamic",
            "default": false
          },
          "dynamic_criteria": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Dynamic Criteria"
          },
          "id": {
            "type": "string",
            "title": "Id"
          },
          "organization_id": {
            "type": "string",
            "title": "Organization Id"
          },
          "contact_count": {
            "type": "integer",
            "title": "Contact Count"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "updated_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          },
          "created_by": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created By"
          },
          "added": {
            "type": "integer",
            "title": "Added",
            "default": 0
          },
          "already_present": {
            "type": "integer",
            "title": "Already Present",
            "default": 0
          },
          "not_found": {
            "type": "integer",
            "title": "Not Found",
            "default": 0
          }
        },
        "type": "object",
        "required": [
          "name",
          "id",
          "organization_id",
          "contact_count",
          "created_at"
        ],
        "title": "ListAddContactsResponse",
        "description": "The updated list plus the outcome of the add."
      },
      "ListBasic": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          }
        },
        "type": "object",
        "required": [
          "id",
          "name"
        ],
        "title": "ListBasic",
        "description": "Basic list info for contact associations"
      },
      "ListContactOperation": {
        "properties": {
          "contact_ids": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "minItems": 1,
            "title": "Contact Ids"
          }
        },
        "type": "object",
        "required": [
          "contact_ids"
        ],
        "title": "ListContactOperation"
      },
      "ListCreate": {
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 255,
            "minLength": 1,
            "title": "Name"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "is_active": {
            "type": "boolean",
            "title": "Is Active",
            "default": true
          },
          "is_dynamic": {
            "type": "boolean",
            "title": "Is Dynamic",
            "default": false
          },
          "dynamic_criteria": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Dynamic Criteria"
          }
        },
        "type": "object",
        "required": [
          "name"
        ],
        "title": "ListCreate"
      },
      "ListRemoveContactsResponse": {
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 255,
            "minLength": 1,
            "title": "Name"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "is_active": {
            "type": "boolean",
            "title": "Is Active",
            "default": true
          },
          "is_dynamic": {
            "type": "boolean",
            "title": "Is Dynamic",
            "default": false
          },
          "dynamic_criteria": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Dynamic Criteria"
          },
          "id": {
            "type": "string",
            "title": "Id"
          },
          "organization_id": {
            "type": "string",
            "title": "Organization Id"
          },
          "contact_count": {
            "type": "integer",
            "title": "Contact Count"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "updated_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          },
          "created_by": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created By"
          },
          "removed": {
            "type": "integer",
            "title": "Removed",
            "default": 0
          },
          "not_in_list": {
            "type": "integer",
            "title": "Not In List",
            "default": 0
          }
        },
        "type": "object",
        "required": [
          "name",
          "id",
          "organization_id",
          "contact_count",
          "created_at"
        ],
        "title": "ListRemoveContactsResponse",
        "description": "The updated list plus the outcome of the removal."
      },
      "ListResponse": {
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 255,
            "minLength": 1,
            "title": "Name"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "is_active": {
            "type": "boolean",
            "title": "Is Active",
            "default": true
          },
          "is_dynamic": {
            "type": "boolean",
            "title": "Is Dynamic",
            "default": false
          },
          "dynamic_criteria": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Dynamic Criteria"
          },
          "id": {
            "type": "string",
            "title": "Id"
          },
          "organization_id": {
            "type": "string",
            "title": "Organization Id"
          },
          "contact_count": {
            "type": "integer",
            "title": "Contact Count"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "updated_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          },
          "created_by": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created By"
          }
        },
        "type": "object",
        "required": [
          "name",
          "id",
          "organization_id",
          "contact_count",
          "created_at"
        ],
        "title": "ListResponse"
      },
      "ListUpdate": {
        "properties": {
          "name": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 255,
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "is_active": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Is Active"
          },
          "is_dynamic": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Is Dynamic"
          },
          "dynamic_criteria": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Dynamic Criteria"
          }
        },
        "type": "object",
        "title": "ListUpdate"
      },
      "ListWithContacts": {
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 255,
            "minLength": 1,
            "title": "Name"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "is_active": {
            "type": "boolean",
            "title": "Is Active",
            "default": true
          },
          "is_dynamic": {
            "type": "boolean",
            "title": "Is Dynamic",
            "default": false
          },
          "dynamic_criteria": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Dynamic Criteria"
          },
          "id": {
            "type": "string",
            "title": "Id"
          },
          "organization_id": {
            "type": "string",
            "title": "Organization Id"
          },
          "contact_count": {
            "type": "integer",
            "title": "Contact Count"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "updated_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          },
          "created_by": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created By"
          },
          "contacts": {
            "items": {
              "$ref": "#/components/schemas/Contact"
            },
            "type": "array",
            "title": "Contacts",
            "default": []
          }
        },
        "type": "object",
        "required": [
          "name",
          "id",
          "organization_id",
          "contact_count",
          "created_at"
        ],
        "title": "ListWithContacts"
      },
      "MarkdownCreatePayload": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "content": {
            "type": "string",
            "title": "Content"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          }
        },
        "type": "object",
        "required": [
          "name",
          "content"
        ],
        "title": "MarkdownCreatePayload"
      },
      "MessageSenderType": {
        "type": "string",
        "enum": [
          "customer",
          "agent",
          "ai",
          "system"
        ],
        "title": "MessageSenderType"
      },
      "MessageType": {
        "type": "string",
        "enum": [
          "text",
          "note",
          "attachment",
          "system"
        ],
        "title": "MessageType"
      },
      "PaginatedCallSessions": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/CallSessionResponse"
            },
            "type": "array",
            "title": "Items"
          },
          "total": {
            "type": "integer",
            "title": "Total"
          },
          "skip": {
            "type": "integer",
            "title": "Skip"
          },
          "limit": {
            "type": "integer",
            "title": "Limit"
          }
        },
        "type": "object",
        "required": [
          "items",
          "total",
          "skip",
          "limit"
        ],
        "title": "PaginatedCallSessions"
      },
      "ParticipantRole": {
        "type": "string",
        "enum": [
          "owner",
          "collaborator",
          "observer"
        ],
        "title": "ParticipantRole"
      },
      "ParticipantSchema": {
        "properties": {
          "user_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "User Id"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "role": {
            "type": "string",
            "title": "Role",
            "default": "attendee"
          },
          "rsvp": {
            "type": "string",
            "title": "Rsvp",
            "default": "pending"
          }
        },
        "type": "object",
        "title": "ParticipantSchema"
      },
      "PerformanceStatsWithMix": {
        "properties": {
          "total_calls": {
            "type": "integer",
            "title": "Total Calls",
            "default": 0
          },
          "completed_calls": {
            "type": "integer",
            "title": "Completed Calls",
            "default": 0
          },
          "connected_calls": {
            "type": "integer",
            "title": "Connected Calls",
            "default": 0
          },
          "avg_duration_seconds": {
            "type": "number",
            "title": "Avg Duration Seconds",
            "default": 0
          },
          "total_talk_time_seconds": {
            "type": "number",
            "title": "Total Talk Time Seconds",
            "default": 0
          },
          "meetings_booked": {
            "type": "integer",
            "title": "Meetings Booked",
            "default": 0
          },
          "disposition_breakdown": {
            "items": {
              "$ref": "#/components/schemas/DispositionBreakdown"
            },
            "type": "array",
            "title": "Disposition Breakdown",
            "default": []
          },
          "calls_by_day": {
            "items": {
              "$ref": "#/components/schemas/DailyCallCount"
            },
            "type": "array",
            "title": "Calls By Day",
            "default": []
          },
          "ai_calls": {
            "type": "integer",
            "title": "Ai Calls",
            "default": 0
          },
          "human_calls": {
            "type": "integer",
            "title": "Human Calls",
            "default": 0
          },
          "caller_type_breakdown": {
            "items": {
              "$ref": "#/components/schemas/CallerTypeStats"
            },
            "type": "array",
            "title": "Caller Type Breakdown",
            "default": []
          },
          "disposition_by_caller_type": {
            "items": {
              "$ref": "#/components/schemas/CallerTypeDisposition"
            },
            "type": "array",
            "title": "Disposition By Caller Type",
            "default": []
          },
          "summarized_calls": {
            "type": "integer",
            "title": "Summarized Calls",
            "default": 0
          }
        },
        "type": "object",
        "title": "PerformanceStatsWithMix",
        "description": "Dialer KPIs plus who placed the calls (AI or a person) and how each\ngroup's calls ended. All from stored call logs."
      },
      "Product": {
        "properties": {
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "sku": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sku"
          },
          "product_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Product Type"
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Status"
          },
          "unit_price": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Unit Price"
          },
          "currency": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Currency",
            "default": "USD"
          },
          "billing_interval": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Billing Interval"
          },
          "setup_fee": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Setup Fee"
          },
          "stripe_product_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Stripe Product Id"
          },
          "stripe_price_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Stripe Price Id"
          },
          "category": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Category"
          },
          "tags": {
            "anyOf": [
              {
                "items": {},
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tags"
          },
          "features": {
            "anyOf": [
              {
                "items": {},
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Features"
          },
          "custom_fields": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Custom Fields"
          },
          "product_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Product Url"
          },
          "image_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Image Url"
          },
          "id": {
            "type": "string",
            "title": "Id"
          },
          "organization_id": {
            "type": "string",
            "title": "Organization Id"
          },
          "total_revenue": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Total Revenue"
          },
          "active_subscriptions": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Active Subscriptions"
          },
          "won_deal_count": {
            "type": "integer",
            "title": "Won Deal Count",
            "default": 0
          },
          "variants": {
            "items": {
              "$ref": "#/components/schemas/ProductVariant"
            },
            "type": "array",
            "title": "Variants",
            "default": []
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "updated_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "organization_id",
          "created_at"
        ],
        "title": "Product"
      },
      "ProductCreate": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "sku": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sku"
          },
          "product_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Product Type"
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Status"
          },
          "unit_price": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string",
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Unit Price"
          },
          "currency": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Currency",
            "default": "USD"
          },
          "billing_interval": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Billing Interval"
          },
          "setup_fee": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string",
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Setup Fee"
          },
          "stripe_product_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Stripe Product Id"
          },
          "stripe_price_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Stripe Price Id"
          },
          "category": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Category"
          },
          "tags": {
            "anyOf": [
              {
                "items": {},
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tags"
          },
          "features": {
            "anyOf": [
              {
                "items": {},
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Features"
          },
          "custom_fields": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Custom Fields"
          },
          "product_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Product Url"
          },
          "image_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Image Url"
          },
          "organization_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Organization Id"
          }
        },
        "type": "object",
        "required": [
          "name"
        ],
        "title": "ProductCreate"
      },
      "ProductUpdate": {
        "properties": {
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "sku": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sku"
          },
          "product_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Product Type"
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Status"
          },
          "unit_price": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string",
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Unit Price"
          },
          "currency": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Currency",
            "default": "USD"
          },
          "billing_interval": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Billing Interval"
          },
          "setup_fee": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string",
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Setup Fee"
          },
          "stripe_product_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Stripe Product Id"
          },
          "stripe_price_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Stripe Price Id"
          },
          "category": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Category"
          },
          "tags": {
            "anyOf": [
              {
                "items": {},
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tags"
          },
          "features": {
            "anyOf": [
              {
                "items": {},
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Features"
          },
          "custom_fields": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Custom Fields"
          },
          "product_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Product Url"
          },
          "image_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Image Url"
          }
        },
        "type": "object",
        "title": "ProductUpdate"
      },
      "ProductVariant": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "sku": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sku"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "unit_price": {
            "type": "string",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Unit Price"
          },
          "currency": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Currency"
          },
          "billing_interval": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Billing Interval"
          },
          "is_default": {
            "type": "boolean",
            "title": "Is Default",
            "default": false
          },
          "status": {
            "type": "string",
            "title": "Status",
            "default": "active"
          },
          "sort_order": {
            "type": "integer",
            "title": "Sort Order",
            "default": 0
          },
          "attributes": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Attributes"
          },
          "id": {
            "type": "string",
            "title": "Id"
          },
          "product_id": {
            "type": "string",
            "title": "Product Id"
          },
          "created_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          },
          "updated_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          }
        },
        "type": "object",
        "required": [
          "name",
          "unit_price",
          "id",
          "product_id"
        ],
        "title": "ProductVariant"
      },
      "Prospect": {
        "properties": {
          "company_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Company Name"
          },
          "domain": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Domain"
          },
          "industry": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Industry"
          },
          "employees": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Employees"
          },
          "revenue": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Revenue"
          },
          "headquarters": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Headquarters"
          },
          "country": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Country"
          },
          "website": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Website"
          },
          "phone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Phone"
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Status"
          },
          "owner_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Owner Id"
          },
          "owner_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Owner Name"
          },
          "stakeholders": {
            "anyOf": [
              {
                "items": {},
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Stakeholders"
          },
          "primary_contact_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Primary Contact Id"
          },
          "company_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Company Id"
          },
          "next_step": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Step"
          },
          "next_step_date": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Step Date"
          },
          "tags": {
            "anyOf": [
              {
                "items": {},
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tags"
          },
          "notes": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Notes"
          },
          "custom_fields": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Custom Fields"
          },
          "id": {
            "type": "string",
            "title": "Id"
          },
          "organization_id": {
            "type": "string",
            "title": "Organization Id"
          },
          "deal_count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Deal Count"
          },
          "total_deal_value": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Total Deal Value"
          },
          "last_interaction": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Interaction"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "updated_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          },
          "contact_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Contact Name"
          },
          "contact_email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Contact Email"
          },
          "contact_job_title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Contact Job Title"
          },
          "list_names": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "List Names"
          },
          "list_ids": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "List Ids"
          }
        },
        "type": "object",
        "required": [
          "id",
          "organization_id",
          "created_at"
        ],
        "title": "Prospect"
      },
      "ProspectCreate": {
        "properties": {
          "contact": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RecordContactInput"
              },
              {
                "type": "null"
              }
            ]
          },
          "company_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Company Name"
          },
          "domain": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Domain"
          },
          "industry": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Industry"
          },
          "employees": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Employees"
          },
          "revenue": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Revenue"
          },
          "headquarters": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Headquarters"
          },
          "country": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Country"
          },
          "website": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Website"
          },
          "phone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Phone"
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Status"
          },
          "owner_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Owner Id"
          },
          "owner_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Owner Name"
          },
          "stakeholders": {
            "anyOf": [
              {
                "items": {},
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Stakeholders"
          },
          "primary_contact_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Primary Contact Id"
          },
          "company_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Company Id"
          },
          "next_step": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Step"
          },
          "next_step_date": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Step Date"
          },
          "tags": {
            "anyOf": [
              {
                "items": {},
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tags"
          },
          "notes": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Notes"
          },
          "custom_fields": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Custom Fields"
          },
          "organization_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Organization Id"
          }
        },
        "type": "object",
        "title": "ProspectCreate"
      },
      "ProspectUpdate": {
        "properties": {
          "contact": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RecordContactInput"
              },
              {
                "type": "null"
              }
            ]
          },
          "company_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Company Name"
          },
          "domain": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Domain"
          },
          "industry": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Industry"
          },
          "employees": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Employees"
          },
          "revenue": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Revenue"
          },
          "headquarters": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Headquarters"
          },
          "country": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Country"
          },
          "website": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Website"
          },
          "phone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Phone"
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Status"
          },
          "owner_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Owner Id"
          },
          "owner_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Owner Name"
          },
          "stakeholders": {
            "anyOf": [
              {
                "items": {},
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Stakeholders"
          },
          "primary_contact_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Primary Contact Id"
          },
          "company_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Company Id"
          },
          "next_step": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Step"
          },
          "next_step_date": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Step Date"
          },
          "tags": {
            "anyOf": [
              {
                "items": {},
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tags"
          },
          "notes": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Notes"
          },
          "custom_fields": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Custom Fields"
          },
          "deal_count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Deal Count"
          },
          "total_deal_value": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string",
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Total Deal Value"
          },
          "last_interaction": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Interaction"
          }
        },
        "type": "object",
        "title": "ProspectUpdate"
      },
      "PublicError": {
        "title": "PublicError",
        "type": "object",
        "properties": {
          "detail": {
            "type": "string",
            "description": "A human-readable error message."
          }
        },
        "required": [
          "detail"
        ]
      },
      "RecentActivity": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "type": {
            "type": "string",
            "title": "Type"
          },
          "title": {
            "type": "string",
            "title": "Title"
          },
          "description": {
            "type": "string",
            "title": "Description"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp"
          },
          "color": {
            "type": "string",
            "title": "Color"
          }
        },
        "type": "object",
        "required": [
          "id",
          "type",
          "title",
          "description",
          "timestamp",
          "color"
        ],
        "title": "RecentActivity"
      },
      "RecordContactInput": {
        "properties": {
          "first_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "First Name"
          },
          "last_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Name"
          },
          "email": {
            "anyOf": [
              {
                "type": "string",
                "format": "email"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "phone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Phone"
          },
          "job_title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Job Title"
          }
        },
        "type": "object",
        "title": "RecordContactInput",
        "description": "The person on a record when no contact id is given."
      },
      "RecurrenceRule": {
        "type": "string",
        "enum": [
          "none",
          "daily",
          "weekly",
          "biweekly",
          "monthly"
        ],
        "title": "RecurrenceRule"
      },
      "ReminderSchema": {
        "properties": {
          "minutes_before": {
            "type": "integer",
            "title": "Minutes Before",
            "default": 15
          },
          "type": {
            "type": "string",
            "title": "Type",
            "default": "email"
          }
        },
        "type": "object",
        "title": "ReminderSchema"
      },
      "ResearchStatusResponse": {
        "properties": {
          "task_id": {
            "type": "string",
            "title": "Task Id"
          },
          "status": {
            "type": "string",
            "title": "Status"
          },
          "results": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Results"
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          },
          "progress": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Progress"
          },
          "current_phase": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Current Phase"
          },
          "progress_message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Progress Message"
          }
        },
        "type": "object",
        "required": [
          "task_id",
          "status"
        ],
        "title": "ResearchStatusResponse"
      },
      "ReviewDecisionRequest": {
        "properties": {
          "decision": {
            "type": "string",
            "pattern": "^(approve|edit|cancel|accept|continue|stop)$",
            "title": "Decision"
          },
          "queries": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Queries"
          },
          "note": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Note"
          }
        },
        "type": "object",
        "required": [
          "decision"
        ],
        "title": "ReviewDecisionRequest",
        "description": "Answer to a review point (plan_review or quality_review)."
      },
      "ScheduledCallCreate": {
        "properties": {
          "phone_number": {
            "type": "string",
            "title": "Phone Number"
          },
          "contact_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Contact Name"
          },
          "scheduled_at": {
            "type": "string",
            "format": "date-time",
            "title": "Scheduled At"
          },
          "objective": {
            "type": "string",
            "title": "Objective"
          },
          "voice_agent_id": {
            "type": "string",
            "title": "Voice Agent Id"
          },
          "contact_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Contact Id"
          },
          "max_retries": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Retries",
            "default": 2
          },
          "extra_data": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Extra Data"
          }
        },
        "type": "object",
        "required": [
          "phone_number",
          "scheduled_at",
          "objective",
          "voice_agent_id"
        ],
        "title": "ScheduledCallCreate"
      },
      "ScheduledCallListResponse": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/ScheduledCallResponse"
            },
            "type": "array",
            "title": "Items"
          },
          "total": {
            "type": "integer",
            "title": "Total"
          }
        },
        "type": "object",
        "required": [
          "items",
          "total"
        ],
        "title": "ScheduledCallListResponse"
      },
      "ScheduledCallResponse": {
        "properties": {
          "phone_number": {
            "type": "string",
            "title": "Phone Number"
          },
          "contact_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Contact Name"
          },
          "scheduled_at": {
            "type": "string",
            "format": "date-time",
            "title": "Scheduled At"
          },
          "objective": {
            "type": "string",
            "title": "Objective"
          },
          "id": {
            "type": "string",
            "title": "Id"
          },
          "voice_agent_id": {
            "type": "string",
            "title": "Voice Agent Id"
          },
          "organization_id": {
            "type": "string",
            "title": "Organization Id"
          },
          "contact_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Contact Id"
          },
          "status": {
            "$ref": "#/components/schemas/ScheduledCallStatus"
          },
          "call_log_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Call Log Id"
          },
          "retry_count": {
            "type": "integer",
            "title": "Retry Count",
            "default": 0
          },
          "max_retries": {
            "type": "integer",
            "title": "Max Retries",
            "default": 2
          },
          "error_message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error Message"
          },
          "extra_data": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Extra Data"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "updated_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          }
        },
        "type": "object",
        "required": [
          "phone_number",
          "scheduled_at",
          "objective",
          "id",
          "voice_agent_id",
          "organization_id",
          "status",
          "created_at"
        ],
        "title": "ScheduledCallResponse"
      },
      "ScheduledCallStatus": {
        "type": "string",
        "enum": [
          "pending",
          "in_progress",
          "completed",
          "failed",
          "cancelled"
        ],
        "title": "ScheduledCallStatus"
      },
      "ScheduledCallUpdate": {
        "properties": {
          "phone_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Phone Number"
          },
          "contact_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Contact Name"
          },
          "scheduled_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Scheduled At"
          },
          "objective": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Objective"
          },
          "status": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ScheduledCallStatus"
              },
              {
                "type": "null"
              }
            ]
          },
          "call_log_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Call Log Id"
          },
          "error_message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error Message"
          },
          "extra_data": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Extra Data"
          }
        },
        "type": "object",
        "title": "ScheduledCallUpdate"
      },
      "SendWindow": {
        "properties": {
          "days": {
            "items": {
              "type": "integer"
            },
            "type": "array",
            "title": "Days"
          },
          "start": {
            "type": "string",
            "title": "Start"
          },
          "end": {
            "type": "string",
            "title": "End"
          }
        },
        "type": "object",
        "required": [
          "days",
          "start",
          "end"
        ],
        "title": "SendWindow",
        "description": "Send window configuration.\n\n`days` uses ISO weekday numbers - 1=Monday ... 7=Sunday - which is what\nthe executor compares against (`weekday() + 1`). Rows saved by older\nclients used JavaScript numbering (0=Sunday); a 0 is normalised to 7 so\nthose windows keep meaning what the user picked."
      },
      "StepConditionType": {
        "type": "string",
        "enum": [
          "email_opened",
          "email_clicked",
          "email_replied",
          "sms_replied",
          "call_answered",
          "call_completed",
          "meeting_booked",
          "link_clicked",
          "form_submitted",
          "contact_replied",
          "custom_event",
          "time_elapsed",
          "contact_attribute"
        ],
        "title": "StepConditionType"
      },
      "StepReviewStatus": {
        "type": "string",
        "enum": [
          "pending",
          "generated",
          "reviewed",
          "edited"
        ],
        "title": "StepReviewStatus",
        "description": "Per-step review state for the generate-copy → review → launch flow."
      },
      "StepType": {
        "type": "string",
        "enum": [
          "message",
          "ai_message",
          "wait",
          "condition",
          "ai_agent",
          "webhook",
          "update_contact",
          "add_to_list",
          "remove_from_list",
          "end"
        ],
        "title": "StepType"
      },
      "SupportCategoryResponse": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "color": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Color"
          },
          "icon": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Icon"
          },
          "sort_order": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sort Order",
            "default": 0
          },
          "id": {
            "type": "string",
            "title": "Id"
          },
          "organization_id": {
            "type": "string",
            "title": "Organization Id"
          },
          "is_active": {
            "type": "boolean",
            "title": "Is Active",
            "default": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "updated_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          }
        },
        "type": "object",
        "required": [
          "name",
          "id",
          "organization_id",
          "created_at"
        ],
        "title": "SupportCategoryResponse"
      },
      "SupportContactCreate": {
        "properties": {
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "phone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Phone"
          },
          "company": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Company"
          },
          "job_title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Job Title"
          },
          "location": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Location"
          },
          "timezone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Timezone"
          },
          "language": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Language"
          },
          "avatar_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Avatar Url"
          },
          "custom_attributes": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Custom Attributes"
          },
          "tags": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tags"
          },
          "browser": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Browser"
          },
          "os": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Os"
          },
          "device": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Device"
          },
          "ip_address": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ip Address"
          },
          "current_page_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Current Page Url"
          },
          "contact_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Contact Id"
          }
        },
        "type": "object",
        "title": "SupportContactCreate"
      },
      "SupportContactResponse": {
        "properties": {
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "phone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Phone"
          },
          "company": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Company"
          },
          "job_title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Job Title"
          },
          "location": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Location"
          },
          "timezone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Timezone"
          },
          "language": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Language"
          },
          "avatar_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Avatar Url"
          },
          "custom_attributes": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Custom Attributes"
          },
          "tags": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tags"
          },
          "id": {
            "type": "string",
            "title": "Id"
          },
          "organization_id": {
            "type": "string",
            "title": "Organization Id"
          },
          "browser": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Browser"
          },
          "os": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Os"
          },
          "device": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Device"
          },
          "ip_address": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ip Address"
          },
          "current_page_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Current Page Url"
          },
          "contact_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Contact Id"
          },
          "first_seen_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "First Seen At"
          },
          "last_seen_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Seen At"
          },
          "total_conversations": {
            "type": "integer",
            "title": "Total Conversations",
            "default": 0
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "updated_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "organization_id",
          "created_at"
        ],
        "title": "SupportContactResponse"
      },
      "SupportConversationCreate": {
        "properties": {
          "subject": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Subject"
          },
          "channel": {
            "$ref": "#/components/schemas/ConversationChannel",
            "default": "manual"
          },
          "priority": {
            "$ref": "#/components/schemas/ConversationPriority",
            "default": "normal"
          },
          "folder_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Folder Id"
          },
          "category_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Category Id"
          },
          "customer_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Id"
          },
          "assigned_agent_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Assigned Agent Id"
          },
          "assigned_user_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Assigned User Id"
          },
          "tags": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tags"
          },
          "metadata": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Metadata"
          },
          "whatsapp_account_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Whatsapp Account Id"
          },
          "channel_thread_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Channel Thread Key"
          },
          "customer": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SupportContactCreate"
              },
              {
                "type": "null"
              }
            ]
          },
          "initial_message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Initial Message"
          }
        },
        "type": "object",
        "title": "SupportConversationCreate"
      },
      "SupportConversationListResponse": {
        "properties": {
          "conversations": {
            "items": {
              "$ref": "#/components/schemas/SupportConversationResponse"
            },
            "type": "array",
            "title": "Conversations"
          },
          "total": {
            "type": "integer",
            "title": "Total"
          },
          "has_more": {
            "type": "boolean",
            "title": "Has More",
            "default": false
          }
        },
        "type": "object",
        "required": [
          "conversations",
          "total"
        ],
        "title": "SupportConversationListResponse"
      },
      "SupportConversationResponse": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "organization_id": {
            "type": "string",
            "title": "Organization Id"
          },
          "subject": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Subject"
          },
          "status": {
            "$ref": "#/components/schemas/ConversationStatus"
          },
          "priority": {
            "$ref": "#/components/schemas/ConversationPriority"
          },
          "channel": {
            "$ref": "#/components/schemas/ConversationChannel"
          },
          "customer_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Id"
          },
          "whatsapp_account_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Whatsapp Account Id"
          },
          "meta_account_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta Account Id"
          },
          "channel_thread_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Channel Thread Key"
          },
          "folder_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Folder Id"
          },
          "category_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Category Id"
          },
          "assigned_agent_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Assigned Agent Id"
          },
          "assigned_user_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Assigned User Id"
          },
          "tags": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tags"
          },
          "message_count": {
            "type": "integer",
            "title": "Message Count",
            "default": 0
          },
          "unread_count": {
            "type": "integer",
            "title": "Unread Count",
            "default": 0
          },
          "last_message_preview": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Message Preview"
          },
          "last_message_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Message At"
          },
          "last_message_sender": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/MessageSenderType"
              },
              {
                "type": "null"
              }
            ]
          },
          "csat_score": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Csat Score"
          },
          "first_response_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "First Response At"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "updated_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          },
          "resolved_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Resolved At"
          },
          "closed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Closed At"
          },
          "extra_metadata": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Extra Metadata"
          },
          "transferred_to": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Transferred To"
          },
          "ai_paused": {
            "type": "boolean",
            "title": "Ai Paused",
            "default": false
          },
          "ai_pause_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ai Pause Reason"
          },
          "needs_human": {
            "type": "boolean",
            "title": "Needs Human",
            "default": false
          },
          "handoff": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Handoff"
          },
          "customer": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SupportContactResponse"
              },
              {
                "type": "null"
              }
            ]
          },
          "folder": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SupportFolderResponse"
              },
              {
                "type": "null"
              }
            ]
          },
          "category": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SupportCategoryResponse"
              },
              {
                "type": "null"
              }
            ]
          },
          "participants": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/SupportParticipantResponse"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Participants"
          },
          "assigned_user_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Assigned User Name"
          }
        },
        "type": "object",
        "required": [
          "id",
          "organization_id",
          "status",
          "priority",
          "channel",
          "created_at"
        ],
        "title": "SupportConversationResponse"
      },
      "SupportConversationUpdate": {
        "properties": {
          "subject": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Subject"
          },
          "status": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ConversationStatus"
              },
              {
                "type": "null"
              }
            ]
          },
          "priority": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ConversationPriority"
              },
              {
                "type": "null"
              }
            ]
          },
          "folder_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Folder Id"
          },
          "category_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Category Id"
          },
          "assigned_agent_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Assigned Agent Id"
          },
          "assigned_user_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Assigned User Id"
          },
          "tags": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tags"
          }
        },
        "type": "object",
        "title": "SupportConversationUpdate"
      },
      "SupportFolderResponse": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "color": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Color"
          },
          "icon": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Icon"
          },
          "sort_order": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sort Order",
            "default": 0
          },
          "id": {
            "type": "string",
            "title": "Id"
          },
          "organization_id": {
            "type": "string",
            "title": "Organization Id"
          },
          "is_default": {
            "type": "boolean",
            "title": "Is Default",
            "default": false
          },
          "conversation_count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Conversation Count"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "updated_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          }
        },
        "type": "object",
        "required": [
          "name",
          "id",
          "organization_id",
          "created_at"
        ],
        "title": "SupportFolderResponse"
      },
      "SupportMessageCreate": {
        "properties": {
          "content": {
            "type": "string",
            "title": "Content",
            "default": ""
          },
          "sender_type": {
            "$ref": "#/components/schemas/MessageSenderType",
            "default": "agent"
          },
          "message_type": {
            "$ref": "#/components/schemas/MessageType",
            "default": "text"
          },
          "is_internal": {
            "type": "boolean",
            "title": "Is Internal",
            "default": false
          },
          "attachments": {
            "anyOf": [
              {
                "items": {
                  "additionalProperties": true,
                  "type": "object"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Attachments"
          },
          "sender_agent_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sender Agent Id"
          },
          "ai_metadata": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ai Metadata"
          }
        },
        "type": "object",
        "title": "SupportMessageCreate"
      },
      "SupportMessageResponse": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "conversation_id": {
            "type": "string",
            "title": "Conversation Id"
          },
          "sender_type": {
            "$ref": "#/components/schemas/MessageSenderType"
          },
          "sender_user_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sender User Id"
          },
          "sender_agent_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sender Agent Id"
          },
          "sender_contact_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sender Contact Id"
          },
          "message_type": {
            "$ref": "#/components/schemas/MessageType"
          },
          "content": {
            "type": "string",
            "title": "Content"
          },
          "attachments": {
            "anyOf": [
              {
                "items": {
                  "additionalProperties": true,
                  "type": "object"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Attachments"
          },
          "is_internal": {
            "type": "boolean",
            "title": "Is Internal",
            "default": false
          },
          "ai_metadata": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ai Metadata"
          },
          "read_by": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Read By"
          },
          "delivery_status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Delivery Status"
          },
          "extra_data": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Extra Data"
          },
          "sender": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SupportMessageSenderInfo"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "updated_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          },
          "edited_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Edited At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "conversation_id",
          "sender_type",
          "message_type",
          "content",
          "created_at"
        ],
        "title": "SupportMessageResponse"
      },
      "SupportMessageSenderInfo": {
        "properties": {
          "id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Id"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "avatar_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Avatar Url"
          },
          "type": {
            "$ref": "#/components/schemas/MessageSenderType"
          }
        },
        "type": "object",
        "required": [
          "type"
        ],
        "title": "SupportMessageSenderInfo"
      },
      "SupportParticipantResponse": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "conversation_id": {
            "type": "string",
            "title": "Conversation Id"
          },
          "user_id": {
            "type": "string",
            "title": "User Id"
          },
          "user_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "User Name"
          },
          "user_email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "User Email"
          },
          "role": {
            "$ref": "#/components/schemas/ParticipantRole"
          },
          "joined_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Joined At"
          },
          "last_read_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Read At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "conversation_id",
          "user_id",
          "role"
        ],
        "title": "SupportParticipantResponse"
      },
      "TicketCategoriesResponse": {
        "properties": {
          "categories": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Categories"
          }
        },
        "type": "object",
        "required": [
          "categories"
        ],
        "title": "TicketCategoriesResponse"
      },
      "TicketCommentCreate": {
        "properties": {
          "content": {
            "type": "string",
            "minLength": 1,
            "title": "Content"
          },
          "internal": {
            "type": "boolean",
            "title": "Internal",
            "default": true
          }
        },
        "type": "object",
        "required": [
          "content"
        ],
        "title": "TicketCommentCreate"
      },
      "TicketConversationSummary": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "channel": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Channel"
          },
          "subject": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Subject"
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Status"
          },
          "contact_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Contact Id"
          },
          "last_message_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Message At"
          },
          "last_message_preview": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Message Preview"
          },
          "attached_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Attached At"
          }
        },
        "type": "object",
        "required": [
          "id"
        ],
        "title": "TicketConversationSummary"
      },
      "TicketCreate": {
        "properties": {
          "title": {
            "type": "string",
            "maxLength": 500,
            "minLength": 1,
            "title": "Title"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "status": {
            "type": "string",
            "enum": [
              "open",
              "pending",
              "in_progress",
              "resolved",
              "closed"
            ],
            "title": "Status",
            "default": "open"
          },
          "priority": {
            "type": "string",
            "enum": [
              "low",
              "normal",
              "high",
              "urgent"
            ],
            "title": "Priority",
            "default": "normal"
          },
          "category": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 120
              },
              {
                "type": "null"
              }
            ],
            "title": "Category"
          },
          "subcategory": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 120
              },
              {
                "type": "null"
              }
            ],
            "title": "Subcategory"
          },
          "tags": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tags"
          },
          "assigned_to": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Assigned To"
          },
          "contact_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Contact Id"
          },
          "due_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Due At"
          },
          "conversation_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Conversation Id"
          },
          "support_conversation_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Support Conversation Id"
          }
        },
        "type": "object",
        "required": [
          "title"
        ],
        "title": "TicketCreate"
      },
      "TicketListResponse": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/TicketResponse"
            },
            "type": "array",
            "title": "Items"
          },
          "total": {
            "type": "integer",
            "title": "Total"
          },
          "skip": {
            "type": "integer",
            "title": "Skip"
          },
          "limit": {
            "type": "integer",
            "title": "Limit"
          }
        },
        "type": "object",
        "required": [
          "items",
          "total",
          "skip",
          "limit"
        ],
        "title": "TicketListResponse"
      },
      "TicketMessageResponse": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "ticket_id": {
            "type": "string",
            "title": "Ticket Id"
          },
          "content": {
            "type": "string",
            "title": "Content"
          },
          "message_type": {
            "type": "string",
            "title": "Message Type"
          },
          "sender_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sender Id"
          },
          "sender_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sender Name"
          },
          "created_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          },
          "internal": {
            "type": "boolean",
            "title": "Internal",
            "default": true
          }
        },
        "type": "object",
        "required": [
          "id",
          "ticket_id",
          "content",
          "message_type"
        ],
        "title": "TicketMessageResponse"
      },
      "TicketResponse": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "organization_id": {
            "type": "string",
            "title": "Organization Id"
          },
          "ticket_number": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ticket Number"
          },
          "contact_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Contact Id"
          },
          "contact_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Contact Name"
          },
          "title": {
            "type": "string",
            "title": "Title"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "status": {
            "type": "string",
            "title": "Status"
          },
          "priority": {
            "type": "string",
            "title": "Priority"
          },
          "category": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Category"
          },
          "subcategory": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Subcategory"
          },
          "tags": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tags"
          },
          "channel": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Channel"
          },
          "due_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Due At"
          },
          "resolution": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Resolution"
          },
          "resolution_time": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Resolution Time"
          },
          "assigned_to": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Assigned To"
          },
          "assignee_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Assignee Name"
          },
          "created_by": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created By"
          },
          "creator_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Creator Name"
          },
          "created_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          },
          "updated_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          },
          "resolved_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Resolved At"
          },
          "support_conversation_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Support Conversation Id"
          },
          "conversation_ids": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Conversation Ids"
          },
          "conversations": {
            "items": {
              "$ref": "#/components/schemas/TicketConversationSummary"
            },
            "type": "array",
            "title": "Conversations"
          },
          "comment_count": {
            "type": "integer",
            "title": "Comment Count",
            "default": 0
          }
        },
        "type": "object",
        "required": [
          "id",
          "organization_id",
          "title",
          "status",
          "priority"
        ],
        "title": "TicketResponse"
      },
      "TicketUpdate": {
        "properties": {
          "title": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 500,
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Title"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "status": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "open",
                  "pending",
                  "in_progress",
                  "resolved",
                  "closed"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Status"
          },
          "priority": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "low",
                  "normal",
                  "high",
                  "urgent"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Priority"
          },
          "category": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 120
              },
              {
                "type": "null"
              }
            ],
            "title": "Category"
          },
          "subcategory": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 120
              },
              {
                "type": "null"
              }
            ],
            "title": "Subcategory"
          },
          "tags": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tags"
          },
          "assigned_to": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Assigned To"
          },
          "contact_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Contact Id"
          },
          "due_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Due At"
          },
          "resolution": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Resolution"
          },
          "customer_confirmed_resolved": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Confirmed Resolved"
          },
          "confirmation_quote": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 1000
              },
              {
                "type": "null"
              }
            ],
            "title": "Confirmation Quote"
          }
        },
        "type": "object",
        "title": "TicketUpdate"
      },
      "TriggerType": {
        "type": "string",
        "enum": [
          "manual",
          "scheduled",
          "event",
          "intent",
          "list_added",
          "form_submit",
          "webhook",
          "api"
        ],
        "title": "TriggerType"
      },
      "TriggerWorkflowRequest": {
        "properties": {
          "input_data": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Input Data"
          },
          "sync": {
            "type": "boolean",
            "title": "Sync",
            "default": false
          },
          "force": {
            "type": "boolean",
            "title": "Force",
            "default": false
          }
        },
        "type": "object",
        "title": "TriggerWorkflowRequest"
      },
      "TriggerWorkflowResponse": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success"
          },
          "run_id": {
            "type": "string",
            "title": "Run Id"
          },
          "message": {
            "type": "string",
            "title": "Message",
            "default": "Workflow triggered"
          },
          "status": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/WorkflowRunStatus"
              },
              {
                "type": "null"
              }
            ]
          },
          "dispatched": {
            "type": "boolean",
            "title": "Dispatched",
            "default": true
          },
          "run": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AIWorkflowRunDetailResponse"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "success",
          "run_id"
        ],
        "title": "TriggerWorkflowResponse"
      },
      "ValidationError": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "type": "array",
            "title": "Location"
          },
          "msg": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      },
      "VoiceAgentCreate": {
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 255,
            "minLength": 1,
            "title": "Name"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "voice_id": {
            "type": "string",
            "minLength": 1,
            "title": "Voice Id"
          },
          "voice_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Voice Name"
          },
          "language": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Language",
            "default": "english"
          },
          "model_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Model Id",
            "default": "eleven_v4_turbo"
          },
          "active": {
            "type": "boolean",
            "title": "Active",
            "default": false
          },
          "voice_speed": {
            "anyOf": [
              {
                "type": "number",
                "maximum": 200.0,
                "minimum": 50.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Voice Speed",
            "default": 100.0
          },
          "voice_stability": {
            "anyOf": [
              {
                "type": "number",
                "maximum": 1.0,
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Voice Stability",
            "default": 0.5
          },
          "voice_similarity_boost": {
            "anyOf": [
              {
                "type": "number",
                "maximum": 1.0,
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Voice Similarity Boost",
            "default": 0.5
          },
          "voice_style": {
            "anyOf": [
              {
                "type": "number",
                "maximum": 1.0,
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Voice Style",
            "default": 0.0
          },
          "output_format": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Output Format",
            "default": "mp3_44100_128"
          },
          "prompt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Prompt"
          },
          "temperature": {
            "anyOf": [
              {
                "type": "number",
                "maximum": 2.0,
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Temperature",
            "default": 0.7
          },
          "tools": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tools"
          },
          "phone_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Phone Number"
          },
          "phone_trunk_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Phone Trunk Id"
          },
          "outbound_trunk_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Outbound Trunk Id"
          },
          "agent_id": {
            "type": "string",
            "title": "Agent Id"
          }
        },
        "type": "object",
        "required": [
          "name",
          "voice_id",
          "agent_id"
        ],
        "title": "VoiceAgentCreate"
      },
      "VoiceAgentResponse": {
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 255,
            "minLength": 1,
            "title": "Name"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "voice_id": {
            "type": "string",
            "minLength": 1,
            "title": "Voice Id"
          },
          "voice_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Voice Name"
          },
          "language": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Language",
            "default": "english"
          },
          "model_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Model Id",
            "default": "eleven_v4_turbo"
          },
          "active": {
            "type": "boolean",
            "title": "Active",
            "default": false
          },
          "voice_speed": {
            "anyOf": [
              {
                "type": "number",
                "maximum": 200.0,
                "minimum": 50.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Voice Speed",
            "default": 100.0
          },
          "voice_stability": {
            "anyOf": [
              {
                "type": "number",
                "maximum": 1.0,
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Voice Stability",
            "default": 0.5
          },
          "voice_similarity_boost": {
            "anyOf": [
              {
                "type": "number",
                "maximum": 1.0,
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Voice Similarity Boost",
            "default": 0.5
          },
          "voice_style": {
            "anyOf": [
              {
                "type": "number",
                "maximum": 1.0,
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Voice Style",
            "default": 0.0
          },
          "output_format": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Output Format",
            "default": "mp3_44100_128"
          },
          "prompt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Prompt"
          },
          "temperature": {
            "anyOf": [
              {
                "type": "number",
                "maximum": 2.0,
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Temperature",
            "default": 0.7
          },
          "tools": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tools"
          },
          "phone_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Phone Number"
          },
          "phone_trunk_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Phone Trunk Id"
          },
          "outbound_trunk_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Outbound Trunk Id"
          },
          "id": {
            "type": "string",
            "title": "Id"
          },
          "agent_id": {
            "type": "string",
            "title": "Agent Id"
          },
          "organization_id": {
            "type": "string",
            "title": "Organization Id"
          },
          "agent_kind": {
            "type": "string",
            "title": "Agent Kind",
            "default": "standard"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "updated_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          }
        },
        "type": "object",
        "required": [
          "name",
          "voice_id",
          "id",
          "agent_id",
          "organization_id",
          "created_at"
        ],
        "title": "VoiceAgentResponse"
      },
      "VoiceAgentUpdate": {
        "properties": {
          "name": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 255,
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "voice_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Voice Id"
          },
          "voice_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Voice Name"
          },
          "language": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Language"
          },
          "model_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Model Id"
          },
          "active": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Active"
          },
          "voice_speed": {
            "anyOf": [
              {
                "type": "number",
                "maximum": 200.0,
                "minimum": 50.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Voice Speed"
          },
          "voice_stability": {
            "anyOf": [
              {
                "type": "number",
                "maximum": 1.0,
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Voice Stability"
          },
          "voice_similarity_boost": {
            "anyOf": [
              {
                "type": "number",
                "maximum": 1.0,
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Voice Similarity Boost"
          },
          "voice_style": {
            "anyOf": [
              {
                "type": "number",
                "maximum": 1.0,
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Voice Style"
          },
          "output_format": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Output Format"
          },
          "prompt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Prompt"
          },
          "temperature": {
            "anyOf": [
              {
                "type": "number",
                "maximum": 2.0,
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Temperature"
          },
          "tools": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tools"
          },
          "phone_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Phone Number"
          },
          "phone_trunk_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Phone Trunk Id"
          },
          "outbound_trunk_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Outbound Trunk Id"
          }
        },
        "type": "object",
        "title": "VoiceAgentUpdate"
      },
      "VoiceProvider": {
        "type": "string",
        "enum": [
          "elevenlabs",
          "openai",
          "azure",
          "deepgram",
          "livekit"
        ],
        "title": "VoiceProvider"
      },
      "WorkflowRunStatus": {
        "type": "string",
        "enum": [
          "pending",
          "running",
          "waiting",
          "completed",
          "failed",
          "cancelled"
        ],
        "title": "WorkflowRunStatus"
      },
      "WorkflowRunStepStatus": {
        "type": "string",
        "enum": [
          "pending",
          "running",
          "completed",
          "failed",
          "skipped",
          "waiting"
        ],
        "title": "WorkflowRunStepStatus"
      },
      "WorkflowStatus": {
        "type": "string",
        "enum": [
          "draft",
          "active",
          "paused",
          "archived"
        ],
        "title": "WorkflowStatus"
      },
      "WorkflowStepType": {
        "type": "string",
        "enum": [
          "agent",
          "skill",
          "connector",
          "condition",
          "wait",
          "webhook",
          "code",
          "transform",
          "notification",
          "human_review",
          "sub_workflow",
          "end"
        ],
        "title": "WorkflowStepType"
      },
      "WorkflowTriggerType": {
        "type": "string",
        "enum": [
          "manual",
          "scheduled",
          "webhook",
          "event",
          "connector",
          "api"
        ],
        "title": "WorkflowTriggerType"
      },
      "app__schemas__agent__AgentStatus": {
        "type": "string",
        "enum": [
          "draft",
          "active",
          "paused",
          "archived"
        ],
        "title": "AgentStatus"
      },
      "app__schemas__agent__AgentType": {
        "type": "string",
        "enum": [
          "campaign",
          "research",
          "voice_support",
          "chat_support",
          "sales",
          "custom"
        ],
        "title": "AgentType"
      },
      "app__schemas__agent__MessageResponse": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "conversation_id": {
            "type": "string",
            "title": "Conversation Id"
          },
          "role": {
            "type": "string",
            "title": "Role"
          },
          "content": {
            "type": "string",
            "title": "Content"
          },
          "audio_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Audio Url"
          },
          "duration_ms": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Duration Ms"
          },
          "tool_calls": {
            "anyOf": [
              {
                "items": {
                  "additionalProperties": true,
                  "type": "object"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tool Calls"
          },
          "tool_results": {
            "anyOf": [
              {
                "items": {
                  "additionalProperties": true,
                  "type": "object"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tool Results"
          },
          "tokens_used": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tokens Used"
          },
          "latency_ms": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Latency Ms"
          },
          "extra_data": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Extra Data"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "conversation_id",
          "role",
          "content",
          "created_at"
        ],
        "title": "MessageResponse",
        "description": "Schema for message response"
      },
      "app__schemas__support_chat__HandoffRequest": {
        "properties": {
          "reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason"
          },
          "summary": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Summary"
          }
        },
        "type": "object",
        "title": "HandoffRequest",
        "description": "Ask for a person to take over a conversation."
      }
    },
    "securitySchemes": {
      "bearerApiKey": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "luso8_sk_live_<40 characters>",
        "description": "A workspace API key, sent as `Authorization: Bearer <key>`. Create keys in Settings → Developers → API keys."
      },
      "headerApiKey": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-Key",
        "description": "The same API key, sent in the `X-API-Key` header instead."
      }
    }
  }
}
