{
  "openapi": "3.1.0",
  "info": {
    "title": "SealMetrics API",
    "version": "2.0.0",
    "description": "SealMetrics provides **first-party, cookie-free analytics** that deliver accurate marketing attribution and conversion tracking. Our powerful REST API gives you complete access to your analytics data:\n\n- **Real-time analytics** with accurate traffic and conversion data\n- **ROAS tracking** to measure return on ad spend across all channels\n- **Conversion & microconversion tracking** for complete funnel visibility\n- **UTM-based attribution** with multi-touch journey analysis\n- **Offline conversion support** for phone calls, CRM events, and more\n- **GDPR-compliant** first-party tracking without cookies\n\n## Getting Started\n\n1. [Create a SealMetrics account](https://my.sealmetrics.com/register)\n2. Obtain your API credentials from the dashboard\n3. Authenticate using the `/auth/login` endpoint\n4. Use the Bearer token for all subsequent requests\n\n## Developer Resources\n\n- [API Documentation](https://docs.sealmetrics.com/api)\n- [Implementation Guides](https://docs.sealmetrics.com/api/implementation-guide)\n- [Rate Limits & Best Practices](https://docs.sealmetrics.com/api/appendix/understanding-rate-limits)\n\n## Support\n\nNeed help? Contact us at [support@sealmetrics.com](mailto:support@sealmetrics.com)",
    "termsOfService": "https://sealmetrics.com/terms",
    "contact": {
      "name": "SealMetrics Support",
      "email": "support@sealmetrics.com",
      "url": "https://docs.sealmetrics.com/api"
    },
    "license": {
      "name": "Proprietary",
      "url": "https://sealmetrics.com/terms"
    },
    "x-logo": {
      "url": "https://docs.sealmetrics.com/img/logo.svg",
      "altText": "SealMetrics Logo"
    }
  },
  "paths": {
    "/livez": {
      "get": {
        "tags": [
          "Health"
        ],
        "summary": "Liveness probe",
        "description": "Returns 200 if the service is running",
        "operationId": "liveness_livez_get",
        "responses": {
          "200": {
            "description": "Service is alive",
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "type": "object",
                  "title": "Response Liveness Livez Get"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "security": []
      }
    },
    "/readyz": {
      "get": {
        "tags": [
          "Health"
        ],
        "summary": "Readiness probe",
        "description": "Returns 200 if the service is ready to accept traffic",
        "operationId": "readiness_readyz_get",
        "responses": {
          "200": {
            "description": "Service is ready",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "description": "Service is not ready"
          }
        },
        "security": []
      }
    },
    "/health": {
      "get": {
        "tags": [
          "Health"
        ],
        "summary": "Health check",
        "description": "Detailed health status with all dependency checks. In production, requires authentication.",
        "operationId": "health_check_health_get",
        "parameters": [
          {
            "name": "x-health-token",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Health check token for production access",
              "title": "X-Health-Token"
            },
            "description": "Health check token for production access"
          }
        ],
        "responses": {
          "200": {
            "description": "Health status returned",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HealthResponse"
                }
              }
            }
          },
          "403": {
            "description": "Access denied in production without authentication"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "security": []
      }
    },
    "/t.js": {
      "get": {
        "tags": [
          "Tracker"
        ],
        "summary": "Get tracker.js script",
        "description": "Returns the minified tracker.js with embedded account ID and token",
        "operationId": "get_tracker_script_t_js_get",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 3,
              "maxLength": 64,
              "description": "Account ID",
              "title": "Id"
            },
            "description": "Account ID"
          },
          {
            "name": "group",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Default content grouping",
              "title": "Group"
            },
            "description": "Default content grouping"
          }
        ],
        "responses": {
          "200": {
            "description": "JavaScript tracker script",
            "content": {
              "application/javascript": {}
            }
          },
          "400": {
            "description": "Missing or invalid account ID"
          },
          "404": {
            "description": "Account not found or inactive"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "security": []
      },
      "head": {
        "tags": [
          "tracker"
        ],
        "summary": "Check tracker.js availability",
        "description": "HEAD request to check if tracker is available for account",
        "operationId": "check_tracker_availability_t_js_head",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 3,
              "maxLength": 64,
              "description": "Account ID",
              "title": "Id"
            },
            "description": "Account ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Tracker available",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "404": {
            "description": "Account not found"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/api-tokens/scopes": {
      "get": {
        "tags": [
          "API Tokens"
        ],
        "summary": "List available scopes",
        "description": "Get list of available permission scopes for API tokens, filtered by user permissions",
        "operationId": "list_scopes_api_v1_api_tokens_scopes_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_APITokenScopesResponse_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ]
      }
    },
    "/api/v1/api-tokens": {
      "get": {
        "tags": [
          "API Tokens"
        ],
        "summary": "List API tokens",
        "description": "Get list of all API tokens for the current user",
        "operationId": "list_tokens_api_v1_api_tokens_get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "include_inactive",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false,
              "title": "Include Inactive"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_APITokenList_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "post": {
        "tags": [
          "API Tokens"
        ],
        "summary": "Create API token",
        "description": "Create a new API token. The token value is only shown once.",
        "operationId": "create_token_api_v1_api_tokens_post",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/APITokenCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_APITokenCreated_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/api-tokens/{token_id}": {
      "get": {
        "tags": [
          "API Tokens"
        ],
        "summary": "Get API token",
        "description": "Get details of a specific API token",
        "operationId": "get_token_api_v1_api_tokens__token_id__get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "token_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Token Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_APITokenResponse_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "delete": {
        "tags": [
          "API Tokens"
        ],
        "summary": "Revoke API token",
        "description": "Revoke (deactivate) an API token",
        "operationId": "revoke_token_api_v1_api_tokens__token_id__delete",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "token_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Token Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_APITokenResponse_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/batch": {
      "post": {
        "tags": [
          "Batch"
        ],
        "summary": "Execute batch request",
        "description": "Execute multiple analytics queries in a single request",
        "operationId": "execute_batch_api_v1_batch_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BatchRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BatchResponse"
                },
                "example": {
                  "batch_id": "b7c1f0e2-3d4a-4f5b-8c9d-0e1f2a3b4c5d",
                  "status": "completed",
                  "results": {
                    "overview": {
                      "status": "success",
                      "data": {},
                      "timing_ms": 45
                    },
                    "pages": {
                      "status": "success",
                      "data": {},
                      "timing_ms": 32
                    },
                    "sources": {
                      "status": "success",
                      "data": {},
                      "timing_ms": 28
                    }
                  },
                  "meta": {
                    "total_queries": 3,
                    "successful": 3,
                    "failed": 0,
                    "skipped": 0,
                    "total_timing_ms": 105,
                    "parallel_execution": true
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ]
      }
    },
    "/api/v1/batch/validate": {
      "post": {
        "tags": [
          "Batch"
        ],
        "summary": "Validate batch request",
        "description": "Validate a batch request without executing",
        "operationId": "validate_batch_api_v1_batch_validate_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BatchRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BatchValidationResponse"
                },
                "example": {
                  "valid": true,
                  "query_count": 3,
                  "execution_order": [
                    "overview",
                    "pages",
                    "sources"
                  ],
                  "parallel_groups": [
                    [
                      "overview",
                      "pages"
                    ],
                    [
                      "sources"
                    ]
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ]
      }
    },
    "/api/v1/sites/config/timezones": {
      "get": {
        "tags": [
          "Sites"
        ],
        "summary": "List timezones",
        "description": "Get list of available timezones",
        "operationId": "list_timezones_api_v1_sites_config_timezones_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_TimezoneListResponse_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ]
      }
    },
    "/api/v1/sites": {
      "get": {
        "tags": [
          "Sites"
        ],
        "summary": "List sites",
        "description": "Get list of sites accessible by the current user",
        "operationId": "list_sites_api_v1_sites_get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "include_inactive",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "Include inactive sites",
              "default": false,
              "title": "Include Inactive"
            },
            "description": "Include inactive sites"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_AccountListResponse_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "post": {
        "tags": [
          "Sites"
        ],
        "summary": "Create site",
        "description": "Create a new analytics site",
        "operationId": "create_site_api_v1_sites_post",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AccountCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_AccountInfo_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/sites/{site_id}": {
      "get": {
        "tags": [
          "Sites"
        ],
        "summary": "Get site details",
        "description": "Get detailed information about a specific site",
        "operationId": "get_site_api_v1_sites__site_id__get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "site_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Site Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_AccountInfo_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "patch": {
        "tags": [
          "Sites"
        ],
        "summary": "Update site",
        "description": "Update site settings",
        "operationId": "update_site_api_v1_sites__site_id__patch",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "site_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Site Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AccountUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_AccountInfo_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "delete": {
        "tags": [
          "Sites"
        ],
        "summary": "Delete site",
        "description": "Deactivate a site (soft delete)",
        "operationId": "delete_site_api_v1_sites__site_id__delete",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "site_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Site Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_dict_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/sites/{site_id}/domains": {
      "get": {
        "tags": [
          "Sites"
        ],
        "summary": "List domains",
        "description": "Get list of domains for a site",
        "operationId": "list_domains_api_v1_sites__site_id__domains_get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "site_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Site Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_DomainListResponse_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "post": {
        "tags": [
          "Sites"
        ],
        "summary": "Add domain",
        "description": "Add an authorized domain to a site",
        "operationId": "add_domain_api_v1_sites__site_id__domains_post",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "site_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Site Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DomainAdd"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_DomainInfo_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/sites/{site_id}/domains/{domain}": {
      "delete": {
        "tags": [
          "Sites"
        ],
        "summary": "Remove domain",
        "description": "Remove an authorized domain from a site",
        "operationId": "remove_domain_api_v1_sites__site_id__domains__domain__delete",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "site_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Site Id"
            }
          },
          {
            "name": "domain",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Domain"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_dict_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/sites/{site_id}/utm-mappings": {
      "get": {
        "tags": [
          "Sites"
        ],
        "summary": "List UTM mappings",
        "description": "Get list of custom UTM parameter mappings for a site",
        "operationId": "list_utm_mappings_api_v1_sites__site_id__utm_mappings_get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "site_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Site Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_UTMMappingListResponse_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "post": {
        "tags": [
          "Sites"
        ],
        "summary": "Add UTM mapping",
        "description": "Add a custom UTM parameter mapping",
        "operationId": "add_utm_mapping_api_v1_sites__site_id__utm_mappings_post",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "site_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Site Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UTMMappingCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_UTMMappingInfo_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/sites/{site_id}/utm-mappings/{mapping_id}": {
      "patch": {
        "tags": [
          "Sites"
        ],
        "summary": "Update UTM mapping",
        "description": "Update a custom UTM parameter mapping",
        "operationId": "update_utm_mapping_api_v1_sites__site_id__utm_mappings__mapping_id__patch",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "site_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Site Id"
            }
          },
          {
            "name": "mapping_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Mapping Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UTMMappingUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_UTMMappingInfo_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/sites/{site_id}/utm-mappings/{custom_param}": {
      "delete": {
        "tags": [
          "Sites"
        ],
        "summary": "Remove UTM mapping",
        "description": "Remove a custom UTM parameter mapping",
        "operationId": "remove_utm_mapping_api_v1_sites__site_id__utm_mappings__custom_param__delete",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "site_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Site Id"
            }
          },
          {
            "name": "custom_param",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Custom Param"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_dict_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/sites/{site_id}/users": {
      "get": {
        "tags": [
          "Sites"
        ],
        "summary": "List site users",
        "description": "Get list of users with access to a site",
        "operationId": "list_site_users_api_v1_sites__site_id__users_get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "site_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Site Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_AccountUserListResponse_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "post": {
        "tags": [
          "Sites"
        ],
        "summary": "Add user to site",
        "description": "Grant a user access to a site",
        "operationId": "add_user_to_site_api_v1_sites__site_id__users_post",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "site_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Site Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AccountUserAdd"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_AccountUserInfo_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/sites/{site_id}/users/{user_id}": {
      "patch": {
        "tags": [
          "Sites"
        ],
        "summary": "Update user role",
        "description": "Update a user's role in a site",
        "operationId": "update_user_role_api_v1_sites__site_id__users__user_id__patch",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "site_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Site Id"
            }
          },
          {
            "name": "user_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "User Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AccountUserUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_AccountUserInfo_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "delete": {
        "tags": [
          "Sites"
        ],
        "summary": "Remove user from site",
        "description": "Revoke a user's access to a site",
        "operationId": "remove_user_from_site_api_v1_sites__site_id__users__user_id__delete",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "site_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Site Id"
            }
          },
          {
            "name": "user_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "User Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_dict_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/sites/{site_id}/pixel": {
      "get": {
        "tags": [
          "Sites"
        ],
        "summary": "Get pixel code",
        "description": "Get the installation code for the tracking pixel",
        "operationId": "get_pixel_code_api_v1_sites__site_id__pixel_get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "site_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Site Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_PixelCode_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/sites/{site_id}/pixel/status": {
      "get": {
        "tags": [
          "Sites"
        ],
        "summary": "Get pixel status",
        "description": "Check if the tracking pixel is installed and receiving data",
        "operationId": "get_pixel_status_api_v1_sites__site_id__pixel_status_get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "site_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Site Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_PixelStatus_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/stats/query": {
      "post": {
        "tags": [
          "Stats"
        ],
        "summary": "Execute multi-dimensional query",
        "description": "Flexible query endpoint for report_global tables with dimensions, metrics, and filters",
        "operationId": "execute_query_api_v1_stats_query_post",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "account_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Account ID (alias: site_id)",
              "title": "Account Id"
            },
            "description": "Account ID (alias: site_id)"
          },
          {
            "name": "site_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Site ID (preferred over account_id)",
              "title": "Site Id"
            },
            "description": "Site ID (preferred over account_id)"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QueryRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QueryResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/stats/query/export": {
      "post": {
        "tags": [
          "Stats"
        ],
        "summary": "Export query results as CSV",
        "description": "Execute a multi-dimensional query and export results as CSV file",
        "operationId": "export_query_api_v1_stats_query_export_post",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "filename",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Output filename",
              "default": "export.csv",
              "title": "Filename"
            },
            "description": "Output filename"
          },
          {
            "name": "account_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Account ID (alias: site_id)",
              "title": "Account Id"
            },
            "description": "Account ID (alias: site_id)"
          },
          {
            "name": "site_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Site ID (preferred over account_id)",
              "title": "Site Id"
            },
            "description": "Site ID (preferred over account_id)"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QueryRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/stats/overview": {
      "get": {
        "tags": [
          "Stats"
        ],
        "summary": "Get stats overview",
        "description": "Get complete dashboard overview with all key metrics",
        "operationId": "get_overview_api_v1_stats_overview_get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "start_date",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Start date",
              "title": "Start Date"
            },
            "description": "Start date"
          },
          {
            "name": "end_date",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "null"
                }
              ],
              "description": "End date",
              "title": "End Date"
            },
            "description": "End date"
          },
          {
            "name": "period",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Period shortcut: today, yesterday, 7d, 30d, 90d, 12m, this_week, last_week, wtd, this_month, last_month, mtd, this_quarter, last_quarter, qtd, this_year, last_year, ytd",
              "title": "Period"
            },
            "description": "Period shortcut: today, yesterday, 7d, 30d, 90d, 12m, this_week, last_week, wtd, this_month, last_month, mtd, this_quarter, last_quarter, qtd, this_year, last_year, ytd"
          },
          {
            "name": "compare",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Comparison mode: 'previous' (same duration before), 'yoy' (year over year), or omit for default comparison",
              "default": "previous",
              "title": "Compare"
            },
            "description": "Comparison mode: 'previous' (same duration before), 'yoy' (year over year), or omit for default comparison"
          },
          {
            "name": "filters",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Advanced filters: field:op:value,... Operators: eq, ne, contains, in, not_in",
              "title": "Filters"
            },
            "description": "Advanced filters: field:op:value,... Operators: eq, ne, contains, in, not_in"
          },
          {
            "name": "granularity",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Time series granularity: 'auto' (default), 'hourly', 'daily'",
              "title": "Granularity"
            },
            "description": "Time series granularity: 'auto' (default), 'hourly', 'daily'"
          },
          {
            "name": "account_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Account ID (alias: site_id)",
              "title": "Account Id"
            },
            "description": "Account ID (alias: site_id)"
          },
          {
            "name": "site_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Site ID (preferred over account_id)",
              "title": "Site Id"
            },
            "description": "Site ID (preferred over account_id)"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_StatsOverview_"
                },
                "example": {
                  "success": true,
                  "data": {
                    "date_range": {
                      "start_date": "2025-01-01",
                      "end_date": "2025-01-07",
                      "days": 7
                    },
                    "traffic": {
                      "entrances": 12543,
                      "engaged_entrances": 7234,
                      "page_views": 28976,
                      "microconversions": 892,
                      "conversions": 156,
                      "revenue": "12450.00",
                      "bounce_rate": 42.3,
                      "pages_per_session": 2.31
                    },
                    "conversions": {
                      "conversions": 156,
                      "revenue": "12450.00",
                      "microconversions": 892,
                      "conversion_rate": 1.24,
                      "average_order_value": "79.81"
                    }
                  },
                  "meta": {},
                  "timestamp": "2025-01-08T00:00:00Z"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/stats/pages": {
      "get": {
        "tags": [
          "Stats"
        ],
        "summary": "Get page metrics",
        "description": "Get metrics for all pages with pagination",
        "operationId": "get_pages_api_v1_stats_pages_get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "start_date",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Start Date"
            }
          },
          {
            "name": "end_date",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "null"
                }
              ],
              "title": "End Date"
            }
          },
          {
            "name": "period",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Period"
            }
          },
          {
            "name": "segment",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Segment ID or name to apply filters",
              "title": "Segment"
            },
            "description": "Segment ID or name to apply filters"
          },
          {
            "name": "content_grouping",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Content Grouping"
            }
          },
          {
            "name": "path_filter",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by path",
              "title": "Path Filter"
            },
            "description": "Filter by path"
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by country code",
              "title": "Country"
            },
            "description": "Filter by country code"
          },
          {
            "name": "utm_medium",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by UTM medium",
              "title": "Utm Medium"
            },
            "description": "Filter by UTM medium"
          },
          {
            "name": "utm_source",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by UTM source",
              "title": "Utm Source"
            },
            "description": "Filter by UTM source"
          },
          {
            "name": "utm_campaign",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by UTM campaign",
              "title": "Utm Campaign"
            },
            "description": "Filter by UTM campaign"
          },
          {
            "name": "utm_term",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by UTM term",
              "title": "Utm Term"
            },
            "description": "Filter by UTM term"
          },
          {
            "name": "filters",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Advanced filters: field:op:value,... Operators: eq, ne, contains, not_contains, regex, in, not_in",
              "title": "Filters"
            },
            "description": "Advanced filters: field:op:value,... Operators: eq, ne, contains, not_contains, regex, in, not_in"
          },
          {
            "name": "sort_by",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Sort by: page_views, entrances, engaged_entrances, conversions, revenue",
              "default": "page_views",
              "title": "Sort By"
            },
            "description": "Sort by: page_views, entrances, engaged_entrances, conversions, revenue"
          },
          {
            "name": "sort_order",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^(asc|desc)$",
              "description": "Sort order: asc or desc",
              "default": "desc",
              "title": "Sort Order"
            },
            "description": "Sort order: asc or desc"
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1,
              "title": "Page"
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 1000,
              "minimum": 1,
              "default": 50,
              "title": "Page Size"
            }
          },
          {
            "name": "compare",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Comparison: 'previous' or 'yoy'",
              "title": "Compare"
            },
            "description": "Comparison: 'previous' or 'yoy'"
          },
          {
            "name": "include_utm",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "Include UTM fields in response (groups by UTM)",
              "default": false,
              "title": "Include Utm"
            },
            "description": "Include UTM fields in response (groups by UTM)"
          },
          {
            "name": "account_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Account ID (alias: site_id)",
              "title": "Account Id"
            },
            "description": "Account ID (alias: site_id)"
          },
          {
            "name": "site_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Site ID (preferred over account_id)",
              "title": "Site Id"
            },
            "description": "Site ID (preferred over account_id)"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedResponse_dict_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/stats/pages/top": {
      "get": {
        "tags": [
          "Stats"
        ],
        "summary": "Get top pages",
        "description": "Get top pages by page views",
        "operationId": "get_top_pages_api_v1_stats_pages_top_get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "start_date",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Start Date"
            }
          },
          {
            "name": "end_date",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "null"
                }
              ],
              "title": "End Date"
            }
          },
          {
            "name": "period",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Period"
            }
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by country code",
              "title": "Country"
            },
            "description": "Filter by country code"
          },
          {
            "name": "utm_medium",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by UTM medium",
              "title": "Utm Medium"
            },
            "description": "Filter by UTM medium"
          },
          {
            "name": "utm_source",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by UTM source",
              "title": "Utm Source"
            },
            "description": "Filter by UTM source"
          },
          {
            "name": "utm_campaign",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by UTM campaign",
              "title": "Utm Campaign"
            },
            "description": "Filter by UTM campaign"
          },
          {
            "name": "utm_term",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by UTM term",
              "title": "Utm Term"
            },
            "description": "Filter by UTM term"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "default": 10,
              "title": "Limit"
            }
          },
          {
            "name": "account_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Account ID (alias: site_id)",
              "title": "Account Id"
            },
            "description": "Account ID (alias: site_id)"
          },
          {
            "name": "site_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Site ID (preferred over account_id)",
              "title": "Site Id"
            },
            "description": "Site ID (preferred over account_id)"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_list_dict__"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/stats/pages/content-groups": {
      "get": {
        "tags": [
          "Stats"
        ],
        "summary": "Get content groups",
        "description": "Get list of content groups with their metrics",
        "operationId": "get_content_groups_api_v1_stats_pages_content_groups_get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "start_date",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Start Date"
            }
          },
          {
            "name": "end_date",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "null"
                }
              ],
              "title": "End Date"
            }
          },
          {
            "name": "period",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Period"
            }
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by country code",
              "title": "Country"
            },
            "description": "Filter by country code"
          },
          {
            "name": "utm_medium",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by UTM medium",
              "title": "Utm Medium"
            },
            "description": "Filter by UTM medium"
          },
          {
            "name": "utm_source",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by UTM source",
              "title": "Utm Source"
            },
            "description": "Filter by UTM source"
          },
          {
            "name": "utm_campaign",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by UTM campaign",
              "title": "Utm Campaign"
            },
            "description": "Filter by UTM campaign"
          },
          {
            "name": "utm_term",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by UTM term",
              "title": "Utm Term"
            },
            "description": "Filter by UTM term"
          },
          {
            "name": "account_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Account ID (alias: site_id)",
              "title": "Account Id"
            },
            "description": "Account ID (alias: site_id)"
          },
          {
            "name": "site_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Site ID (preferred over account_id)",
              "title": "Site Id"
            },
            "description": "Site ID (preferred over account_id)"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_list_dict__"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/stats/mediums": {
      "get": {
        "tags": [
          "Stats"
        ],
        "summary": "Get traffic by medium",
        "description": "Get traffic metrics grouped by UTM medium",
        "operationId": "get_mediums_api_v1_stats_mediums_get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "start_date",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Start Date"
            }
          },
          {
            "name": "end_date",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "null"
                }
              ],
              "title": "End Date"
            }
          },
          {
            "name": "period",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Period"
            }
          },
          {
            "name": "segment",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Segment ID or name to apply filters",
              "title": "Segment"
            },
            "description": "Segment ID or name to apply filters"
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by country code",
              "title": "Country"
            },
            "description": "Filter by country code"
          },
          {
            "name": "filters",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Advanced filters: field:op:value,...",
              "title": "Filters"
            },
            "description": "Advanced filters: field:op:value,..."
          },
          {
            "name": "sort_by",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Sort by: entrances, engaged_entrances, page_views, conversions, revenue",
              "default": "entrances",
              "title": "Sort By"
            },
            "description": "Sort by: entrances, engaged_entrances, page_views, conversions, revenue"
          },
          {
            "name": "sort_order",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^(asc|desc)$",
              "description": "Sort order: asc or desc",
              "default": "desc",
              "title": "Sort Order"
            },
            "description": "Sort order: asc or desc"
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1,
              "title": "Page"
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "default": 50,
              "title": "Page Size"
            }
          },
          {
            "name": "compare",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Comparison: 'previous' or 'yoy'",
              "title": "Compare"
            },
            "description": "Comparison: 'previous' or 'yoy'"
          },
          {
            "name": "include_totals",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "Include aggregated totals for current period",
              "default": false,
              "title": "Include Totals"
            },
            "description": "Include aggregated totals for current period"
          },
          {
            "name": "account_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Account ID (alias: site_id)",
              "title": "Account Id"
            },
            "description": "Account ID (alias: site_id)"
          },
          {
            "name": "site_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Site ID (preferred over account_id)",
              "title": "Site Id"
            },
            "description": "Site ID (preferred over account_id)"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedResponse_dict_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/stats/sources": {
      "get": {
        "tags": [
          "Stats"
        ],
        "summary": "Get traffic by source",
        "description": "Get traffic metrics grouped by UTM source",
        "operationId": "get_sources_api_v1_stats_sources_get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "start_date",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Start Date"
            }
          },
          {
            "name": "end_date",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "null"
                }
              ],
              "title": "End Date"
            }
          },
          {
            "name": "period",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Period"
            }
          },
          {
            "name": "segment",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Segment ID or name to apply filters",
              "title": "Segment"
            },
            "description": "Segment ID or name to apply filters"
          },
          {
            "name": "utm_medium",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by medium",
              "title": "Utm Medium"
            },
            "description": "Filter by medium"
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by country code",
              "title": "Country"
            },
            "description": "Filter by country code"
          },
          {
            "name": "filters",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Advanced filters: field:op:value,...",
              "title": "Filters"
            },
            "description": "Advanced filters: field:op:value,..."
          },
          {
            "name": "sort_by",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Sort by: entrances, engaged_entrances, page_views, conversions, revenue",
              "default": "entrances",
              "title": "Sort By"
            },
            "description": "Sort by: entrances, engaged_entrances, page_views, conversions, revenue"
          },
          {
            "name": "sort_order",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^(asc|desc)$",
              "description": "Sort order: asc or desc",
              "default": "desc",
              "title": "Sort Order"
            },
            "description": "Sort order: asc or desc"
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1,
              "title": "Page"
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "default": 50,
              "title": "Page Size"
            }
          },
          {
            "name": "compare",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Comparison: 'previous' or 'yoy'",
              "title": "Compare"
            },
            "description": "Comparison: 'previous' or 'yoy'"
          },
          {
            "name": "include_totals",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "Include aggregated totals for current period",
              "default": false,
              "title": "Include Totals"
            },
            "description": "Include aggregated totals for current period"
          },
          {
            "name": "account_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Account ID (alias: site_id)",
              "title": "Account Id"
            },
            "description": "Account ID (alias: site_id)"
          },
          {
            "name": "site_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Site ID (preferred over account_id)",
              "title": "Site Id"
            },
            "description": "Site ID (preferred over account_id)"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedResponse_dict_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/stats/sources/top": {
      "get": {
        "tags": [
          "Stats"
        ],
        "summary": "Get top sources",
        "description": "Get top traffic sources by entrances",
        "operationId": "get_top_sources_api_v1_stats_sources_top_get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "start_date",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Start Date"
            }
          },
          {
            "name": "end_date",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "null"
                }
              ],
              "title": "End Date"
            }
          },
          {
            "name": "period",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Period"
            }
          },
          {
            "name": "utm_medium",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Utm Medium"
            }
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Country"
            }
          },
          {
            "name": "filters",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Advanced filters: field:op:value,...",
              "title": "Filters"
            },
            "description": "Advanced filters: field:op:value,..."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "default": 10,
              "title": "Limit"
            }
          },
          {
            "name": "account_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Account ID (alias: site_id)",
              "title": "Account Id"
            },
            "description": "Account ID (alias: site_id)"
          },
          {
            "name": "site_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Site ID (preferred over account_id)",
              "title": "Site Id"
            },
            "description": "Site ID (preferred over account_id)"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_list_dict__"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/stats/campaigns": {
      "get": {
        "tags": [
          "Stats"
        ],
        "summary": "Get traffic by campaign",
        "description": "Get traffic metrics grouped by UTM campaign",
        "operationId": "get_campaigns_api_v1_stats_campaigns_get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "start_date",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Start Date"
            }
          },
          {
            "name": "end_date",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "null"
                }
              ],
              "title": "End Date"
            }
          },
          {
            "name": "period",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Period"
            }
          },
          {
            "name": "segment",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Segment ID or name to apply filters",
              "title": "Segment"
            },
            "description": "Segment ID or name to apply filters"
          },
          {
            "name": "utm_medium",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by medium",
              "title": "Utm Medium"
            },
            "description": "Filter by medium"
          },
          {
            "name": "utm_source",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by source",
              "title": "Utm Source"
            },
            "description": "Filter by source"
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by country code",
              "title": "Country"
            },
            "description": "Filter by country code"
          },
          {
            "name": "filters",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Advanced filters: field:op:value,...",
              "title": "Filters"
            },
            "description": "Advanced filters: field:op:value,..."
          },
          {
            "name": "sort_by",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Sort by: entrances, engaged_entrances, page_views, conversions, revenue",
              "default": "entrances",
              "title": "Sort By"
            },
            "description": "Sort by: entrances, engaged_entrances, page_views, conversions, revenue"
          },
          {
            "name": "sort_order",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^(asc|desc)$",
              "description": "Sort order: asc or desc",
              "default": "desc",
              "title": "Sort Order"
            },
            "description": "Sort order: asc or desc"
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1,
              "title": "Page"
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "default": 50,
              "title": "Page Size"
            }
          },
          {
            "name": "compare",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Comparison: 'previous' or 'yoy'",
              "title": "Compare"
            },
            "description": "Comparison: 'previous' or 'yoy'"
          },
          {
            "name": "account_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Account ID (alias: site_id)",
              "title": "Account Id"
            },
            "description": "Account ID (alias: site_id)"
          },
          {
            "name": "site_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Site ID (preferred over account_id)",
              "title": "Site Id"
            },
            "description": "Site ID (preferred over account_id)"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedResponse_dict_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/stats/campaigns/top": {
      "get": {
        "tags": [
          "Stats"
        ],
        "summary": "Get top campaigns",
        "description": "Get top campaigns by entrances",
        "operationId": "get_top_campaigns_api_v1_stats_campaigns_top_get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "start_date",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Start Date"
            }
          },
          {
            "name": "end_date",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "null"
                }
              ],
              "title": "End Date"
            }
          },
          {
            "name": "period",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Period"
            }
          },
          {
            "name": "utm_medium",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Utm Medium"
            }
          },
          {
            "name": "utm_source",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Utm Source"
            }
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Country"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "default": 10,
              "title": "Limit"
            }
          },
          {
            "name": "account_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Account ID (alias: site_id)",
              "title": "Account Id"
            },
            "description": "Account ID (alias: site_id)"
          },
          {
            "name": "site_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Site ID (preferred over account_id)",
              "title": "Site Id"
            },
            "description": "Site ID (preferred over account_id)"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_list_dict__"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/stats/terms": {
      "get": {
        "tags": [
          "Stats"
        ],
        "summary": "Get traffic by term",
        "description": "Get traffic metrics grouped by UTM term",
        "operationId": "get_terms_api_v1_stats_terms_get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "start_date",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Start Date"
            }
          },
          {
            "name": "end_date",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "null"
                }
              ],
              "title": "End Date"
            }
          },
          {
            "name": "period",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Period"
            }
          },
          {
            "name": "segment",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Segment ID or name to apply filters",
              "title": "Segment"
            },
            "description": "Segment ID or name to apply filters"
          },
          {
            "name": "utm_medium",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by medium",
              "title": "Utm Medium"
            },
            "description": "Filter by medium"
          },
          {
            "name": "utm_source",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by source",
              "title": "Utm Source"
            },
            "description": "Filter by source"
          },
          {
            "name": "utm_campaign",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by campaign",
              "title": "Utm Campaign"
            },
            "description": "Filter by campaign"
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by country code",
              "title": "Country"
            },
            "description": "Filter by country code"
          },
          {
            "name": "filters",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Advanced filters: field:op:value,...",
              "title": "Filters"
            },
            "description": "Advanced filters: field:op:value,..."
          },
          {
            "name": "sort_by",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Sort by: entrances, engaged_entrances, page_views, conversions, revenue",
              "default": "entrances",
              "title": "Sort By"
            },
            "description": "Sort by: entrances, engaged_entrances, page_views, conversions, revenue"
          },
          {
            "name": "sort_order",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^(asc|desc)$",
              "description": "Sort order: asc or desc",
              "default": "desc",
              "title": "Sort Order"
            },
            "description": "Sort order: asc or desc"
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1,
              "title": "Page"
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "default": 50,
              "title": "Page Size"
            }
          },
          {
            "name": "compare",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Comparison: 'previous' or 'yoy'",
              "title": "Compare"
            },
            "description": "Comparison: 'previous' or 'yoy'"
          },
          {
            "name": "account_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Account ID (alias: site_id)",
              "title": "Account Id"
            },
            "description": "Account ID (alias: site_id)"
          },
          {
            "name": "site_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Site ID (preferred over account_id)",
              "title": "Site Id"
            },
            "description": "Site ID (preferred over account_id)"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedResponse_dict_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/stats/terms/top": {
      "get": {
        "tags": [
          "Stats"
        ],
        "summary": "Get top terms",
        "description": "Get top terms by entrances",
        "operationId": "get_top_terms_api_v1_stats_terms_top_get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "start_date",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Start Date"
            }
          },
          {
            "name": "end_date",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "null"
                }
              ],
              "title": "End Date"
            }
          },
          {
            "name": "period",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Period"
            }
          },
          {
            "name": "utm_medium",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Utm Medium"
            }
          },
          {
            "name": "utm_source",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Utm Source"
            }
          },
          {
            "name": "utm_campaign",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Utm Campaign"
            }
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Country"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "default": 10,
              "title": "Limit"
            }
          },
          {
            "name": "account_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Account ID (alias: site_id)",
              "title": "Account Id"
            },
            "description": "Account ID (alias: site_id)"
          },
          {
            "name": "site_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Site ID (preferred over account_id)",
              "title": "Site Id"
            },
            "description": "Site ID (preferred over account_id)"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_list_dict__"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/stats/contents": {
      "get": {
        "tags": [
          "Stats"
        ],
        "summary": "Get content traffic",
        "description": "Get traffic by UTM content parameter",
        "operationId": "get_contents_api_v1_stats_contents_get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "start_date",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Start Date"
            }
          },
          {
            "name": "end_date",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "null"
                }
              ],
              "title": "End Date"
            }
          },
          {
            "name": "period",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Period"
            }
          },
          {
            "name": "compare",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Comparison mode: 'previous' or 'yoy'",
              "title": "Compare"
            },
            "description": "Comparison mode: 'previous' or 'yoy'"
          },
          {
            "name": "segment",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Segment ID or name to apply filters",
              "title": "Segment"
            },
            "description": "Segment ID or name to apply filters"
          },
          {
            "name": "utm_medium",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Utm Medium"
            }
          },
          {
            "name": "utm_source",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Utm Source"
            }
          },
          {
            "name": "utm_campaign",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Utm Campaign"
            }
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by country code",
              "title": "Country"
            },
            "description": "Filter by country code"
          },
          {
            "name": "filters",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Advanced filters: field:op:value,...",
              "title": "Filters"
            },
            "description": "Advanced filters: field:op:value,..."
          },
          {
            "name": "sort_by",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Sort by: entrances, engaged_entrances, page_views, conversions, revenue",
              "default": "entrances",
              "title": "Sort By"
            },
            "description": "Sort by: entrances, engaged_entrances, page_views, conversions, revenue"
          },
          {
            "name": "sort_order",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^(asc|desc)$",
              "description": "Sort order: asc or desc",
              "default": "desc",
              "title": "Sort Order"
            },
            "description": "Sort order: asc or desc"
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1,
              "title": "Page"
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "default": 50,
              "title": "Page Size"
            }
          },
          {
            "name": "account_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Account ID (alias: site_id)",
              "title": "Account Id"
            },
            "description": "Account ID (alias: site_id)"
          },
          {
            "name": "site_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Site ID (preferred over account_id)",
              "title": "Site Id"
            },
            "description": "Site ID (preferred over account_id)"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedResponse_dict_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/stats/contents/top": {
      "get": {
        "tags": [
          "Stats"
        ],
        "summary": "Get top contents",
        "description": "Get top contents by entrances",
        "operationId": "get_top_contents_api_v1_stats_contents_top_get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "start_date",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Start Date"
            }
          },
          {
            "name": "end_date",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "null"
                }
              ],
              "title": "End Date"
            }
          },
          {
            "name": "period",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Period"
            }
          },
          {
            "name": "utm_medium",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Utm Medium"
            }
          },
          {
            "name": "utm_source",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Utm Source"
            }
          },
          {
            "name": "utm_campaign",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Utm Campaign"
            }
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Country"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "default": 10,
              "title": "Limit"
            }
          },
          {
            "name": "account_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Account ID (alias: site_id)",
              "title": "Account Id"
            },
            "description": "Account ID (alias: site_id)"
          },
          {
            "name": "site_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Site ID (preferred over account_id)",
              "title": "Site Id"
            },
            "description": "Site ID (preferred over account_id)"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_list_dict__"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/stats/referrers": {
      "get": {
        "tags": [
          "Stats"
        ],
        "summary": "Get referrer traffic",
        "description": "Get traffic from referrer domains",
        "operationId": "get_referrers_api_v1_stats_referrers_get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "start_date",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Start Date"
            }
          },
          {
            "name": "end_date",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "null"
                }
              ],
              "title": "End Date"
            }
          },
          {
            "name": "period",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Period"
            }
          },
          {
            "name": "segment",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Segment ID or name to apply filters",
              "title": "Segment"
            },
            "description": "Segment ID or name to apply filters"
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by country code",
              "title": "Country"
            },
            "description": "Filter by country code"
          },
          {
            "name": "filters",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Advanced filters: field:op:value,...",
              "title": "Filters"
            },
            "description": "Advanced filters: field:op:value,..."
          },
          {
            "name": "sort_by",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Sort by: entrances, engaged_entrances, page_views, conversions, revenue",
              "default": "entrances",
              "title": "Sort By"
            },
            "description": "Sort by: entrances, engaged_entrances, page_views, conversions, revenue"
          },
          {
            "name": "sort_order",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^(asc|desc)$",
              "description": "Sort order: asc or desc",
              "default": "desc",
              "title": "Sort Order"
            },
            "description": "Sort order: asc or desc"
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1,
              "title": "Page"
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "default": 50,
              "title": "Page Size"
            }
          },
          {
            "name": "compare",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Comparison: 'previous' or 'yoy'",
              "title": "Compare"
            },
            "description": "Comparison: 'previous' or 'yoy'"
          },
          {
            "name": "account_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Account ID (alias: site_id)",
              "title": "Account Id"
            },
            "description": "Account ID (alias: site_id)"
          },
          {
            "name": "site_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Site ID (preferred over account_id)",
              "title": "Site Id"
            },
            "description": "Site ID (preferred over account_id)"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedResponse_dict_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/stats/referrers/top": {
      "get": {
        "tags": [
          "Stats"
        ],
        "summary": "Get top referrers",
        "description": "Get top referrer domains by entrances",
        "operationId": "get_top_referrers_api_v1_stats_referrers_top_get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "start_date",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Start Date"
            }
          },
          {
            "name": "end_date",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "null"
                }
              ],
              "title": "End Date"
            }
          },
          {
            "name": "period",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Period"
            }
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Country"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "default": 10,
              "title": "Limit"
            }
          },
          {
            "name": "account_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Account ID (alias: site_id)",
              "title": "Account Id"
            },
            "description": "Account ID (alias: site_id)"
          },
          {
            "name": "site_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Site ID (preferred over account_id)",
              "title": "Site Id"
            },
            "description": "Site ID (preferred over account_id)"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_list_dict__"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/stats/geo/countries": {
      "get": {
        "tags": [
          "Stats"
        ],
        "summary": "Get country metrics",
        "description": "Get traffic metrics by country",
        "operationId": "get_countries_api_v1_stats_geo_countries_get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "start_date",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Start Date"
            }
          },
          {
            "name": "end_date",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "null"
                }
              ],
              "title": "End Date"
            }
          },
          {
            "name": "period",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Period"
            }
          },
          {
            "name": "segment",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Segment ID or name to apply filters",
              "title": "Segment"
            },
            "description": "Segment ID or name to apply filters"
          },
          {
            "name": "utm_medium",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by UTM medium",
              "title": "Utm Medium"
            },
            "description": "Filter by UTM medium"
          },
          {
            "name": "utm_source",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by UTM source",
              "title": "Utm Source"
            },
            "description": "Filter by UTM source"
          },
          {
            "name": "utm_campaign",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by UTM campaign",
              "title": "Utm Campaign"
            },
            "description": "Filter by UTM campaign"
          },
          {
            "name": "filters",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Advanced filters: field:op:value,...",
              "title": "Filters"
            },
            "description": "Advanced filters: field:op:value,..."
          },
          {
            "name": "sort_by",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Sort by: entrances, engaged_entrances, page_views, conversions, revenue",
              "default": "entrances",
              "title": "Sort By"
            },
            "description": "Sort by: entrances, engaged_entrances, page_views, conversions, revenue"
          },
          {
            "name": "sort_order",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^(asc|desc)$",
              "description": "Sort order: asc or desc",
              "default": "desc",
              "title": "Sort Order"
            },
            "description": "Sort order: asc or desc"
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1,
              "title": "Page"
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 1000,
              "minimum": 1,
              "default": 50,
              "title": "Page Size"
            }
          },
          {
            "name": "compare",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Comparison: 'previous' or 'yoy'",
              "title": "Compare"
            },
            "description": "Comparison: 'previous' or 'yoy'"
          },
          {
            "name": "include_totals",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "Include aggregated totals for current period",
              "default": false,
              "title": "Include Totals"
            },
            "description": "Include aggregated totals for current period"
          },
          {
            "name": "account_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Account ID (alias: site_id)",
              "title": "Account Id"
            },
            "description": "Account ID (alias: site_id)"
          },
          {
            "name": "site_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Site ID (preferred over account_id)",
              "title": "Site Id"
            },
            "description": "Site ID (preferred over account_id)"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedResponse_GeoMetrics_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/stats/devices": {
      "get": {
        "tags": [
          "Stats"
        ],
        "summary": "Get device breakdown",
        "description": "Get device, browser, and OS breakdown combined",
        "operationId": "get_devices_breakdown_api_v1_stats_devices_get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "start_date",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Start Date"
            }
          },
          {
            "name": "end_date",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "null"
                }
              ],
              "title": "End Date"
            }
          },
          {
            "name": "period",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Period"
            }
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by country code",
              "title": "Country"
            },
            "description": "Filter by country code"
          },
          {
            "name": "filters",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Advanced filters: field:op:value,...",
              "title": "Filters"
            },
            "description": "Advanced filters: field:op:value,..."
          },
          {
            "name": "compare",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Comparison: 'previous' or 'yoy'",
              "title": "Compare"
            },
            "description": "Comparison: 'previous' or 'yoy'"
          },
          {
            "name": "account_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Account ID (alias: site_id)",
              "title": "Account Id"
            },
            "description": "Account ID (alias: site_id)"
          },
          {
            "name": "site_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Site ID (preferred over account_id)",
              "title": "Site Id"
            },
            "description": "Site ID (preferred over account_id)"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_dict_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/stats/devices/types": {
      "get": {
        "tags": [
          "Stats"
        ],
        "summary": "Get device types",
        "description": "Get device type breakdown (desktop, mobile, tablet)",
        "operationId": "get_device_types_api_v1_stats_devices_types_get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "start_date",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Start Date"
            }
          },
          {
            "name": "end_date",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "null"
                }
              ],
              "title": "End Date"
            }
          },
          {
            "name": "period",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Period"
            }
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by country code",
              "title": "Country"
            },
            "description": "Filter by country code"
          },
          {
            "name": "filters",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Advanced filters: field:op:value,...",
              "title": "Filters"
            },
            "description": "Advanced filters: field:op:value,..."
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1,
              "title": "Page"
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "default": 10,
              "title": "Page Size"
            }
          },
          {
            "name": "account_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Account ID (alias: site_id)",
              "title": "Account Id"
            },
            "description": "Account ID (alias: site_id)"
          },
          {
            "name": "site_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Site ID (preferred over account_id)",
              "title": "Site Id"
            },
            "description": "Site ID (preferred over account_id)"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedResponse_dict_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/stats/browsers": {
      "get": {
        "tags": [
          "Stats"
        ],
        "summary": "Get browser breakdown",
        "description": "Get browser breakdown (Chrome, Firefox, Safari, etc.)",
        "operationId": "get_browsers_api_v1_stats_browsers_get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "start_date",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Start Date"
            }
          },
          {
            "name": "end_date",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "null"
                }
              ],
              "title": "End Date"
            }
          },
          {
            "name": "period",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Period"
            }
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by country code",
              "title": "Country"
            },
            "description": "Filter by country code"
          },
          {
            "name": "filters",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Advanced filters: field:op:value,...",
              "title": "Filters"
            },
            "description": "Advanced filters: field:op:value,..."
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1,
              "title": "Page"
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "default": 15,
              "title": "Page Size"
            }
          },
          {
            "name": "account_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Account ID (alias: site_id)",
              "title": "Account Id"
            },
            "description": "Account ID (alias: site_id)"
          },
          {
            "name": "site_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Site ID (preferred over account_id)",
              "title": "Site Id"
            },
            "description": "Site ID (preferred over account_id)"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedResponse_dict_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/stats/operating-systems": {
      "get": {
        "tags": [
          "Stats"
        ],
        "summary": "Get OS breakdown",
        "description": "Get operating system breakdown (Windows, macOS, iOS, Android, etc.)",
        "operationId": "get_operating_systems_api_v1_stats_operating_systems_get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "start_date",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Start Date"
            }
          },
          {
            "name": "end_date",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "null"
                }
              ],
              "title": "End Date"
            }
          },
          {
            "name": "period",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Period"
            }
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by country code",
              "title": "Country"
            },
            "description": "Filter by country code"
          },
          {
            "name": "filters",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Advanced filters: field:op:value,...",
              "title": "Filters"
            },
            "description": "Advanced filters: field:op:value,..."
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1,
              "title": "Page"
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "default": 15,
              "title": "Page Size"
            }
          },
          {
            "name": "account_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Account ID (alias: site_id)",
              "title": "Account Id"
            },
            "description": "Account ID (alias: site_id)"
          },
          {
            "name": "site_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Site ID (preferred over account_id)",
              "title": "Site Id"
            },
            "description": "Site ID (preferred over account_id)"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedResponse_dict_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/stats/conversions": {
      "get": {
        "tags": [
          "Stats"
        ],
        "summary": "Get conversion metrics",
        "description": "Get conversions grouped by type",
        "operationId": "get_conversions_api_v1_stats_conversions_get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "start_date",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Start Date"
            }
          },
          {
            "name": "end_date",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "null"
                }
              ],
              "title": "End Date"
            }
          },
          {
            "name": "period",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Period"
            }
          },
          {
            "name": "segment",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Segment ID or name to apply filters",
              "title": "Segment"
            },
            "description": "Segment ID or name to apply filters"
          },
          {
            "name": "utm_medium",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by UTM medium",
              "title": "Utm Medium"
            },
            "description": "Filter by UTM medium"
          },
          {
            "name": "utm_source",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by UTM source",
              "title": "Utm Source"
            },
            "description": "Filter by UTM source"
          },
          {
            "name": "utm_campaign",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by UTM campaign",
              "title": "Utm Campaign"
            },
            "description": "Filter by UTM campaign"
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by country code",
              "title": "Country"
            },
            "description": "Filter by country code"
          },
          {
            "name": "filters",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Advanced filters: field:op:value,...",
              "title": "Filters"
            },
            "description": "Advanced filters: field:op:value,..."
          },
          {
            "name": "sort_by",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Sort by: count, revenue, avg_value",
              "default": "count",
              "title": "Sort By"
            },
            "description": "Sort by: count, revenue, avg_value"
          },
          {
            "name": "sort_order",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^(asc|desc)$",
              "description": "Sort order: asc or desc",
              "default": "desc",
              "title": "Sort Order"
            },
            "description": "Sort order: asc or desc"
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1,
              "title": "Page"
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "default": 20,
              "title": "Page Size"
            }
          },
          {
            "name": "compare",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Comparison: 'previous' or 'yoy'",
              "title": "Compare"
            },
            "description": "Comparison: 'previous' or 'yoy'"
          },
          {
            "name": "account_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Account ID (alias: site_id)",
              "title": "Account Id"
            },
            "description": "Account ID (alias: site_id)"
          },
          {
            "name": "site_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Site ID (preferred over account_id)",
              "title": "Site Id"
            },
            "description": "Site ID (preferred over account_id)"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedResponse_ConversionsByType_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/stats/funnel": {
      "get": {
        "tags": [
          "Stats"
        ],
        "summary": "Get funnel report",
        "description": "Get funnel report with UTM breakdown",
        "operationId": "get_funnel_report_api_v1_stats_funnel_get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "start_date",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Start Date"
            }
          },
          {
            "name": "end_date",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "null"
                }
              ],
              "title": "End Date"
            }
          },
          {
            "name": "period",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Period"
            }
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Country filter",
              "title": "Country"
            },
            "description": "Country filter"
          },
          {
            "name": "filters",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Advanced filters: field:op:value,...",
              "title": "Filters"
            },
            "description": "Advanced filters: field:op:value,..."
          },
          {
            "name": "account_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Account ID (alias: site_id)",
              "title": "Account Id"
            },
            "description": "Account ID (alias: site_id)"
          },
          {
            "name": "site_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Site ID (preferred over account_id)",
              "title": "Site Id"
            },
            "description": "Site ID (preferred over account_id)"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FunnelResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "post": {
        "tags": [
          "Stats"
        ],
        "summary": "Analyze funnel",
        "description": "Analyze a custom funnel",
        "operationId": "analyze_funnel_api_v1_stats_funnel_post",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "start_date",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Start Date"
            }
          },
          {
            "name": "end_date",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "null"
                }
              ],
              "title": "End Date"
            }
          },
          {
            "name": "period",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Period"
            }
          },
          {
            "name": "account_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Account ID (alias: site_id)",
              "title": "Account Id"
            },
            "description": "Account ID (alias: site_id)"
          },
          {
            "name": "site_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Site ID (preferred over account_id)",
              "title": "Site Id"
            },
            "description": "Site ID (preferred over account_id)"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FunnelRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_FunnelReport_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/stats/microconversions": {
      "get": {
        "tags": [
          "Stats"
        ],
        "summary": "Get microconversion metrics",
        "description": "Get microconversions with filtering by UTMs, country, device, etc.",
        "operationId": "get_microconversions_api_v1_stats_microconversions_get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "start_date",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Start Date"
            }
          },
          {
            "name": "end_date",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "null"
                }
              ],
              "title": "End Date"
            }
          },
          {
            "name": "period",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Period"
            }
          },
          {
            "name": "segment",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Segment ID or name to apply filters",
              "title": "Segment"
            },
            "description": "Segment ID or name to apply filters"
          },
          {
            "name": "utm_source",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by UTM source",
              "title": "Utm Source"
            },
            "description": "Filter by UTM source"
          },
          {
            "name": "utm_medium",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by UTM medium",
              "title": "Utm Medium"
            },
            "description": "Filter by UTM medium"
          },
          {
            "name": "utm_campaign",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by UTM campaign",
              "title": "Utm Campaign"
            },
            "description": "Filter by UTM campaign"
          },
          {
            "name": "utm_term",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by UTM term",
              "title": "Utm Term"
            },
            "description": "Filter by UTM term"
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by country code (ISO 2-letter)",
              "title": "Country"
            },
            "description": "Filter by country code (ISO 2-letter)"
          },
          {
            "name": "device_type",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by device type",
              "title": "Device Type"
            },
            "description": "Filter by device type"
          },
          {
            "name": "browser",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by browser",
              "title": "Browser"
            },
            "description": "Filter by browser"
          },
          {
            "name": "os",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by OS",
              "title": "Os"
            },
            "description": "Filter by OS"
          },
          {
            "name": "conversion_type",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by type",
              "title": "Conversion Type"
            },
            "description": "Filter by type"
          },
          {
            "name": "filters",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Advanced filters: field:op:value,...",
              "title": "Filters"
            },
            "description": "Advanced filters: field:op:value,..."
          },
          {
            "name": "sort_by",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Sort by: count",
              "default": "count",
              "title": "Sort By"
            },
            "description": "Sort by: count"
          },
          {
            "name": "sort_order",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^(asc|desc)$",
              "description": "Sort order: asc or desc",
              "default": "desc",
              "title": "Sort Order"
            },
            "description": "Sort order: asc or desc"
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1,
              "title": "Page"
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "default": 20,
              "title": "Page Size"
            }
          },
          {
            "name": "compare",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Comparison: 'previous' or 'yoy'",
              "title": "Compare"
            },
            "description": "Comparison: 'previous' or 'yoy'"
          },
          {
            "name": "account_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Account ID (alias: site_id)",
              "title": "Account Id"
            },
            "description": "Account ID (alias: site_id)"
          },
          {
            "name": "site_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Site ID (preferred over account_id)",
              "title": "Site Id"
            },
            "description": "Site ID (preferred over account_id)"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedResponse_MicroconversionMetrics_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/stats/microconversions/{conversion_type}": {
      "get": {
        "tags": [
          "Stats"
        ],
        "summary": "Get microconversion details",
        "description": "Get detailed breakdown for a specific microconversion type",
        "operationId": "get_microconversion_details_api_v1_stats_microconversions__conversion_type__get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "conversion_type",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Conversion Type"
            }
          },
          {
            "name": "start_date",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Start Date"
            }
          },
          {
            "name": "end_date",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "null"
                }
              ],
              "title": "End Date"
            }
          },
          {
            "name": "period",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Period"
            }
          },
          {
            "name": "utm_source",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Utm Source"
            }
          },
          {
            "name": "utm_medium",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Utm Medium"
            }
          },
          {
            "name": "utm_campaign",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Utm Campaign"
            }
          },
          {
            "name": "utm_term",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Utm Term"
            }
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Country"
            }
          },
          {
            "name": "device_type",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Device Type"
            }
          },
          {
            "name": "browser",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Browser"
            }
          },
          {
            "name": "os",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Os"
            }
          },
          {
            "name": "account_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Account ID (alias: site_id)",
              "title": "Account Id"
            },
            "description": "Account ID (alias: site_id)"
          },
          {
            "name": "site_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Site ID (preferred over account_id)",
              "title": "Site Id"
            },
            "description": "Site ID (preferred over account_id)"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_dict_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/stats/microconversions-types": {
      "get": {
        "tags": [
          "Stats"
        ],
        "summary": "Get available microconversion types",
        "description": "Get list of available microconversion types for the account",
        "operationId": "get_microconversion_types_api_v1_stats_microconversions_types_get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "start_date",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Start Date"
            }
          },
          {
            "name": "end_date",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "null"
                }
              ],
              "title": "End Date"
            }
          },
          {
            "name": "period",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Period"
            }
          },
          {
            "name": "account_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Account ID (alias: site_id)",
              "title": "Account Id"
            },
            "description": "Account ID (alias: site_id)"
          },
          {
            "name": "site_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Site ID (preferred over account_id)",
              "title": "Site Id"
            },
            "description": "Site ID (preferred over account_id)"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_list_str__"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/stats/landing-pages": {
      "get": {
        "tags": [
          "Stats"
        ],
        "summary": "Get landing page metrics",
        "description": "Get landing pages with filtering by UTMs, country, content grouping",
        "operationId": "get_landing_pages_api_v1_stats_landing_pages_get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "start_date",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Start Date"
            }
          },
          {
            "name": "end_date",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "null"
                }
              ],
              "title": "End Date"
            }
          },
          {
            "name": "period",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Period"
            }
          },
          {
            "name": "segment",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Segment ID or name to apply filters",
              "title": "Segment"
            },
            "description": "Segment ID or name to apply filters"
          },
          {
            "name": "utm_source",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by UTM source",
              "title": "Utm Source"
            },
            "description": "Filter by UTM source"
          },
          {
            "name": "utm_medium",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by UTM medium",
              "title": "Utm Medium"
            },
            "description": "Filter by UTM medium"
          },
          {
            "name": "utm_campaign",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by UTM campaign",
              "title": "Utm Campaign"
            },
            "description": "Filter by UTM campaign"
          },
          {
            "name": "utm_term",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by UTM term",
              "title": "Utm Term"
            },
            "description": "Filter by UTM term"
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by country code",
              "title": "Country"
            },
            "description": "Filter by country code"
          },
          {
            "name": "content_grouping",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by content grouping",
              "title": "Content Grouping"
            },
            "description": "Filter by content grouping"
          },
          {
            "name": "path_filter",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by path pattern",
              "title": "Path Filter"
            },
            "description": "Filter by path pattern"
          },
          {
            "name": "filters",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Advanced filters: field:op:value,...",
              "title": "Filters"
            },
            "description": "Advanced filters: field:op:value,..."
          },
          {
            "name": "sort_by",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Sort by: entrances, engaged_entrances, conversions, revenue, bounce_rate",
              "default": "entrances",
              "title": "Sort By"
            },
            "description": "Sort by: entrances, engaged_entrances, conversions, revenue, bounce_rate"
          },
          {
            "name": "sort_order",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^(asc|desc)$",
              "description": "Sort order: asc or desc",
              "default": "desc",
              "title": "Sort Order"
            },
            "description": "Sort order: asc or desc"
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1,
              "title": "Page"
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 1000,
              "minimum": 1,
              "default": 50,
              "title": "Page Size"
            }
          },
          {
            "name": "compare",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Comparison: 'previous' or 'yoy'",
              "title": "Compare"
            },
            "description": "Comparison: 'previous' or 'yoy'"
          },
          {
            "name": "include_totals",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "Include aggregated totals for current period",
              "default": false,
              "title": "Include Totals"
            },
            "description": "Include aggregated totals for current period"
          },
          {
            "name": "include_utm",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "Include UTM fields in response (groups by UTM)",
              "default": false,
              "title": "Include Utm"
            },
            "description": "Include UTM fields in response (groups by UTM)"
          },
          {
            "name": "account_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Account ID (alias: site_id)",
              "title": "Account Id"
            },
            "description": "Account ID (alias: site_id)"
          },
          {
            "name": "site_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Site ID (preferred over account_id)",
              "title": "Site Id"
            },
            "description": "Site ID (preferred over account_id)"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedResponse_LandingPageMetrics_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/stats/landing-pages/top": {
      "get": {
        "tags": [
          "Stats"
        ],
        "summary": "Get top landing pages",
        "description": "Get top landing pages by entrances",
        "operationId": "get_top_landing_pages_api_v1_stats_landing_pages_top_get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "start_date",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Start Date"
            }
          },
          {
            "name": "end_date",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "null"
                }
              ],
              "title": "End Date"
            }
          },
          {
            "name": "period",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Period"
            }
          },
          {
            "name": "utm_source",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Utm Source"
            }
          },
          {
            "name": "utm_medium",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Utm Medium"
            }
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Country"
            }
          },
          {
            "name": "content_grouping",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Content Grouping"
            }
          },
          {
            "name": "filters",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Advanced filters: field:op:value,...",
              "title": "Filters"
            },
            "description": "Advanced filters: field:op:value,..."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "default": 10,
              "title": "Limit"
            }
          },
          {
            "name": "account_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Account ID (alias: site_id)",
              "title": "Account Id"
            },
            "description": "Account ID (alias: site_id)"
          },
          {
            "name": "site_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Site ID (preferred over account_id)",
              "title": "Site Id"
            },
            "description": "Site ID (preferred over account_id)"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_list_TopLandingPage__"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/stats/landing-pages/by-content-group": {
      "get": {
        "tags": [
          "Stats"
        ],
        "summary": "Get landing pages by content group",
        "description": "Get landing page metrics grouped by content grouping",
        "operationId": "get_landing_pages_by_content_group_api_v1_stats_landing_pages_by_content_group_get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "start_date",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Start Date"
            }
          },
          {
            "name": "end_date",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "null"
                }
              ],
              "title": "End Date"
            }
          },
          {
            "name": "period",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Period"
            }
          },
          {
            "name": "utm_source",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Utm Source"
            }
          },
          {
            "name": "utm_medium",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Utm Medium"
            }
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Country"
            }
          },
          {
            "name": "account_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Account ID (alias: site_id)",
              "title": "Account Id"
            },
            "description": "Account ID (alias: site_id)"
          },
          {
            "name": "site_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Site ID (preferred over account_id)",
              "title": "Site Id"
            },
            "description": "Site ID (preferred over account_id)"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_list_ContentGroupMetrics__"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/stats/properties/keys": {
      "get": {
        "tags": [
          "Stats"
        ],
        "summary": "Get property keys",
        "description": "Get list of available property keys from conversions and microconversions",
        "operationId": "get_property_keys_api_v1_stats_properties_keys_get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "start_date",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Start Date"
            }
          },
          {
            "name": "end_date",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "null"
                }
              ],
              "title": "End Date"
            }
          },
          {
            "name": "period",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Period"
            }
          },
          {
            "name": "table",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Table to query: conversions, microconversions, or both",
              "default": "both",
              "title": "Table"
            },
            "description": "Table to query: conversions, microconversions, or both"
          },
          {
            "name": "filters",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Advanced filters: field:op:value,...",
              "title": "Filters"
            },
            "description": "Advanced filters: field:op:value,..."
          },
          {
            "name": "account_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Account ID (alias: site_id)",
              "title": "Account Id"
            },
            "description": "Account ID (alias: site_id)"
          },
          {
            "name": "site_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Site ID (preferred over account_id)",
              "title": "Site Id"
            },
            "description": "Site ID (preferred over account_id)"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_list_dict__"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/stats/properties/values": {
      "get": {
        "tags": [
          "Stats"
        ],
        "summary": "Get property values",
        "description": "Get property values with counts grouped by UTM parameter",
        "operationId": "get_property_values_api_v1_stats_properties_values_get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "property_key",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Property key to analyze",
              "title": "Property Key"
            },
            "description": "Property key to analyze"
          },
          {
            "name": "start_date",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Start Date"
            }
          },
          {
            "name": "end_date",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "null"
                }
              ],
              "title": "End Date"
            }
          },
          {
            "name": "period",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Period"
            }
          },
          {
            "name": "group_by",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Group by: utm_source, utm_medium, utm_campaign, or all",
              "default": "utm_source",
              "title": "Group By"
            },
            "description": "Group by: utm_source, utm_medium, utm_campaign, or all"
          },
          {
            "name": "table",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Table to query: conversions, microconversions, or both",
              "default": "both",
              "title": "Table"
            },
            "description": "Table to query: conversions, microconversions, or both"
          },
          {
            "name": "conversion_type",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by conversion type",
              "title": "Conversion Type"
            },
            "description": "Filter by conversion type"
          },
          {
            "name": "filters",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Advanced filters: field:op:value,...",
              "title": "Filters"
            },
            "description": "Advanced filters: field:op:value,..."
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1,
              "title": "Page"
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 1000,
              "minimum": 1,
              "default": 50,
              "title": "Page Size"
            }
          },
          {
            "name": "account_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Account ID (alias: site_id)",
              "title": "Account Id"
            },
            "description": "Account ID (alias: site_id)"
          },
          {
            "name": "site_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Site ID (preferred over account_id)",
              "title": "Site Id"
            },
            "description": "Site ID (preferred over account_id)"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedResponse_dict_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/stats/properties/breakdown": {
      "get": {
        "tags": [
          "Stats"
        ],
        "summary": "Get property breakdown",
        "description": "Get complete property breakdown with pivot-table style data",
        "operationId": "get_property_breakdown_api_v1_stats_properties_breakdown_get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "property_key",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Property key to analyze",
              "title": "Property Key"
            },
            "description": "Property key to analyze"
          },
          {
            "name": "start_date",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Start Date"
            }
          },
          {
            "name": "end_date",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "null"
                }
              ],
              "title": "End Date"
            }
          },
          {
            "name": "period",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Period"
            }
          },
          {
            "name": "table",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Table to query: conversions, microconversions, or both",
              "default": "both",
              "title": "Table"
            },
            "description": "Table to query: conversions, microconversions, or both"
          },
          {
            "name": "conversion_type",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by conversion type",
              "title": "Conversion Type"
            },
            "description": "Filter by conversion type"
          },
          {
            "name": "filters",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Advanced filters: field:op:value,...",
              "title": "Filters"
            },
            "description": "Advanced filters: field:op:value,..."
          },
          {
            "name": "account_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Account ID (alias: site_id)",
              "title": "Account Id"
            },
            "description": "Account ID (alias: site_id)"
          },
          {
            "name": "site_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Site ID (preferred over account_id)",
              "title": "Site Id"
            },
            "description": "Site ID (preferred over account_id)"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_dict_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/stats/channels": {
      "get": {
        "tags": [
          "Stats"
        ],
        "summary": "Get traffic by channel",
        "description": "Get traffic metrics grouped by channel (GA4-style channel grouping)",
        "operationId": "get_channels_api_v1_stats_channels_get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "start_date",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Start Date"
            }
          },
          {
            "name": "end_date",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "null"
                }
              ],
              "title": "End Date"
            }
          },
          {
            "name": "period",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Period"
            }
          },
          {
            "name": "segment",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Segment ID or name to apply filters",
              "title": "Segment"
            },
            "description": "Segment ID or name to apply filters"
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by country code",
              "title": "Country"
            },
            "description": "Filter by country code"
          },
          {
            "name": "filters",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Advanced filters: field:op:value,...",
              "title": "Filters"
            },
            "description": "Advanced filters: field:op:value,..."
          },
          {
            "name": "sort_by",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Sort by: entrances, engaged_entrances, page_views, conversions, revenue",
              "default": "entrances",
              "title": "Sort By"
            },
            "description": "Sort by: entrances, engaged_entrances, page_views, conversions, revenue"
          },
          {
            "name": "sort_order",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^(asc|desc)$",
              "description": "Sort order: asc or desc",
              "default": "desc",
              "title": "Sort Order"
            },
            "description": "Sort order: asc or desc"
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1,
              "title": "Page"
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "default": 50,
              "title": "Page Size"
            }
          },
          {
            "name": "compare",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Comparison: 'previous' or 'yoy'",
              "title": "Compare"
            },
            "description": "Comparison: 'previous' or 'yoy'"
          },
          {
            "name": "include_totals",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "Include aggregated totals for current period",
              "default": false,
              "title": "Include Totals"
            },
            "description": "Include aggregated totals for current period"
          },
          {
            "name": "account_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Account ID (alias: site_id)",
              "title": "Account Id"
            },
            "description": "Account ID (alias: site_id)"
          },
          {
            "name": "site_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Site ID (preferred over account_id)",
              "title": "Site Id"
            },
            "description": "Site ID (preferred over account_id)"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedResponse_dict_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/stats/top-channels": {
      "get": {
        "tags": [
          "Stats"
        ],
        "summary": "Get top channels",
        "description": "Get top channels by entrances",
        "operationId": "get_top_channels_api_v1_stats_top_channels_get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "start_date",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Start Date"
            }
          },
          {
            "name": "end_date",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "null"
                }
              ],
              "title": "End Date"
            }
          },
          {
            "name": "period",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Period"
            }
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by country code",
              "title": "Country"
            },
            "description": "Filter by country code"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 50,
              "minimum": 1,
              "default": 10,
              "title": "Limit"
            }
          },
          {
            "name": "account_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Account ID (alias: site_id)",
              "title": "Account Id"
            },
            "description": "Account ID (alias: site_id)"
          },
          {
            "name": "site_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Site ID (preferred over account_id)",
              "title": "Site Id"
            },
            "description": "Site ID (preferred over account_id)"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_list_dict__"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/stats/aggregate/overview": {
      "get": {
        "tags": [
          "Aggregate Stats"
        ],
        "summary": "Get aggregated overview",
        "description": "Get consolidated dashboard overview across multiple accounts",
        "operationId": "get_aggregated_overview_api_v1_stats_aggregate_overview_get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "account_ids",
            "in": "query",
            "required": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "minItems": 1,
              "description": "Account IDs to aggregate (repeat parameter for multiple)",
              "title": "Account Ids"
            },
            "description": "Account IDs to aggregate (repeat parameter for multiple)"
          },
          {
            "name": "start_date",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Start date",
              "title": "Start Date"
            },
            "description": "Start date"
          },
          {
            "name": "end_date",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "null"
                }
              ],
              "description": "End date",
              "title": "End Date"
            },
            "description": "End date"
          },
          {
            "name": "period",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Period shortcut (e.g., 30d, this_month)",
              "title": "Period"
            },
            "description": "Period shortcut (e.g., 30d, this_month)"
          },
          {
            "name": "compare",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Comparison mode: previous, yoy, or none",
              "default": "previous",
              "title": "Compare"
            },
            "description": "Comparison mode: previous, yoy, or none"
          },
          {
            "name": "include_series",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "Include time series data",
              "default": true,
              "title": "Include Series"
            },
            "description": "Include time series data"
          },
          {
            "name": "include_per_account",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "Include per-account breakdown",
              "default": false,
              "title": "Include Per Account"
            },
            "description": "Include per-account breakdown"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_AggregatedOverview_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/stats/aggregate/pages": {
      "get": {
        "tags": [
          "Aggregate Stats"
        ],
        "summary": "Get aggregated pages",
        "description": "Get page metrics aggregated across multiple accounts",
        "operationId": "get_aggregated_pages_api_v1_stats_aggregate_pages_get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "account_ids",
            "in": "query",
            "required": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "minItems": 1,
              "title": "Account Ids"
            }
          },
          {
            "name": "start_date",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Start Date"
            }
          },
          {
            "name": "end_date",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "null"
                }
              ],
              "title": "End Date"
            }
          },
          {
            "name": "period",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Period"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1,
              "title": "Page"
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "default": 50,
              "title": "Page Size"
            }
          },
          {
            "name": "sort_by",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "default": "entrances",
              "title": "Sort By"
            }
          },
          {
            "name": "sort_order",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^(asc|desc)$",
              "default": "desc",
              "title": "Sort Order"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedResponse_AggregatedPageMetrics_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/stats/aggregate/mediums": {
      "get": {
        "tags": [
          "Aggregate Stats"
        ],
        "summary": "Get aggregated mediums",
        "description": "Get UTM medium metrics aggregated across multiple accounts",
        "operationId": "get_aggregated_mediums_api_v1_stats_aggregate_mediums_get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "account_ids",
            "in": "query",
            "required": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "minItems": 1,
              "title": "Account Ids"
            }
          },
          {
            "name": "start_date",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Start Date"
            }
          },
          {
            "name": "end_date",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "null"
                }
              ],
              "title": "End Date"
            }
          },
          {
            "name": "period",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Period"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1,
              "title": "Page"
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "default": 50,
              "title": "Page Size"
            }
          },
          {
            "name": "sort_by",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "default": "entrances",
              "title": "Sort By"
            }
          },
          {
            "name": "sort_order",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^(asc|desc)$",
              "default": "desc",
              "title": "Sort Order"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedResponse_AggregatedSourceMetrics_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/stats/aggregate/sources": {
      "get": {
        "tags": [
          "Aggregate Stats"
        ],
        "summary": "Get aggregated sources",
        "description": "Get UTM source metrics aggregated across multiple accounts",
        "operationId": "get_aggregated_sources_api_v1_stats_aggregate_sources_get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "account_ids",
            "in": "query",
            "required": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "minItems": 1,
              "title": "Account Ids"
            }
          },
          {
            "name": "start_date",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Start Date"
            }
          },
          {
            "name": "end_date",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "null"
                }
              ],
              "title": "End Date"
            }
          },
          {
            "name": "period",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Period"
            }
          },
          {
            "name": "utm_medium",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by UTM medium",
              "title": "Utm Medium"
            },
            "description": "Filter by UTM medium"
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1,
              "title": "Page"
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "default": 50,
              "title": "Page Size"
            }
          },
          {
            "name": "sort_by",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "default": "entrances",
              "title": "Sort By"
            }
          },
          {
            "name": "sort_order",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^(asc|desc)$",
              "default": "desc",
              "title": "Sort Order"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedResponse_AggregatedSourceMetrics_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/stats/aggregate/geo/countries": {
      "get": {
        "tags": [
          "Aggregate Stats"
        ],
        "summary": "Get aggregated countries",
        "description": "Get country metrics aggregated across multiple accounts",
        "operationId": "get_aggregated_countries_api_v1_stats_aggregate_geo_countries_get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "account_ids",
            "in": "query",
            "required": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "minItems": 1,
              "title": "Account Ids"
            }
          },
          {
            "name": "start_date",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Start Date"
            }
          },
          {
            "name": "end_date",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "null"
                }
              ],
              "title": "End Date"
            }
          },
          {
            "name": "period",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Period"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1,
              "title": "Page"
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "default": 50,
              "title": "Page Size"
            }
          },
          {
            "name": "sort_by",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "default": "entrances",
              "title": "Sort By"
            }
          },
          {
            "name": "sort_order",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^(asc|desc)$",
              "default": "desc",
              "title": "Sort Order"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedResponse_AggregatedGeoMetrics_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/stats/aggregate/devices": {
      "get": {
        "tags": [
          "Aggregate Stats"
        ],
        "summary": "Get aggregated devices",
        "description": "Get device breakdown aggregated across multiple accounts",
        "operationId": "get_aggregated_devices_api_v1_stats_aggregate_devices_get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "account_ids",
            "in": "query",
            "required": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "minItems": 1,
              "title": "Account Ids"
            }
          },
          {
            "name": "start_date",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Start Date"
            }
          },
          {
            "name": "end_date",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "null"
                }
              ],
              "title": "End Date"
            }
          },
          {
            "name": "period",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Period"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_list_AggregatedDeviceStats__"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/stats/aggregate/landing-pages": {
      "get": {
        "tags": [
          "Aggregate Stats"
        ],
        "summary": "Get aggregated landing pages",
        "description": "Get landing page metrics aggregated across multiple accounts",
        "operationId": "get_aggregated_landing_pages_api_v1_stats_aggregate_landing_pages_get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "account_ids",
            "in": "query",
            "required": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "minItems": 1,
              "title": "Account Ids"
            }
          },
          {
            "name": "start_date",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Start Date"
            }
          },
          {
            "name": "end_date",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "null"
                }
              ],
              "title": "End Date"
            }
          },
          {
            "name": "period",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Period"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1,
              "title": "Page"
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "default": 50,
              "title": "Page Size"
            }
          },
          {
            "name": "sort_by",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "default": "entrances",
              "title": "Sort By"
            }
          },
          {
            "name": "sort_order",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^(asc|desc)$",
              "default": "desc",
              "title": "Sort Order"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedResponse_AggregatedLandingPageMetrics_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/stats/aggregate/conversions": {
      "get": {
        "tags": [
          "Aggregate Stats"
        ],
        "summary": "Get aggregated conversions",
        "description": "Get conversions by type aggregated across multiple accounts",
        "operationId": "get_aggregated_conversions_api_v1_stats_aggregate_conversions_get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "account_ids",
            "in": "query",
            "required": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "minItems": 1,
              "title": "Account Ids"
            }
          },
          {
            "name": "start_date",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Start Date"
            }
          },
          {
            "name": "end_date",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "null"
                }
              ],
              "title": "End Date"
            }
          },
          {
            "name": "period",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Period"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1,
              "title": "Page"
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "default": 50,
              "title": "Page Size"
            }
          },
          {
            "name": "sort_by",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "default": "count",
              "title": "Sort By"
            }
          },
          {
            "name": "sort_order",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^(asc|desc)$",
              "default": "desc",
              "title": "Sort Order"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedResponse_AggregatedConversionsByType_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/users": {
      "get": {
        "tags": [
          "Users"
        ],
        "summary": "List users (superadmin only)",
        "description": "Get list of all platform users. For org members, use GET /organizations/{slug}/members.",
        "operationId": "list_users_api_v1_users_get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1,
              "title": "Page"
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "default": 50,
              "title": "Page Size"
            }
          },
          {
            "name": "include_inactive",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false,
              "title": "Include Inactive"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_UserListResponse_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "post": {
        "tags": [
          "Users"
        ],
        "summary": "Create user",
        "description": "Create a new user (superadmin only). Use org invitations for adding members.",
        "operationId": "create_user_api_v1_users_post",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UserCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_UserInfo_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/users/me": {
      "get": {
        "tags": [
          "Users"
        ],
        "summary": "Get current user",
        "description": "Get information about the currently authenticated user",
        "operationId": "get_current_user_info_api_v1_users_me_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_UserInfo_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ]
      },
      "patch": {
        "tags": [
          "Users"
        ],
        "summary": "Update current user profile",
        "description": "Update the current user's name",
        "operationId": "update_current_user_profile_api_v1_users_me_patch",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProfileUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_UserInfo_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ]
      }
    },
    "/api/v1/users/{user_id}": {
      "get": {
        "tags": [
          "Users"
        ],
        "summary": "Get user",
        "description": "Get user by ID (superadmin only)",
        "operationId": "get_user_api_v1_users__user_id__get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "user_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "User Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_UserInfo_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "patch": {
        "tags": [
          "Users"
        ],
        "summary": "Update user",
        "description": "Update user information (superadmin only)",
        "operationId": "update_user_api_v1_users__user_id__patch",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "user_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "User Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UserUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_UserInfo_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "delete": {
        "tags": [
          "Users"
        ],
        "summary": "Deactivate user",
        "description": "Deactivate a user account (superadmin only)",
        "operationId": "deactivate_user_api_v1_users__user_id__delete",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "user_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "User Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_dict_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/users/me/password": {
      "post": {
        "tags": [
          "Users"
        ],
        "summary": "Change password",
        "description": "Change the current user's password",
        "operationId": "change_password_api_v1_users_me_password_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PasswordChange"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_dict_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ]
      }
    },
    "/api/v1/auth/me": {
      "get": {
        "tags": [
          "Authentication"
        ],
        "summary": "Get current user",
        "description": "Get information about the currently authenticated user",
        "operationId": "get_me_api_v1_auth_me_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_UserInfo_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ]
      }
    },
    "/api/v1/auth/token": {
      "post": {
        "tags": [
          "Authentication"
        ],
        "summary": "Login",
        "description": "Authenticate with email and password to get access token. If 2FA is enabled, returns a response requiring 2FA verification.",
        "operationId": "login_api_v1_auth_token_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LoginRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_Union_TokenResponse__TwoFactorRequiredResponse__"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "security": []
      }
    },
    "/api/v1/auth/refresh": {
      "post": {
        "tags": [
          "Authentication"
        ],
        "summary": "Refresh access token",
        "description": "Use refresh token cookie to get a new access token with session rotation.",
        "operationId": "refresh_token_api_v1_auth_refresh_post",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "security": []
      }
    },
    "/api/v1/auth/forgot-password": {
      "post": {
        "tags": [
          "Authentication"
        ],
        "summary": "Request password reset",
        "description": "Send a password reset email to the user",
        "operationId": "forgot_password_api_v1_auth_forgot_password_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PasswordResetRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_dict_"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "security": []
      }
    },
    "/api/v1/auth/reset-password": {
      "post": {
        "tags": [
          "Authentication"
        ],
        "summary": "Reset password",
        "description": "Reset password using the token from email",
        "operationId": "reset_password_api_v1_auth_reset_password_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PasswordReset"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_dict_"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "security": []
      }
    },
    "/api/v1/auth/sessions": {
      "get": {
        "tags": [
          "Authentication"
        ],
        "summary": "List sessions",
        "description": "Get all active sessions for the current user",
        "operationId": "list_sessions_api_v1_auth_sessions_get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_SessionListResponse_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "delete": {
        "tags": [
          "Authentication"
        ],
        "summary": "Logout all sessions",
        "description": "Terminate all sessions except the current one (force logout from all devices)",
        "operationId": "logout_all_sessions_api_v1_auth_sessions_delete",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "include_current",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false,
              "title": "Include Current"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_LogoutAllResponse_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/auth/sessions/{session_id}": {
      "delete": {
        "tags": [
          "Authentication"
        ],
        "summary": "Terminate session",
        "description": "Terminate a specific session",
        "operationId": "terminate_session_api_v1_auth_sessions__session_id__delete",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Session Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_dict_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/auth/logout": {
      "post": {
        "tags": [
          "Authentication"
        ],
        "summary": "Logout",
        "description": "Logout the current session",
        "operationId": "logout_api_v1_auth_logout_post",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_dict_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ]
      }
    },
    "/api/v1/auth/register": {
      "post": {
        "tags": [
          "Registration"
        ],
        "summary": "Register new user",
        "description": "Create a new user account. Requires accepting terms of service. After registration, verify your email to access the dashboard.",
        "operationId": "register_api_v1_auth_register_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RegisterRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_RegisterResponse_"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "security": []
      }
    },
    "/api/v1/audit/logs": {
      "get": {
        "tags": [
          "Audit"
        ],
        "summary": "List audit logs",
        "description": "Get audit logs for the user's organization",
        "operationId": "list_audit_logs_api_v1_audit_logs_get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "action",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by action type",
              "title": "Action"
            },
            "description": "Filter by action type"
          },
          {
            "name": "resource_type",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by resource type",
              "title": "Resource Type"
            },
            "description": "Filter by resource type"
          },
          {
            "name": "user_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by user ID",
              "title": "User Id"
            },
            "description": "Filter by user ID"
          },
          {
            "name": "from_date",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter from date",
              "title": "From Date"
            },
            "description": "Filter from date"
          },
          {
            "name": "to_date",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter to date",
              "title": "To Date"
            },
            "description": "Filter to date"
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1,
              "title": "Page"
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "default": 50,
              "title": "Page Size"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_AuditLogListResponse_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/blocklist-ips": {
      "get": {
        "tags": [
          "Blocklist IPs"
        ],
        "summary": "List blocklist entries",
        "description": "Get all blocked IPs/CIDRs for an account",
        "operationId": "list_entries_api_v1_blocklist_ips_get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Account ID",
              "title": "Account Id"
            },
            "description": "Account ID"
          },
          {
            "name": "include_inactive",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "Include inactive entries",
              "default": false,
              "title": "Include Inactive"
            },
            "description": "Include inactive entries"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_BlocklistIPList_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "post": {
        "tags": [
          "Blocklist IPs"
        ],
        "summary": "Create blocklist entry",
        "description": "Add a new IP/CIDR to the blocklist",
        "operationId": "create_entry_api_v1_blocklist_ips_post",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Account ID",
              "title": "Account Id"
            },
            "description": "Account ID"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BlocklistIPCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_BlocklistIPResponse_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/blocklist-ips/{entry_id}": {
      "get": {
        "tags": [
          "Blocklist IPs"
        ],
        "summary": "Get blocklist entry",
        "description": "Get details of a specific blocklist entry",
        "operationId": "get_entry_api_v1_blocklist_ips__entry_id__get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "entry_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Entry Id"
            }
          },
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Account ID",
              "title": "Account Id"
            },
            "description": "Account ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_BlocklistIPResponse_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "patch": {
        "tags": [
          "Blocklist IPs"
        ],
        "summary": "Update blocklist entry",
        "description": "Update an existing blocklist entry",
        "operationId": "update_entry_api_v1_blocklist_ips__entry_id__patch",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "entry_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Entry Id"
            }
          },
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Account ID",
              "title": "Account Id"
            },
            "description": "Account ID"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BlocklistIPUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_BlocklistIPResponse_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "delete": {
        "tags": [
          "Blocklist IPs"
        ],
        "summary": "Delete blocklist entry",
        "description": "Remove an IP/CIDR from the blocklist",
        "operationId": "delete_entry_api_v1_blocklist_ips__entry_id__delete",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "entry_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Entry Id"
            }
          },
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Account ID",
              "title": "Account Id"
            },
            "description": "Account ID"
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/bot-stats/overview": {
      "get": {
        "tags": [
          "Bot Stats"
        ],
        "summary": "Get bot detection overview",
        "description": "Returns an overview of bot detection statistics including score distribution and top flags.",
        "operationId": "get_bot_stats_overview_api_v1_bot_stats_overview_get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Account ID to query stats for",
              "title": "Account Id"
            },
            "description": "Account ID to query stats for"
          },
          {
            "name": "days",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 90,
              "minimum": 1,
              "description": "Number of days to analyze",
              "default": 30,
              "title": "Days"
            },
            "description": "Number of days to analyze"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_BotStatsOverview_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/bot-stats/suspicious-sessions": {
      "get": {
        "tags": [
          "Bot Stats"
        ],
        "summary": "Get suspicious sessions",
        "description": "Returns sessions with high suspicion scores for investigation.",
        "operationId": "get_suspicious_sessions_api_v1_bot_stats_suspicious_sessions_get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Account ID to query",
              "title": "Account Id"
            },
            "description": "Account ID to query"
          },
          {
            "name": "min_score",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "description": "Minimum score threshold",
              "default": 50,
              "title": "Min Score"
            },
            "description": "Minimum score threshold"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "description": "Maximum results",
              "default": 20,
              "title": "Limit"
            },
            "description": "Maximum results"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_list_dict__"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/ip-allowlist/settings": {
      "get": {
        "tags": [
          "IP Allowlist"
        ],
        "summary": "Get IP allowlist settings",
        "description": "Get IP allowlist configuration for an account",
        "operationId": "get_settings_api_v1_ip_allowlist_settings_get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Account ID",
              "title": "Account Id"
            },
            "description": "Account ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_IPAllowlistSettingsResponse_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "put": {
        "tags": [
          "IP Allowlist"
        ],
        "summary": "Update IP allowlist settings",
        "description": "Enable/disable IP allowlist and configure enforcement options",
        "operationId": "update_settings_api_v1_ip_allowlist_settings_put",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Account ID",
              "title": "Account Id"
            },
            "description": "Account ID"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IPAllowlistSettingsUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_IPAllowlistSettingsResponse_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/ip-allowlist/patterns": {
      "get": {
        "tags": [
          "IP Allowlist"
        ],
        "summary": "List IP patterns",
        "description": "Get all IP patterns in the allowlist for an account",
        "operationId": "list_patterns_api_v1_ip_allowlist_patterns_get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Account ID",
              "title": "Account Id"
            },
            "description": "Account ID"
          },
          {
            "name": "include_inactive",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "Include inactive patterns",
              "default": false,
              "title": "Include Inactive"
            },
            "description": "Include inactive patterns"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_IPPatternList_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "post": {
        "tags": [
          "IP Allowlist"
        ],
        "summary": "Create IP pattern",
        "description": "Add a new IP pattern to the allowlist",
        "operationId": "create_pattern_api_v1_ip_allowlist_patterns_post",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Account ID",
              "title": "Account Id"
            },
            "description": "Account ID"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IPPatternCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_IPPatternResponse_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/ip-allowlist/patterns/{pattern_id}": {
      "get": {
        "tags": [
          "IP Allowlist"
        ],
        "summary": "Get IP pattern",
        "description": "Get details of a specific IP pattern",
        "operationId": "get_pattern_api_v1_ip_allowlist_patterns__pattern_id__get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "pattern_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Pattern Id"
            }
          },
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Account ID",
              "title": "Account Id"
            },
            "description": "Account ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_IPPatternResponse_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "patch": {
        "tags": [
          "IP Allowlist"
        ],
        "summary": "Update IP pattern",
        "description": "Update an existing IP pattern",
        "operationId": "update_pattern_api_v1_ip_allowlist_patterns__pattern_id__patch",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "pattern_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Pattern Id"
            }
          },
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Account ID",
              "title": "Account Id"
            },
            "description": "Account ID"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IPPatternUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_IPPatternResponse_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "delete": {
        "tags": [
          "IP Allowlist"
        ],
        "summary": "Delete IP pattern",
        "description": "Remove an IP pattern from the allowlist",
        "operationId": "delete_pattern_api_v1_ip_allowlist_patterns__pattern_id__delete",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "pattern_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Pattern Id"
            }
          },
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Account ID",
              "title": "Account Id"
            },
            "description": "Account ID"
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/ip-allowlist/patterns/bulk": {
      "post": {
        "tags": [
          "IP Allowlist"
        ],
        "summary": "Bulk create patterns",
        "description": "Create multiple IP patterns at once (max 100)",
        "operationId": "bulk_create_patterns_api_v1_ip_allowlist_patterns_bulk_post",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Account ID",
              "title": "Account Id"
            },
            "description": "Account ID"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IPPatternBulkCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_IPPatternBulkResult_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/ip-allowlist/patterns/bulk-delete": {
      "post": {
        "tags": [
          "IP Allowlist"
        ],
        "summary": "Bulk delete patterns",
        "description": "Delete multiple IP patterns at once (max 100)",
        "operationId": "bulk_delete_patterns_api_v1_ip_allowlist_patterns_bulk_delete_post",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Account ID",
              "title": "Account Id"
            },
            "description": "Account ID"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IPPatternBulkDelete"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_IPPatternBulkResult_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/ip-allowlist/import": {
      "post": {
        "tags": [
          "IP Allowlist"
        ],
        "summary": "Import IP patterns",
        "description": "Import IP patterns from text (one per line, supports # comments)",
        "operationId": "import_patterns_api_v1_ip_allowlist_import_post",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Account ID",
              "title": "Account Id"
            },
            "description": "Account ID"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IPPatternImport"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_IPPatternBulkResult_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/ip-allowlist/export": {
      "get": {
        "tags": [
          "IP Allowlist"
        ],
        "summary": "Export IP patterns",
        "description": "Export IP patterns to text format",
        "operationId": "export_patterns_api_v1_ip_allowlist_export_get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Account ID",
              "title": "Account Id"
            },
            "description": "Account ID"
          },
          {
            "name": "include_inactive",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "Include inactive patterns",
              "default": false,
              "title": "Include Inactive"
            },
            "description": "Include inactive patterns"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_IPPatternExport_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/ip-allowlist/check": {
      "post": {
        "tags": [
          "IP Allowlist"
        ],
        "summary": "Check IP access",
        "description": "Test if an IP address would be allowed for this account",
        "operationId": "check_ip_api_v1_ip_allowlist_check_post",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Account ID",
              "title": "Account Id"
            },
            "description": "Account ID"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IPCheckRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_IPCheckResponse_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/ip-allowlist/check-current": {
      "get": {
        "tags": [
          "IP Allowlist"
        ],
        "summary": "Check current IP",
        "description": "Check if your current IP is allowed for this account",
        "operationId": "check_current_ip_api_v1_ip_allowlist_check_current_get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Account ID",
              "title": "Account Id"
            },
            "description": "Account ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_IPCheckResponse_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/ip-allowlist/audit": {
      "get": {
        "tags": [
          "IP Allowlist"
        ],
        "summary": "List access attempts",
        "description": "View IP access attempt audit log",
        "operationId": "list_access_attempts_api_v1_ip_allowlist_audit_get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Account ID",
              "title": "Account Id"
            },
            "description": "Account ID"
          },
          {
            "name": "denied_only",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "Show only denied attempts",
              "default": false,
              "title": "Denied Only"
            },
            "description": "Show only denied attempts"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 1000,
              "minimum": 1,
              "description": "Number of results",
              "default": 100,
              "title": "Limit"
            },
            "description": "Number of results"
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "description": "Offset for pagination",
              "default": 0,
              "title": "Offset"
            },
            "description": "Offset for pagination"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_IPAccessAttemptList_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/passthrough-referrers": {
      "get": {
        "tags": [
          "Passthrough Referrers"
        ],
        "summary": "List passthrough referrers",
        "description": "Get all passthrough referrers configured for an account",
        "operationId": "list_referrers_api_v1_passthrough_referrers_get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Account ID",
              "title": "Account Id"
            },
            "description": "Account ID"
          },
          {
            "name": "include_inactive",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "Include inactive referrers",
              "default": false,
              "title": "Include Inactive"
            },
            "description": "Include inactive referrers"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_PassthroughReferrerList_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "post": {
        "tags": [
          "Passthrough Referrers"
        ],
        "summary": "Create passthrough referrer",
        "description": "Add a new passthrough referrer domain for an account",
        "operationId": "create_referrer_api_v1_passthrough_referrers_post",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Account ID",
              "title": "Account Id"
            },
            "description": "Account ID"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PassthroughReferrerCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_PassthroughReferrerResponse_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/passthrough-referrers/{referrer_id}": {
      "get": {
        "tags": [
          "Passthrough Referrers"
        ],
        "summary": "Get passthrough referrer",
        "description": "Get details of a specific passthrough referrer",
        "operationId": "get_referrer_api_v1_passthrough_referrers__referrer_id__get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "referrer_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Referrer Id"
            }
          },
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Account ID",
              "title": "Account Id"
            },
            "description": "Account ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_PassthroughReferrerResponse_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "patch": {
        "tags": [
          "Passthrough Referrers"
        ],
        "summary": "Update passthrough referrer",
        "description": "Update an existing passthrough referrer",
        "operationId": "update_referrer_api_v1_passthrough_referrers__referrer_id__patch",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "referrer_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Referrer Id"
            }
          },
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Account ID",
              "title": "Account Id"
            },
            "description": "Account ID"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PassthroughReferrerUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_PassthroughReferrerResponse_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "delete": {
        "tags": [
          "Passthrough Referrers"
        ],
        "summary": "Delete passthrough referrer",
        "description": "Remove a passthrough referrer from an account",
        "operationId": "delete_referrer_api_v1_passthrough_referrers__referrer_id__delete",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "referrer_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Referrer Id"
            }
          },
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Account ID",
              "title": "Account Id"
            },
            "description": "Account ID"
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/referrer-mappings": {
      "get": {
        "tags": [
          "Referrer Mappings"
        ],
        "summary": "List referrer mappings",
        "description": "Get all referrer to UTM mappings for an account",
        "operationId": "list_mappings_api_v1_referrer_mappings_get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Account ID",
              "title": "Account Id"
            },
            "description": "Account ID"
          },
          {
            "name": "include_inactive",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "Include inactive mappings",
              "default": false,
              "title": "Include Inactive"
            },
            "description": "Include inactive mappings"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_ReferrerMappingList_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "post": {
        "tags": [
          "Referrer Mappings"
        ],
        "summary": "Create referrer mapping",
        "description": "Add a new referrer to UTM mapping",
        "operationId": "create_mapping_api_v1_referrer_mappings_post",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Account ID",
              "title": "Account Id"
            },
            "description": "Account ID"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReferrerMappingCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_ReferrerMappingResponse_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/referrer-mappings/{mapping_id}": {
      "get": {
        "tags": [
          "Referrer Mappings"
        ],
        "summary": "Get referrer mapping",
        "description": "Get details of a specific referrer mapping",
        "operationId": "get_mapping_api_v1_referrer_mappings__mapping_id__get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "mapping_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Mapping Id"
            }
          },
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Account ID",
              "title": "Account Id"
            },
            "description": "Account ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_ReferrerMappingResponse_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "patch": {
        "tags": [
          "Referrer Mappings"
        ],
        "summary": "Update referrer mapping",
        "description": "Update an existing referrer mapping",
        "operationId": "update_mapping_api_v1_referrer_mappings__mapping_id__patch",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "mapping_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Mapping Id"
            }
          },
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Account ID",
              "title": "Account Id"
            },
            "description": "Account ID"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReferrerMappingUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_ReferrerMappingResponse_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "delete": {
        "tags": [
          "Referrer Mappings"
        ],
        "summary": "Delete referrer mapping",
        "description": "Remove a referrer mapping",
        "operationId": "delete_mapping_api_v1_referrer_mappings__mapping_id__delete",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "mapping_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Mapping Id"
            }
          },
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Account ID",
              "title": "Account Id"
            },
            "description": "Account ID"
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/channel-groups": {
      "get": {
        "tags": [
          "Channel Groups"
        ],
        "summary": "List channel group rules",
        "description": "Get all channel group rules (account-specific + global defaults)",
        "operationId": "list_rules_api_v1_channel_groups_get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Account ID",
              "title": "Account Id"
            },
            "description": "Account ID"
          },
          {
            "name": "include_inactive",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "Include inactive rules",
              "default": false,
              "title": "Include Inactive"
            },
            "description": "Include inactive rules"
          },
          {
            "name": "include_defaults",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "Include default system rules",
              "default": true,
              "title": "Include Defaults"
            },
            "description": "Include default system rules"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_ChannelGroupRuleList_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "post": {
        "tags": [
          "Channel Groups"
        ],
        "summary": "Create channel group rule",
        "description": "Create a custom channel group rule for the account",
        "operationId": "create_rule_api_v1_channel_groups_post",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Account ID",
              "title": "Account Id"
            },
            "description": "Account ID"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChannelGroupRuleCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_ChannelGroupRuleResponse_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/channel-groups/{rule_id}": {
      "get": {
        "tags": [
          "Channel Groups"
        ],
        "summary": "Get channel group rule",
        "description": "Get details of a specific channel group rule",
        "operationId": "get_rule_api_v1_channel_groups__rule_id__get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "rule_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Rule Id"
            }
          },
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Account ID",
              "title": "Account Id"
            },
            "description": "Account ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_ChannelGroupRuleResponse_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "patch": {
        "tags": [
          "Channel Groups"
        ],
        "summary": "Update channel group rule",
        "description": "Update an existing channel group rule (cannot modify default rules)",
        "operationId": "update_rule_api_v1_channel_groups__rule_id__patch",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "rule_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Rule Id"
            }
          },
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Account ID",
              "title": "Account Id"
            },
            "description": "Account ID"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChannelGroupRuleUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_ChannelGroupRuleResponse_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "delete": {
        "tags": [
          "Channel Groups"
        ],
        "summary": "Delete channel group rule",
        "description": "Delete a custom channel group rule (cannot delete default rules)",
        "operationId": "delete_rule_api_v1_channel_groups__rule_id__delete",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "rule_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Rule Id"
            }
          },
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Account ID",
              "title": "Account Id"
            },
            "description": "Account ID"
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/channel-groups/stats/channels": {
      "get": {
        "tags": [
          "Channel Groups"
        ],
        "summary": "Get channel metrics",
        "description": "Get traffic metrics grouped by channel",
        "operationId": "get_channel_stats_api_v1_channel_groups_stats_channels_get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Account ID",
              "title": "Account Id"
            },
            "description": "Account ID"
          },
          {
            "name": "start_date",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Start date (YYYY-MM-DD)",
              "title": "Start Date"
            },
            "description": "Start date (YYYY-MM-DD)"
          },
          {
            "name": "end_date",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "End date (YYYY-MM-DD)",
              "title": "End Date"
            },
            "description": "End date (YYYY-MM-DD)"
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by country code",
              "title": "Country"
            },
            "description": "Filter by country code"
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "description": "Page number",
              "default": 1,
              "title": "Page"
            },
            "description": "Page number"
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "description": "Page size",
              "default": 50,
              "title": "Page Size"
            },
            "description": "Page size"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_ChannelMetricsList_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/segments": {
      "get": {
        "tags": [
          "Segments"
        ],
        "summary": "List segments",
        "description": "Get all segments available for the account (user-created + system)",
        "operationId": "list_segments_api_v1_segments_get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Account ID",
              "title": "Account Id"
            },
            "description": "Account ID"
          },
          {
            "name": "include_system",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "Include system segments",
              "default": true,
              "title": "Include System"
            },
            "description": "Include system segments"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_list_SegmentSummary__"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "post": {
        "tags": [
          "Segments"
        ],
        "summary": "Create segment",
        "description": "Create a new saved segment",
        "operationId": "create_segment_api_v1_segments_post",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Account ID",
              "title": "Account Id"
            },
            "description": "Account ID"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SegmentCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_Segment_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/segments/{segment_id}": {
      "get": {
        "tags": [
          "Segments"
        ],
        "summary": "Get segment",
        "description": "Get a specific segment by ID or name",
        "operationId": "get_segment_api_v1_segments__segment_id__get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "segment_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Segment Id"
            }
          },
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Account ID",
              "title": "Account Id"
            },
            "description": "Account ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_Segment_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "put": {
        "tags": [
          "Segments"
        ],
        "summary": "Update segment",
        "description": "Update an existing segment",
        "operationId": "update_segment_api_v1_segments__segment_id__put",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "segment_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Segment Id"
            }
          },
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Account ID",
              "title": "Account Id"
            },
            "description": "Account ID"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SegmentUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_Segment_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "delete": {
        "tags": [
          "Segments"
        ],
        "summary": "Delete segment",
        "description": "Delete a segment",
        "operationId": "delete_segment_api_v1_segments__segment_id__delete",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "segment_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Segment Id"
            }
          },
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Account ID",
              "title": "Account Id"
            },
            "description": "Account ID"
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/segments/{segment_id}/duplicate": {
      "post": {
        "tags": [
          "Segments"
        ],
        "summary": "Duplicate segment",
        "description": "Create a copy of an existing segment",
        "operationId": "duplicate_segment_api_v1_segments__segment_id__duplicate_post",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "segment_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Segment Id"
            }
          },
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Account ID",
              "title": "Account Id"
            },
            "description": "Account ID"
          },
          {
            "name": "new_name",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9-]+$",
              "description": "Name for the new segment",
              "title": "New Name"
            },
            "description": "Name for the new segment"
          }
        ],
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_Segment_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/2fa/status": {
      "get": {
        "tags": [
          "Two-Factor Auth"
        ],
        "summary": "Get 2FA status",
        "description": "Check if 2FA is enabled for the current user and get status details",
        "operationId": "get_2fa_status_api_v1_2fa_status_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_TwoFactorStatusResponse_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ]
      }
    },
    "/api/v1/2fa/setup": {
      "post": {
        "tags": [
          "Two-Factor Auth"
        ],
        "summary": "Start 2FA setup",
        "description": "Generate TOTP secret and QR code to begin 2FA setup. Requires password verification.",
        "operationId": "start_setup_api_v1_2fa_setup_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TwoFactorSetupRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_TwoFactorSetupResponse_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ]
      }
    },
    "/api/v1/2fa/setup/verify": {
      "post": {
        "tags": [
          "Two-Factor Auth"
        ],
        "summary": "Complete 2FA setup",
        "description": "Verify TOTP code and activate 2FA. Must be done within setup expiry window.",
        "operationId": "complete_setup_api_v1_2fa_setup_verify_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TwoFactorVerifyRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_dict_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ]
      }
    },
    "/api/v1/2fa/setup/cancel": {
      "post": {
        "tags": [
          "Two-Factor Auth"
        ],
        "summary": "Cancel 2FA setup",
        "description": "Cancel pending 2FA setup",
        "operationId": "cancel_setup_api_v1_2fa_setup_cancel_post",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_dict_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ]
      }
    },
    "/api/v1/2fa/disable": {
      "post": {
        "tags": [
          "Two-Factor Auth"
        ],
        "summary": "Disable 2FA",
        "description": "Disable two-factor authentication. Requires password and current 2FA code.",
        "operationId": "disable_2fa_api_v1_2fa_disable_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TwoFactorDisableRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_dict_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ]
      }
    },
    "/api/v1/2fa/backup-codes/regenerate": {
      "post": {
        "tags": [
          "Two-Factor Auth"
        ],
        "summary": "Regenerate backup codes",
        "description": "Generate new backup codes. Old codes will be invalidated.",
        "operationId": "regenerate_backup_codes_api_v1_2fa_backup_codes_regenerate_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TwoFactorVerifyRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_BackupCodesResponse_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ]
      }
    },
    "/api/v1/2fa/verify-login": {
      "post": {
        "tags": [
          "Two-Factor Auth"
        ],
        "summary": "Verify 2FA for login",
        "description": "Complete login by verifying 2FA code. Called after initial password authentication.",
        "operationId": "verify_login_api_v1_2fa_verify_login_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TwoFactorLoginVerifyRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_dict_"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "security": []
      }
    },
    "/api/v1/email/verification-status": {
      "get": {
        "tags": [
          "Email Verification"
        ],
        "summary": "Get email verification status",
        "description": "Check if the current user's email is verified",
        "operationId": "get_verification_status_api_v1_email_verification_status_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_EmailVerificationStatusResponse_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ]
      }
    },
    "/api/v1/email/resend-verification": {
      "post": {
        "tags": [
          "Email Verification"
        ],
        "summary": "Resend verification email",
        "description": "Send a new verification email. Works for authenticated users or by providing email.",
        "operationId": "resend_verification_api_v1_email_resend_verification_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/ResendVerificationRequest"
                  },
                  {
                    "type": "null"
                  }
                ],
                "title": "Data"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_dict_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ]
      }
    },
    "/api/v1/email/verify": {
      "post": {
        "tags": [
          "Email Verification"
        ],
        "summary": "Verify email and auto-login",
        "description": "Verify email address using token from email link. Creates a session and returns auth token.",
        "operationId": "verify_email_api_v1_email_verify_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VerifyEmailRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "security": []
      }
    },
    "/api/v1/email/send-verification": {
      "post": {
        "tags": [
          "Email Verification"
        ],
        "summary": "Send verification email (admin)",
        "description": "Send verification email to a specific user. Requires admin privileges.",
        "operationId": "send_verification_admin_api_v1_email_send_verification_post",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "user_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "User Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_dict_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/shared-dashboards": {
      "post": {
        "tags": [
          "Shared Dashboards"
        ],
        "summary": "Create shared dashboard",
        "description": "Create a new shared dashboard.",
        "operationId": "create_shared_dashboard_api_v1_shared_dashboards_post",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Account ID",
              "title": "Account Id"
            },
            "description": "Account ID"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SharedDashboardCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SharedDashboardInfo"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "get": {
        "tags": [
          "Shared Dashboards"
        ],
        "summary": "List shared dashboards",
        "description": "List all shared dashboards for an account.",
        "operationId": "list_shared_dashboards_api_v1_shared_dashboards_get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Account ID",
              "title": "Account Id"
            },
            "description": "Account ID"
          },
          {
            "name": "include_inactive",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false,
              "title": "Include Inactive"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SharedDashboardListResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/shared-dashboards/{dashboard_id}": {
      "get": {
        "tags": [
          "Shared Dashboards"
        ],
        "summary": "Get shared dashboard",
        "description": "Get a shared dashboard by ID.",
        "operationId": "get_shared_dashboard_api_v1_shared_dashboards__dashboard_id__get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "dashboard_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Dashboard Id"
            }
          },
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Account ID",
              "title": "Account Id"
            },
            "description": "Account ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SharedDashboardInfo"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "patch": {
        "tags": [
          "Shared Dashboards"
        ],
        "summary": "Update shared dashboard",
        "description": "Update a shared dashboard.",
        "operationId": "update_shared_dashboard_api_v1_shared_dashboards__dashboard_id__patch",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "dashboard_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Dashboard Id"
            }
          },
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Account ID",
              "title": "Account Id"
            },
            "description": "Account ID"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SharedDashboardUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SharedDashboardInfo"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "delete": {
        "tags": [
          "Shared Dashboards"
        ],
        "summary": "Delete shared dashboard",
        "description": "Delete a shared dashboard.",
        "operationId": "delete_shared_dashboard_api_v1_shared_dashboards__dashboard_id__delete",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "dashboard_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Dashboard Id"
            }
          },
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Account ID",
              "title": "Account Id"
            },
            "description": "Account ID"
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/shared-dashboards/{dashboard_id}/embed": {
      "get": {
        "tags": [
          "Shared Dashboards"
        ],
        "summary": "Get embed configuration",
        "description": "Get embed configuration for a dashboard.",
        "operationId": "get_embed_config_api_v1_shared_dashboards__dashboard_id__embed_get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "dashboard_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Dashboard Id"
            }
          },
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Account ID",
              "title": "Account Id"
            },
            "description": "Account ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmbedConfigInfo"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "put": {
        "tags": [
          "Shared Dashboards"
        ],
        "summary": "Update embed configuration",
        "description": "Create or update embed configuration.",
        "operationId": "update_embed_config_api_v1_shared_dashboards__dashboard_id__embed_put",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "dashboard_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Dashboard Id"
            }
          },
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Account ID",
              "title": "Account Id"
            },
            "description": "Account ID"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmbedConfigCreate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmbedConfigInfo"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/shared-dashboards/public/{share_token}": {
      "get": {
        "tags": [
          "Shared Dashboards"
        ],
        "summary": "Get public dashboard info",
        "description": "Get public information about a shared dashboard.",
        "operationId": "get_public_dashboard_info_api_v1_shared_dashboards_public__share_token__get",
        "parameters": [
          {
            "name": "share_token",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Share Token"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SharedDashboardPublicInfo"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "security": []
      }
    },
    "/api/v1/shared-dashboards/public/{share_token}/access": {
      "post": {
        "tags": [
          "Shared Dashboards"
        ],
        "summary": "Access shared dashboard",
        "description": "Access a shared dashboard (with optional password).",
        "operationId": "access_shared_dashboard_api_v1_shared_dashboards_public__share_token__access_post",
        "parameters": [
          {
            "name": "share_token",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Share Token"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/SharedDashboardAccessRequest"
                  },
                  {
                    "type": "null"
                  }
                ],
                "title": "Data"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "security": []
      }
    },
    "/api/v1/email-reports": {
      "post": {
        "tags": [
          "Email Reports"
        ],
        "summary": "Create email report",
        "description": "Create a new scheduled email report.",
        "operationId": "create_email_report_api_v1_email_reports_post",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Account ID",
              "title": "Account Id"
            },
            "description": "Account ID"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmailReportCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmailReportInfo"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "get": {
        "tags": [
          "Email Reports"
        ],
        "summary": "List email reports",
        "description": "List all email reports for an account.",
        "operationId": "list_email_reports_api_v1_email_reports_get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Account ID",
              "title": "Account Id"
            },
            "description": "Account ID"
          },
          {
            "name": "include_inactive",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false,
              "title": "Include Inactive"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmailReportListResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/email-reports/{report_id}": {
      "get": {
        "tags": [
          "Email Reports"
        ],
        "summary": "Get email report",
        "description": "Get an email report by ID.",
        "operationId": "get_email_report_api_v1_email_reports__report_id__get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "report_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Report Id"
            }
          },
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Account ID",
              "title": "Account Id"
            },
            "description": "Account ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmailReportInfo"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "patch": {
        "tags": [
          "Email Reports"
        ],
        "summary": "Update email report",
        "description": "Update an email report.",
        "operationId": "update_email_report_api_v1_email_reports__report_id__patch",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "report_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Report Id"
            }
          },
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Account ID",
              "title": "Account Id"
            },
            "description": "Account ID"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmailReportUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmailReportInfo"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "delete": {
        "tags": [
          "Email Reports"
        ],
        "summary": "Delete email report",
        "description": "Delete an email report.",
        "operationId": "delete_email_report_api_v1_email_reports__report_id__delete",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "report_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Report Id"
            }
          },
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Account ID",
              "title": "Account Id"
            },
            "description": "Account ID"
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/email-reports/{report_id}/send": {
      "post": {
        "tags": [
          "Email Reports"
        ],
        "summary": "Send report now",
        "description": "Send a report immediately.",
        "operationId": "send_report_now_api_v1_email_reports__report_id__send_post",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "report_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Report Id"
            }
          },
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Account ID",
              "title": "Account Id"
            },
            "description": "Account ID"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/SendReportNowRequest"
                  },
                  {
                    "type": "null"
                  }
                ],
                "title": "Data"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SendReportResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/email-reports/{report_id}/history": {
      "get": {
        "tags": [
          "Email Reports"
        ],
        "summary": "Get report history",
        "description": "Get send history for a report.",
        "operationId": "get_report_history_api_v1_email_reports__report_id__history_get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "report_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Report Id"
            }
          },
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Account ID",
              "title": "Account Id"
            },
            "description": "Account ID"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "default": 20,
              "title": "Limit"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0,
              "title": "Offset"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReportHistoryListResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/exports": {
      "post": {
        "tags": [
          "Exports"
        ],
        "summary": "Create export",
        "description": "Create a new bulk export job.\n\nFor small exports (<10K rows), the export is generated synchronously.\nFor larger exports, a background job is created.\n\nReturns the job info and size estimate.",
        "operationId": "create_export_api_v1_exports_post",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Account ID",
              "title": "Account Id"
            },
            "description": "Account ID"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExportCreateRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExportCreateResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "get": {
        "tags": [
          "Exports"
        ],
        "summary": "List exports",
        "description": "List all exports for an account.",
        "operationId": "list_exports_api_v1_exports_get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Account ID",
              "title": "Account Id"
            },
            "description": "Account ID"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "default": 20,
              "title": "Limit"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0,
              "title": "Offset"
            }
          },
          {
            "name": "include_expired",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false,
              "title": "Include Expired"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExportListResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/exports/estimate": {
      "post": {
        "tags": [
          "Exports"
        ],
        "summary": "Estimate export size",
        "description": "Estimate export size without creating a job.\n\nUseful for UI to show estimated size before user confirms.",
        "operationId": "estimate_export_api_v1_exports_estimate_post",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Account ID",
              "title": "Account Id"
            },
            "description": "Account ID"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExportCreateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExportEstimate"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/exports/{job_id}": {
      "get": {
        "tags": [
          "Exports"
        ],
        "summary": "Get export status",
        "description": "Get export job status and details.",
        "operationId": "get_export_api_v1_exports__job_id__get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "job_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Job Id"
            }
          },
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Account ID",
              "title": "Account Id"
            },
            "description": "Account ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExportJobInfo"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "delete": {
        "tags": [
          "Exports"
        ],
        "summary": "Cancel/delete export",
        "description": "Cancel a pending export or delete a completed one.",
        "operationId": "delete_export_api_v1_exports__job_id__delete",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "job_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Job Id"
            }
          },
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Account ID",
              "title": "Account Id"
            },
            "description": "Account ID"
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/exports/download/{download_token}": {
      "get": {
        "tags": [
          "Exports"
        ],
        "summary": "Download export file",
        "description": "Download completed export file.\n\nUses secure download token - no additional auth required.\nToken expires after 24 hours.",
        "operationId": "download_export_api_v1_exports_download__download_token__get",
        "parameters": [
          {
            "name": "download_token",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Download Token"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Export file",
            "content": {
              "application/json": {
                "schema": {}
              },
              "text/csv": {}
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "security": []
      }
    },
    "/api/v1/exports/stream": {
      "post": {
        "tags": [
          "Exports"
        ],
        "summary": "Stream export directly",
        "description": "Stream export directly (for small exports only).\n\nReturns 413 if export exceeds 10K rows.",
        "operationId": "stream_export_api_v1_exports_stream_post",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Account ID",
              "title": "Account Id"
            },
            "description": "Account ID"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExportCreateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/exports/maintenance/cleanup": {
      "post": {
        "tags": [
          "Exports"
        ],
        "summary": "Cleanup expired exports",
        "description": "Delete expired export files.\n\nRequires admin role. Should be called periodically via cron job.",
        "operationId": "cleanup_exports_api_v1_exports_maintenance_cleanup_post",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ]
      }
    },
    "/api/v1/alerts/rules": {
      "post": {
        "tags": [
          "Alerts"
        ],
        "summary": "Create alert rule",
        "description": "Create a new alert rule.",
        "operationId": "create_alert_rule_api_v1_alerts_rules_post",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Account ID",
              "title": "Account Id"
            },
            "description": "Account ID"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AlertRuleCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AlertRuleInfo"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "get": {
        "tags": [
          "Alerts"
        ],
        "summary": "List alert rules",
        "description": "List all alert rules for an account.",
        "operationId": "list_alert_rules_api_v1_alerts_rules_get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Account ID",
              "title": "Account Id"
            },
            "description": "Account ID"
          },
          {
            "name": "include_inactive",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false,
              "title": "Include Inactive"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AlertRuleListResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/alerts/rules/{rule_id}": {
      "get": {
        "tags": [
          "Alerts"
        ],
        "summary": "Get alert rule",
        "description": "Get an alert rule by ID.",
        "operationId": "get_alert_rule_api_v1_alerts_rules__rule_id__get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "rule_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Rule Id"
            }
          },
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Account ID",
              "title": "Account Id"
            },
            "description": "Account ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AlertRuleInfo"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "patch": {
        "tags": [
          "Alerts"
        ],
        "summary": "Update alert rule",
        "description": "Update an alert rule.",
        "operationId": "update_alert_rule_api_v1_alerts_rules__rule_id__patch",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "rule_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Rule Id"
            }
          },
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Account ID",
              "title": "Account Id"
            },
            "description": "Account ID"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AlertRuleUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AlertRuleInfo"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "delete": {
        "tags": [
          "Alerts"
        ],
        "summary": "Delete alert rule",
        "description": "Delete an alert rule.",
        "operationId": "delete_alert_rule_api_v1_alerts_rules__rule_id__delete",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "rule_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Rule Id"
            }
          },
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Account ID",
              "title": "Account Id"
            },
            "description": "Account ID"
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/alerts/rules/{rule_id}/test": {
      "post": {
        "tags": [
          "Alerts"
        ],
        "summary": "Test alert rule",
        "description": "Test an alert rule without triggering it.",
        "operationId": "test_alert_rule_api_v1_alerts_rules__rule_id__test_post",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "rule_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Rule Id"
            }
          },
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Account ID",
              "title": "Account Id"
            },
            "description": "Account ID"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/TestAlertRequest"
                  },
                  {
                    "type": "null"
                  }
                ],
                "title": "Data"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TestAlertResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/alerts/history": {
      "get": {
        "tags": [
          "Alerts"
        ],
        "summary": "Get alert history",
        "description": "Get alert history for an account.",
        "operationId": "get_alert_history_api_v1_alerts_history_get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Account ID",
              "title": "Account Id"
            },
            "description": "Account ID"
          },
          {
            "name": "rule_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Rule Id"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/AlertStatus"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 200,
              "minimum": 1,
              "default": 50,
              "title": "Limit"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0,
              "title": "Offset"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AlertHistoryListResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/alerts/history/{alert_id}": {
      "patch": {
        "tags": [
          "Alerts"
        ],
        "summary": "Acknowledge alert",
        "description": "Acknowledge or update status of an alert.",
        "operationId": "acknowledge_alert_api_v1_alerts_history__alert_id__patch",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "alert_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Alert Id"
            }
          },
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Account ID",
              "title": "Account Id"
            },
            "description": "Account ID"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AcknowledgeAlertRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AlertHistoryInfo"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/alerts/stats": {
      "get": {
        "tags": [
          "Alerts"
        ],
        "summary": "Get alert statistics",
        "description": "Get alert statistics for an account.",
        "operationId": "get_alert_stats_api_v1_alerts_stats_get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Account ID",
              "title": "Account Id"
            },
            "description": "Account ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AlertStats"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/webhooks": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Create webhook endpoint",
        "description": "Create a new webhook endpoint subscription.\n\nThe webhook will receive events of the specified types when they occur.\nA secret key will be generated automatically for HMAC signature verification.",
        "operationId": "create_webhook_endpoint_api_v1_webhooks_post",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Account ID",
              "title": "Account Id"
            },
            "description": "Account ID"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEndpointCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookEndpointInfo"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "get": {
        "tags": [
          "Webhooks"
        ],
        "summary": "List webhook endpoints",
        "description": "List all webhook endpoints for an account.",
        "operationId": "list_webhook_endpoints_api_v1_webhooks_get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Account ID",
              "title": "Account Id"
            },
            "description": "Account ID"
          },
          {
            "name": "include_inactive",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "Include inactive endpoints",
              "default": false,
              "title": "Include Inactive"
            },
            "description": "Include inactive endpoints"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 200,
              "minimum": 1,
              "default": 50,
              "title": "Limit"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0,
              "title": "Offset"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookEndpointListResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/webhooks/event-types": {
      "get": {
        "tags": [
          "Webhooks"
        ],
        "summary": "List available event types",
        "description": "List all available webhook event types.\n\nReturns descriptions and schema URLs for each event type.",
        "operationId": "list_event_types_api_v1_webhooks_event_types_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookEventTypesResponse"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "security": []
      }
    },
    "/api/v1/webhooks/{endpoint_id}": {
      "get": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Get webhook endpoint",
        "description": "Get a webhook endpoint by ID.",
        "operationId": "get_webhook_endpoint_api_v1_webhooks__endpoint_id__get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "endpoint_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Endpoint Id"
            }
          },
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Account ID",
              "title": "Account Id"
            },
            "description": "Account ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookEndpointInfo"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "patch": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Update webhook endpoint",
        "description": "Update a webhook endpoint configuration.",
        "operationId": "update_webhook_endpoint_api_v1_webhooks__endpoint_id__patch",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "endpoint_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Endpoint Id"
            }
          },
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Account ID",
              "title": "Account Id"
            },
            "description": "Account ID"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEndpointUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookEndpointInfo"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "delete": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Delete webhook endpoint",
        "description": "Delete a webhook endpoint and all its delivery history.",
        "operationId": "delete_webhook_endpoint_api_v1_webhooks__endpoint_id__delete",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "endpoint_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Endpoint Id"
            }
          },
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Account ID",
              "title": "Account Id"
            },
            "description": "Account ID"
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/webhooks/{endpoint_id}/test": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Send test webhook",
        "description": "Send a test webhook to verify the endpoint is correctly configured.\n\nThe test payload will include a `test: true` flag in the metadata.\nOn first successful test, the endpoint will be marked as verified.",
        "operationId": "send_test_webhook_api_v1_webhooks__endpoint_id__test_post",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "endpoint_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Endpoint Id"
            }
          },
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Account ID",
              "title": "Account Id"
            },
            "description": "Account ID"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/WebhookTestRequest"
                  },
                  {
                    "type": "null"
                  }
                ],
                "title": "Data"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookTestResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/webhooks/{endpoint_id}/rotate-secret": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Rotate webhook secret",
        "description": "Rotate the webhook secret key.\n\nThe previous secret will remain valid for 24 hours to allow\nfor graceful migration without downtime.\n\n**Important**: The new secret is only shown once in this response.\nStore it securely.",
        "operationId": "rotate_webhook_secret_api_v1_webhooks__endpoint_id__rotate_secret_post",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "endpoint_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Endpoint Id"
            }
          },
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Account ID",
              "title": "Account Id"
            },
            "description": "Account ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookRotateSecretResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/webhooks/{endpoint_id}/deliveries": {
      "get": {
        "tags": [
          "Webhooks"
        ],
        "summary": "List webhook deliveries",
        "description": "List delivery history for a webhook endpoint.",
        "operationId": "list_webhook_deliveries_api_v1_webhooks__endpoint_id__deliveries_get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "endpoint_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Endpoint Id"
            }
          },
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Account ID",
              "title": "Account Id"
            },
            "description": "Account ID"
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/WebhookDeliveryStatus"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 200,
              "minimum": 1,
              "default": 50,
              "title": "Limit"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0,
              "title": "Offset"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookDeliveryListResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/webhooks/{endpoint_id}/deliveries/{delivery_id}": {
      "get": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Get delivery details",
        "description": "Get detailed information about a specific delivery including payload.",
        "operationId": "get_webhook_delivery_api_v1_webhooks__endpoint_id__deliveries__delivery_id__get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "endpoint_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Endpoint Id"
            }
          },
          {
            "name": "delivery_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Delivery Id"
            }
          },
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Account ID",
              "title": "Account Id"
            },
            "description": "Account ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookDeliveryDetail"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/webhooks/{endpoint_id}/deliveries/{delivery_id}/logs": {
      "get": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Get delivery attempt logs",
        "description": "Get all attempt logs for a specific delivery.",
        "operationId": "get_delivery_logs_api_v1_webhooks__endpoint_id__deliveries__delivery_id__logs_get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "endpoint_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Endpoint Id"
            }
          },
          {
            "name": "delivery_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Delivery Id"
            }
          },
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Account ID",
              "title": "Account Id"
            },
            "description": "Account ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/WebhookDeliveryLogInfo"
                  },
                  "title": "Response Get Delivery Logs Api V1 Webhooks  Endpoint Id  Deliveries  Delivery Id  Logs Get"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/webhooks/{endpoint_id}/deliveries/{delivery_id}/replay": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Replay delivery",
        "description": "Replay a failed delivery.\n\nCreates a new delivery with the same payload and queues it for delivery.\nUse `force=true` to replay a delivery that already succeeded.",
        "operationId": "replay_webhook_delivery_api_v1_webhooks__endpoint_id__deliveries__delivery_id__replay_post",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "endpoint_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Endpoint Id"
            }
          },
          {
            "name": "delivery_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Delivery Id"
            }
          },
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Account ID",
              "title": "Account Id"
            },
            "description": "Account ID"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/WebhookReplayRequest"
                  },
                  {
                    "type": "null"
                  }
                ],
                "title": "Data"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookReplayResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/webhooks/bulk/replay": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Replay multiple deliveries",
        "description": "Replay multiple failed deliveries at once.",
        "operationId": "bulk_replay_deliveries_api_v1_webhooks_bulk_replay_post",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Account ID",
              "title": "Account Id"
            },
            "description": "Account ID"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookBulkReplayRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookBulkReplayResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/webhooks/{endpoint_id}/stats": {
      "get": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Get endpoint statistics",
        "description": "Get delivery statistics and recent failures for a webhook endpoint.",
        "operationId": "get_webhook_stats_api_v1_webhooks__endpoint_id__stats_get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "endpoint_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Endpoint Id"
            }
          },
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Account ID",
              "title": "Account Id"
            },
            "description": "Account ID"
          },
          {
            "name": "hours",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 720,
              "minimum": 1,
              "description": "Hours to look back",
              "default": 24,
              "title": "Hours"
            },
            "description": "Hours to look back"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookStatsResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/assistant/chat": {
      "post": {
        "tags": [
          "Assistant"
        ],
        "summary": "Chat with AI assistant",
        "description": "Send a message to the AI assistant and get analytics insights",
        "operationId": "chat_api_v1_assistant_chat_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChatRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_ChatResponse_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ]
      }
    },
    "/api/v1/assistant/sessions": {
      "get": {
        "tags": [
          "Assistant"
        ],
        "summary": "List recent chat sessions",
        "description": "Get a list of recent chat sessions for the user",
        "operationId": "list_sessions_api_v1_assistant_sessions_get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Account ID",
              "title": "Account Id"
            },
            "description": "Account ID"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 50,
              "minimum": 1,
              "description": "Max sessions to return",
              "default": 10,
              "title": "Limit"
            },
            "description": "Max sessions to return"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_SessionsListResponse_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/assistant/conversations/{conversation_id}": {
      "get": {
        "tags": [
          "Assistant"
        ],
        "summary": "Get conversation history",
        "description": "Retrieve the history of a conversation",
        "operationId": "get_conversation_api_v1_assistant_conversations__conversation_id__get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "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/APIResponse_ConversationHistory_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "delete": {
        "tags": [
          "Assistant"
        ],
        "summary": "Delete a conversation",
        "description": "Delete a chat session and its history",
        "operationId": "delete_conversation_api_v1_assistant_conversations__conversation_id__delete",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "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/APIResponse_dict_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/assistant/tools": {
      "get": {
        "tags": [
          "Assistant"
        ],
        "summary": "List available tools",
        "description": "Get a list of all tools the assistant can use",
        "operationId": "list_tools_api_v1_assistant_tools_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_ToolsListResponse_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ]
      }
    },
    "/api/v1/lens/insights": {
      "get": {
        "tags": [
          "LENS Insights"
        ],
        "summary": "List insights",
        "description": "List insights for an account.\n\nReturns paginated list of AI-generated insights with filtering options.\nBy default, shows only active (non-dismissed, non-expired) insights.\nLocked insights (from Growth-only categories) are shown with limited info\nto encourage upgrading.",
        "operationId": "list_insights_api_v1_lens_insights_get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Account ID",
              "title": "Account Id"
            },
            "description": "Account ID"
          },
          {
            "name": "insight_type",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by insight type(s): anomaly, opportunity, trend, alert, health",
              "title": "Insight Type"
            },
            "description": "Filter by insight type(s): anomaly, opportunity, trend, alert, health"
          },
          {
            "name": "severity",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by severity: green, yellow, red",
              "title": "Severity"
            },
            "description": "Filter by severity: green, yellow, red"
          },
          {
            "name": "unread",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "Only show unread insights",
              "default": false,
              "title": "Unread"
            },
            "description": "Only show unread insights"
          },
          {
            "name": "include_dismissed",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "Include dismissed insights",
              "default": false,
              "title": "Include Dismissed"
            },
            "description": "Include dismissed insights"
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "description": "Page number",
              "default": 1,
              "title": "Page"
            },
            "description": "Page number"
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "description": "Items per page",
              "default": 50,
              "title": "Page Size"
            },
            "description": "Items per page"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InsightListResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/lens/insights/summary": {
      "get": {
        "tags": [
          "LENS Insights"
        ],
        "summary": "Get insights summary",
        "description": "Get insight summary for notifications/badges.\n\nReturns counts of insights by severity and read status.\nUseful for showing notification badges in the UI.",
        "operationId": "get_insights_summary_api_v1_lens_insights_summary_get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Account ID",
              "title": "Account Id"
            },
            "description": "Account ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/sealmetrics_api__routers__lens__InsightSummaryResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/lens/insights/grouped": {
      "get": {
        "tags": [
          "LENS Insights"
        ],
        "summary": "List grouped insights",
        "description": "List insights grouped by a common attribute.\n\nThis is useful for reducing noise when there are many similar insights.\nFor example, if there are 10 \"traffic drop\" insights over the past week,\nthey can be grouped into a single entry showing:\n- Total count of insights\n- Unread count\n- Combined economic impact\n- Most severe severity level\n- Most recent insight details\n- List of affected entities\n\nGroup by options:\n- source_rule: Group by the detection rule that generated the insight\n- insight_type: Group by type (anomaly, opportunity, etc.)\n- related_entity: Group by the entity affected (e.g., product, channel)",
        "operationId": "list_grouped_insights_api_v1_lens_insights_grouped_get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Account ID",
              "title": "Account Id"
            },
            "description": "Account ID"
          },
          {
            "name": "group_by",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Field to group by: source_rule, insight_type, or related_entity",
              "default": "source_rule",
              "title": "Group By"
            },
            "description": "Field to group by: source_rule, insight_type, or related_entity"
          },
          {
            "name": "include_dismissed",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "Include dismissed insights",
              "default": false,
              "title": "Include Dismissed"
            },
            "description": "Include dismissed insights"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InsightGroupListResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/lens/insights/{insight_id}": {
      "get": {
        "tags": [
          "LENS Insights"
        ],
        "summary": "Get insight",
        "description": "Get a single insight by ID.",
        "operationId": "get_insight_api_v1_lens_insights__insight_id__get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "insight_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Insight Id"
            }
          },
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Account ID",
              "title": "Account Id"
            },
            "description": "Account ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InsightResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/lens/insights/{insight_id}/read": {
      "patch": {
        "tags": [
          "LENS Insights"
        ],
        "summary": "Mark insight as read",
        "description": "Mark an insight as read.",
        "operationId": "mark_insight_read_api_v1_lens_insights__insight_id__read_patch",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "insight_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Insight Id"
            }
          },
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Account ID",
              "title": "Account Id"
            },
            "description": "Account ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InsightResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/lens/insights/{insight_id}/unread": {
      "patch": {
        "tags": [
          "LENS Insights"
        ],
        "summary": "Mark insight as unread",
        "description": "Mark an insight as unread.",
        "operationId": "mark_insight_unread_api_v1_lens_insights__insight_id__unread_patch",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "insight_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Insight Id"
            }
          },
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Account ID",
              "title": "Account Id"
            },
            "description": "Account ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InsightResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/lens/insights/{insight_id}/dismiss": {
      "patch": {
        "tags": [
          "LENS Insights"
        ],
        "summary": "Dismiss insight",
        "description": "Dismiss an insight.\n\nDismissed insights won't appear in the default list view.",
        "operationId": "dismiss_insight_api_v1_lens_insights__insight_id__dismiss_patch",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "insight_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Insight Id"
            }
          },
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Account ID",
              "title": "Account Id"
            },
            "description": "Account ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InsightResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/lens/insights/{insight_id}/feedback": {
      "post": {
        "tags": [
          "LENS Insights"
        ],
        "summary": "Submit feedback",
        "description": "Submit feedback on an insight.\n\nFeedback helps improve the quality of future insights.",
        "operationId": "submit_feedback_api_v1_lens_insights__insight_id__feedback_post",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "insight_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Insight Id"
            }
          },
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Account ID",
              "title": "Account Id"
            },
            "description": "Account ID"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FeedbackRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/lens/maintenance/cleanup": {
      "post": {
        "tags": [
          "LENS Insights",
          "Maintenance"
        ],
        "summary": "Archive expired insights",
        "description": "Archive expired and old dismissed insights.\n\nThis endpoint:\n1. Archives insights where expires_at has passed\n2. Archives dismissed insights older than 7 days\n3. Deletes archives older than 12 months\n\nRequires admin role. Should be called daily via cron job.",
        "operationId": "cleanup_insights_api_v1_lens_maintenance_cleanup_post",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ]
      }
    },
    "/api/v1/lens/settings": {
      "get": {
        "tags": [
          "LENS Insights"
        ],
        "summary": "Get LENS settings",
        "description": "Get LENS notification settings for an account.\n\nReturns the current configuration for email alerts and analysis frequency.",
        "operationId": "get_lens_settings_api_v1_lens_settings_get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Account ID",
              "title": "Account Id"
            },
            "description": "Account ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountSettingsResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "patch": {
        "tags": [
          "LENS Insights"
        ],
        "summary": "Update LENS settings",
        "description": "Update LENS notification settings for an account.\n\nConfigure when to receive email alerts:\n- notify_on_red: Receive alerts for critical issues (recommended)\n- notify_on_yellow: Receive alerts for warnings\n- notify_on_green: Receive alerts for opportunities\n\nEmail recipients must be valid email addresses.",
        "operationId": "update_lens_settings_api_v1_lens_settings_patch",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Account ID",
              "title": "Account Id"
            },
            "description": "Account ID"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AccountSettingsUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountSettingsResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/lens/chat/usage": {
      "get": {
        "tags": [
          "LENS Insights"
        ],
        "summary": "Get chat question usage",
        "description": "Get current chat question usage for an account.\n\nReturns the number of questions used, limit based on plan,\nbonus questions from purchased packs, and remaining questions.",
        "operationId": "get_chat_usage_api_v1_lens_chat_usage_get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Account ID",
              "title": "Account Id"
            },
            "description": "Account ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChatUsageResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/lens/chat/usage/increment": {
      "post": {
        "tags": [
          "LENS Insights"
        ],
        "summary": "Increment chat usage",
        "description": "Increment chat question usage and check if limit exceeded.\n\nCall this when a user sends a message to the chat.\nReturns whether the question was allowed or if the limit was exceeded.",
        "operationId": "increment_chat_usage_api_v1_lens_chat_usage_increment_post",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Account ID",
              "title": "Account Id"
            },
            "description": "Account ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChatUsageCheckResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/lens/reports": {
      "get": {
        "tags": [
          "LENS Reports"
        ],
        "summary": "List reports",
        "description": "List reports for an account.\n\nReturns paginated list of generated reports, ordered by period (newest first).",
        "operationId": "list_reports_api_v1_lens_reports_get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Account ID",
              "title": "Account Id"
            },
            "description": "Account ID"
          },
          {
            "name": "report_type",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by report type: weekly or monthly",
              "title": "Report Type"
            },
            "description": "Filter by report type: weekly or monthly"
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "description": "Page number",
              "default": 1,
              "title": "Page"
            },
            "description": "Page number"
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 50,
              "minimum": 1,
              "description": "Items per page",
              "default": 12,
              "title": "Page Size"
            },
            "description": "Items per page"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReportListResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/lens/reports/{report_id}": {
      "get": {
        "tags": [
          "LENS Reports"
        ],
        "summary": "Get report",
        "description": "Get a single report by ID.\n\nAutomatically marks the report as viewed.",
        "operationId": "get_report_api_v1_lens_reports__report_id__get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "report_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Report Id"
            }
          },
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Account ID",
              "title": "Account Id"
            },
            "description": "Account ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReportResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/lens/reports/generate": {
      "post": {
        "tags": [
          "LENS Reports"
        ],
        "summary": "Generate report",
        "description": "Generate a new report.\n\nIf a report for the same period already exists and is ready, returns it.\nOtherwise, generates a new report (this may take a few seconds).\n\nFor weekly reports, defaults to the last completed week (ending Sunday).\nFor monthly reports, defaults to the last completed month.",
        "operationId": "generate_report_api_v1_lens_reports_generate_post",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Account ID",
              "title": "Account Id"
            },
            "description": "Account ID"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GenerateReportRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReportResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/lens/reports/latest/{report_type}": {
      "get": {
        "tags": [
          "LENS Reports"
        ],
        "summary": "Get latest report",
        "description": "Get the latest report of a given type.\n\nReturns the most recent ready report for the account.\nIf no report exists, returns 404.",
        "operationId": "get_latest_report_api_v1_lens_reports_latest__report_type__get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "report_type",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Report Type"
            }
          },
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Account ID",
              "title": "Account Id"
            },
            "description": "Account ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReportResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/migration/test-connection": {
      "post": {
        "tags": [
          "Migration"
        ],
        "summary": "Test v1 connection",
        "description": "Test connection to Sealmetrics v1 API with provided credentials",
        "operationId": "test_v1_connection_api_v1_migration_test_connection_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/V1Credentials"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_V1ConnectionTest_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ]
      }
    },
    "/api/v1/migration/accounts/{account_id}/jobs": {
      "post": {
        "tags": [
          "Migration"
        ],
        "summary": "Start migration",
        "description": "Start a new migration job from v1 to v2",
        "operationId": "start_migration_api_v1_migration_accounts__account_id__jobs_post",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "account_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Account Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MigrationConfig"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_MigrationJobCreate_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "get": {
        "tags": [
          "Migration"
        ],
        "summary": "List migrations",
        "description": "Get list of migration jobs for an account",
        "operationId": "list_migrations_api_v1_migration_accounts__account_id__jobs_get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "account_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Account Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_MigrationJobListResponse_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/migration/jobs/{job_id}": {
      "get": {
        "tags": [
          "Migration"
        ],
        "summary": "Get migration job",
        "description": "Get details of a specific migration job",
        "operationId": "get_migration_job_api_v1_migration_jobs__job_id__get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "job_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Job Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_MigrationJobInfo_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/migration/jobs/{job_id}/progress": {
      "get": {
        "tags": [
          "Migration"
        ],
        "summary": "Get migration progress",
        "description": "Get current progress of a migration job",
        "operationId": "get_progress_api_v1_migration_jobs__job_id__progress_get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "job_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Job Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_MigrationProgress_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/migration/jobs/{job_id}/cancel": {
      "post": {
        "tags": [
          "Migration"
        ],
        "summary": "Cancel migration",
        "description": "Cancel a pending or running migration job",
        "operationId": "cancel_migration_api_v1_migration_jobs__job_id__cancel_post",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "job_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Job Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_dict_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/invitations/{token}": {
      "get": {
        "tags": [
          "Invitations"
        ],
        "summary": "Get invitation details",
        "description": "Get invitation details by token (public, no auth required)",
        "operationId": "get_invitation_api_v1_invitations__token__get",
        "parameters": [
          {
            "name": "token",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Token"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_dict_"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "security": []
      }
    },
    "/api/v1/invitations/accept": {
      "post": {
        "tags": [
          "Invitations"
        ],
        "summary": "Accept invitation (new user)",
        "description": "Accept an invitation and create a new account with auto-login",
        "operationId": "accept_invitation_new_user_api_v1_invitations_accept_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AcceptInvitationRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "security": []
      }
    },
    "/api/v1/invitations/accept-existing": {
      "post": {
        "tags": [
          "Invitations"
        ],
        "summary": "Accept invitation (existing user)",
        "description": "Accept an invitation as a logged-in user",
        "operationId": "accept_invitation_existing_user_api_v1_invitations_accept_existing_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AcceptInvitationExistingRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_dict_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ]
      }
    },
    "/api/v1/organizations": {
      "get": {
        "tags": [
          "Organizations"
        ],
        "summary": "List organizations",
        "description": "List all organizations the current user belongs to",
        "operationId": "list_organizations_api_v1_organizations_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_OrgListResponse_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ]
      },
      "post": {
        "tags": [
          "Organizations"
        ],
        "summary": "Create organization",
        "description": "Create a new organization. The creator becomes the owner.",
        "operationId": "create_organization_api_v1_organizations_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OrgCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_OrgInfo_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ]
      }
    },
    "/api/v1/organizations/{slug}": {
      "get": {
        "tags": [
          "Organizations"
        ],
        "summary": "Get organization",
        "description": "Get organization details by slug",
        "operationId": "get_organization_api_v1_organizations__slug__get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Slug"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_OrgInfo_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "patch": {
        "tags": [
          "Organizations"
        ],
        "summary": "Update organization",
        "description": "Update organization name. Only owners can update.",
        "operationId": "update_organization_api_v1_organizations__slug__patch",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Slug"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OrgUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_OrgInfo_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "delete": {
        "tags": [
          "Organizations"
        ],
        "summary": "Delete organization",
        "description": "Soft delete organization and all its sites. Requires name confirmation.",
        "operationId": "delete_organization_api_v1_organizations__slug__delete",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Slug"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OrgDeleteConfirmation"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_dict_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/organizations/{slug}/members": {
      "get": {
        "tags": [
          "Organizations"
        ],
        "summary": "List members",
        "description": "List all members of the organization",
        "operationId": "list_members_api_v1_organizations__slug__members_get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Slug"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_OrgMemberListResponse_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "post": {
        "tags": [
          "Organizations"
        ],
        "summary": "Add member",
        "description": "Add a user as a member of the organization",
        "operationId": "add_member_api_v1_organizations__slug__members_post",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Slug"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddMemberRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_dict_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/organizations/{slug}/members/{user_id}": {
      "patch": {
        "tags": [
          "Organizations"
        ],
        "summary": "Update member role",
        "description": "Change a member's role in the organization",
        "operationId": "update_member_role_api_v1_organizations__slug__members__user_id__patch",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "user_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "User Id"
            }
          },
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Slug"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateMemberRoleRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_dict_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "delete": {
        "tags": [
          "Organizations"
        ],
        "summary": "Remove member",
        "description": "Remove a member from the organization",
        "operationId": "remove_member_api_v1_organizations__slug__members__user_id__delete",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "user_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "User Id"
            }
          },
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Slug"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_dict_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/organizations/{slug}/sites": {
      "get": {
        "tags": [
          "Organizations"
        ],
        "summary": "List organization sites",
        "description": "List all sites belonging to the organization",
        "operationId": "list_org_sites_api_v1_organizations__slug__sites_get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Slug"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_dict_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/organizations/{slug}/members/{user_id}/sites": {
      "get": {
        "tags": [
          "Organizations"
        ],
        "summary": "List member's assigned sites",
        "description": "List sites assigned to a specific member",
        "operationId": "list_member_sites_api_v1_organizations__slug__members__user_id__sites_get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "user_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "User Id"
            }
          },
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Slug"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_dict_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "post": {
        "tags": [
          "Organizations"
        ],
        "summary": "Add site access",
        "description": "Grant a member access to one or more sites",
        "operationId": "add_member_site_access_api_v1_organizations__slug__members__user_id__sites_post",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "user_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "User Id"
            }
          },
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Slug"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SiteAccessUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_SiteAccessResponse_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/organizations/{slug}/members/{user_id}/sites/{site_id}": {
      "delete": {
        "tags": [
          "Organizations"
        ],
        "summary": "Remove site access",
        "description": "Remove a member's access to a specific site",
        "operationId": "remove_member_site_access_api_v1_organizations__slug__members__user_id__sites__site_id__delete",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "user_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "User Id"
            }
          },
          {
            "name": "site_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Site Id"
            }
          },
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Slug"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_dict_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/organizations/{slug}/invitations": {
      "get": {
        "tags": [
          "Organizations"
        ],
        "summary": "List invitations",
        "description": "List pending invitations for the organization",
        "operationId": "list_invitations_api_v1_organizations__slug__invitations_get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Slug"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_InvitationListResponse_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "post": {
        "tags": [
          "Organizations"
        ],
        "summary": "Invite member",
        "description": "Send an invitation email to join the organization",
        "operationId": "create_invitation_api_v1_organizations__slug__invitations_post",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Slug"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InvitationCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_InvitationCreateResponse_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/organizations/{slug}/invitations/{invitation_id}": {
      "delete": {
        "tags": [
          "Organizations"
        ],
        "summary": "Revoke invitation",
        "description": "Cancel a pending invitation",
        "operationId": "revoke_invitation_api_v1_organizations__slug__invitations__invitation_id__delete",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "invitation_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Invitation Id"
            }
          },
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Slug"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_dict_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/organizations/{slug}/invitations/{invitation_id}/resend": {
      "post": {
        "tags": [
          "Organizations"
        ],
        "summary": "Resend invitation",
        "description": "Resend invitation email with a new token",
        "operationId": "resend_invitation_api_v1_organizations__slug__invitations__invitation_id__resend_post",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "invitation_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Invitation Id"
            }
          },
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Slug"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_dict_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/integrations/bigquery": {
      "post": {
        "tags": [
          "BigQuery Integration"
        ],
        "summary": "Setup BigQuery integration",
        "description": "Setup BigQuery integration for an account.\n\n**Security:**\n- The Service Account JSON is encrypted at rest using AES-256-GCM\n- Only the account owner can configure this integration\n- The Service Account should have minimal BigQuery permissions\n\n**Required Service Account Permissions:**\n- bigquery.datasets.create (only for initial setup)\n- bigquery.datasets.get\n- bigquery.tables.create\n- bigquery.tables.updateData\n- bigquery.tables.get\n- bigquery.jobs.create\n\n**Process:**\n1. Validates the Service Account JSON\n2. Encrypts and stores credentials\n3. Creates the BigQuery dataset and tables\n4. Returns integration details\n\n**Note:** Data is NOT automatically synced after setup.\nUse the sync endpoint or wait for scheduled sync.",
        "operationId": "setup_bigquery_integration_api_v1_integrations_bigquery_post",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Account ID",
              "title": "Account Id"
            },
            "description": "Account ID"
          },
          {
            "name": "gcp_project_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Google Cloud project ID",
              "title": "Gcp Project Id"
            },
            "description": "Google Cloud project ID"
          },
          {
            "name": "dataset_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "BigQuery dataset name",
              "default": "sealmetrics",
              "title": "Dataset Id"
            },
            "description": "BigQuery dataset name"
          },
          {
            "name": "location",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Dataset location (EU, US)",
              "default": "EU",
              "title": "Location"
            },
            "description": "Dataset location (EU, US)"
          },
          {
            "name": "sync_frequency",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Sync frequency (hourly, daily, manual)",
              "default": "daily",
              "title": "Sync Frequency"
            },
            "description": "Sync frequency (hourly, daily, manual)"
          },
          {
            "name": "backfill_days",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 365,
              "minimum": 0,
              "description": "Days of historical data (preset mode)",
              "default": 30,
              "title": "Backfill Days"
            },
            "description": "Days of historical data (preset mode)"
          },
          {
            "name": "initial_date_from",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Custom initial sync start date",
              "title": "Initial Date From"
            },
            "description": "Custom initial sync start date"
          },
          {
            "name": "initial_date_to",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Custom initial sync end date",
              "title": "Initial Date To"
            },
            "description": "Custom initial sync end date"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Body_setup_bigquery_integration_api_v1_integrations_bigquery_post"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BigQuerySetupResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "get": {
        "tags": [
          "BigQuery Integration"
        ],
        "summary": "Get BigQuery integration",
        "description": "Get BigQuery integration configuration for an account.\n\nReturns null if no integration is configured.",
        "operationId": "get_bigquery_integration_api_v1_integrations_bigquery_get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Account ID",
              "title": "Account Id"
            },
            "description": "Account ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/BigQueryIntegrationInfo"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "title": "Response Get Bigquery Integration Api V1 Integrations Bigquery Get"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "patch": {
        "tags": [
          "BigQuery Integration"
        ],
        "summary": "Update BigQuery integration",
        "description": "Update BigQuery integration settings.\n\nCan update:\n- sync_frequency: How often to sync (hourly, daily, manual)\n- data_types: Which data to sync\n- is_active: Enable/disable sync\n- backfill_days: Historical data range",
        "operationId": "update_bigquery_integration_api_v1_integrations_bigquery_patch",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Account ID",
              "title": "Account Id"
            },
            "description": "Account ID"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BigQueryUpdateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BigQueryIntegrationInfo"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "delete": {
        "tags": [
          "BigQuery Integration"
        ],
        "summary": "Delete BigQuery integration",
        "description": "Delete BigQuery integration.\n\n**Important:** This only removes the integration configuration from SealMetrics.\nData already synced to BigQuery is NOT deleted - the client retains full\nownership of their BigQuery data.",
        "operationId": "delete_bigquery_integration_api_v1_integrations_bigquery_delete",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Account ID",
              "title": "Account Id"
            },
            "description": "Account ID"
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/integrations/bigquery/setup": {
      "post": {
        "tags": [
          "BigQuery Integration"
        ],
        "summary": "Setup BigQuery dataset and tables",
        "description": "Create BigQuery dataset and tables.\n\nThis creates the actual BigQuery resources using the stored credentials.\nMust be called after the integration is configured.\n\n**Creates:**\n- Dataset (if not exists)\n- All tables based on configured data_types\n- sync_metadata table for transparency\n\n**Note:** Without valid BigQuery credentials, this will use a mock\nclient that logs operations but doesn't connect to BigQuery.",
        "operationId": "setup_bigquery_dataset_api_v1_integrations_bigquery_setup_post",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Account ID",
              "title": "Account Id"
            },
            "description": "Account ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/integrations/bigquery/sync": {
      "post": {
        "tags": [
          "BigQuery Integration"
        ],
        "summary": "Trigger manual sync",
        "description": "Trigger a manual sync to BigQuery.\n\n**Parameters:**\n- date_from: Start date (defaults to last sync - 2 days, or backfill_days ago)\n- date_to: End date (defaults to today)\n\n**Returns:**\n- sync_id: Unique identifier for this sync operation\n- tables: Results per table (rows synced, bytes)\n- total_rows: Total rows synced\n- duration_seconds: How long the sync took\n\n**Note:** Without valid BigQuery credentials, this will use a mock\nclient that logs operations but doesn't actually sync data.",
        "operationId": "trigger_sync_api_v1_integrations_bigquery_sync_post",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Account ID",
              "title": "Account Id"
            },
            "description": "Account ID"
          },
          {
            "name": "date_from",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Start date",
              "title": "Date From"
            },
            "description": "Start date"
          },
          {
            "name": "date_to",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "null"
                }
              ],
              "description": "End date",
              "title": "Date To"
            },
            "description": "End date"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/integrations/bigquery/backfill": {
      "post": {
        "tags": [
          "BigQuery Integration"
        ],
        "summary": "Trigger backfill sync",
        "description": "Trigger a backfill sync for historical data.\n\nBackfill syncs are processed in chunks to avoid timeouts and\nprovide better progress visibility. Failed chunks are tracked\nand can be retried.\n\n**Parameters:**\n- date_from: Start date for backfill (required)\n- date_to: End date for backfill (required)\n- chunk_days: Days per chunk (1-30, default 7)\n\n**Returns:**\n- sync_id: Unique identifier for this backfill operation\n- tables: Results per table (rows synced, bytes)\n- total_chunks: Number of date chunks processed\n- failed_chunks: List of any chunks that failed\n\n**Note:** Backfill is limited to 365 days maximum.\nFor larger historical imports, run multiple backfills.",
        "operationId": "trigger_backfill_api_v1_integrations_bigquery_backfill_post",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Account ID",
              "title": "Account Id"
            },
            "description": "Account ID"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BigQueryBackfillRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BigQueryBackfillResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/integrations/bigquery/retry/{log_id}": {
      "post": {
        "tags": [
          "BigQuery Integration"
        ],
        "summary": "Retry a failed sync",
        "description": "Retry a failed sync operation.\n\nUses the same date range from the original sync.\nOnly failed or partial syncs can be retried.",
        "operationId": "retry_failed_sync_api_v1_integrations_bigquery_retry__log_id__post",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "log_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Log Id"
            }
          },
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Account ID",
              "title": "Account Id"
            },
            "description": "Account ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/integrations/bigquery/logs": {
      "get": {
        "tags": [
          "BigQuery Integration"
        ],
        "summary": "Get sync logs",
        "description": "Get BigQuery sync history.\n\nShows all sync operations with details:\n- Date range synced\n- Tables and rows synced\n- Duration and status\n- Any errors that occurred\n\nThis provides full transparency into what data has been sent to BigQuery.",
        "operationId": "get_sync_logs_api_v1_integrations_bigquery_logs_get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Account ID",
              "title": "Account Id"
            },
            "description": "Account ID"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "default": 20,
              "title": "Limit"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0,
              "title": "Offset"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BigQuerySyncLogsResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/integrations/bigquery/logs/{log_id}": {
      "get": {
        "tags": [
          "BigQuery Integration"
        ],
        "summary": "Get sync log detail",
        "description": "Get detailed information about a specific sync operation.",
        "operationId": "get_sync_log_detail_api_v1_integrations_bigquery_logs__log_id__get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "log_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Log Id"
            }
          },
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Account ID",
              "title": "Account Id"
            },
            "description": "Account ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BigQuerySyncLogInfo"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/integrations/bigquery/schema": {
      "get": {
        "tags": [
          "BigQuery Integration"
        ],
        "summary": "Get BigQuery table schemas",
        "description": "Get the schema for all BigQuery tables that SealMetrics creates.\n\n**Star Schema Design:**\n- fact_* tables: Fact tables with metrics and dimensions\n- dim_* tables: Dimension tables for lookups and context\n- sync_metadata: Auditing and transparency\n\nThis is useful for:\n- Understanding what data will be synced\n- Building custom queries in BigQuery\n- Documentation purposes",
        "operationId": "get_bigquery_schema_api_v1_integrations_bigquery_schema_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ]
      }
    },
    "/api/v1/saved-pixels": {
      "get": {
        "tags": [
          "Saved Pixels"
        ],
        "summary": "List saved pixels",
        "description": "Get all saved pixel configurations for the account",
        "operationId": "list_saved_pixels_api_v1_saved_pixels_get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Account ID",
              "title": "Account Id"
            },
            "description": "Account ID"
          },
          {
            "name": "pixel_type",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/PixelType"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by pixel type",
              "title": "Pixel Type"
            },
            "description": "Filter by pixel type"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_list_SavedPixelSummary__"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "post": {
        "tags": [
          "Saved Pixels"
        ],
        "summary": "Create saved pixel",
        "description": "Create a new saved pixel configuration",
        "operationId": "create_saved_pixel_api_v1_saved_pixels_post",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Account ID",
              "title": "Account Id"
            },
            "description": "Account ID"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SavedPixelCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_SavedPixel_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/v1/saved-pixels/options": {
      "get": {
        "tags": [
          "Saved Pixels"
        ],
        "summary": "Get pixel builder options",
        "description": "Get common conversion types and properties for the pixel builder UI",
        "operationId": "get_pixel_builder_options_api_v1_saved_pixels_options_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_dict_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ]
      }
    },
    "/api/v1/saved-pixels/{pixel_id}": {
      "get": {
        "tags": [
          "Saved Pixels"
        ],
        "summary": "Get saved pixel",
        "description": "Get a specific saved pixel by ID",
        "operationId": "get_saved_pixel_api_v1_saved_pixels__pixel_id__get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "pixel_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Pixel Id"
            }
          },
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Account ID",
              "title": "Account Id"
            },
            "description": "Account ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_SavedPixel_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "put": {
        "tags": [
          "Saved Pixels"
        ],
        "summary": "Update saved pixel",
        "description": "Update an existing saved pixel",
        "operationId": "update_saved_pixel_api_v1_saved_pixels__pixel_id__put",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "pixel_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Pixel Id"
            }
          },
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Account ID",
              "title": "Account Id"
            },
            "description": "Account ID"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SavedPixelUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIResponse_SavedPixel_"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "delete": {
        "tags": [
          "Saved Pixels"
        ],
        "summary": "Delete saved pixel",
        "description": "Delete a saved pixel",
        "operationId": "delete_saved_pixel_api_v1_saved_pixels__pixel_id__delete",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "pixel_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Pixel Id"
            }
          },
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Account ID",
              "title": "Account Id"
            },
            "description": "Account ID"
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "APIResponse_APITokenCreated_": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success",
            "description": "Request success status",
            "default": true
          },
          "data": {
            "$ref": "#/components/schemas/APITokenCreated",
            "description": "Response data"
          },
          "meta": {
            "additionalProperties": true,
            "type": "object",
            "title": "Meta",
            "description": "Response metadata"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp"
          }
        },
        "type": "object",
        "required": [
          "data"
        ],
        "title": "APIResponse[APITokenCreated]"
      },
      "APIResponse_APITokenList_": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success",
            "description": "Request success status",
            "default": true
          },
          "data": {
            "$ref": "#/components/schemas/APITokenList",
            "description": "Response data"
          },
          "meta": {
            "additionalProperties": true,
            "type": "object",
            "title": "Meta",
            "description": "Response metadata"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp"
          }
        },
        "type": "object",
        "required": [
          "data"
        ],
        "title": "APIResponse[APITokenList]"
      },
      "APIResponse_APITokenResponse_": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success",
            "description": "Request success status",
            "default": true
          },
          "data": {
            "$ref": "#/components/schemas/APITokenResponse",
            "description": "Response data"
          },
          "meta": {
            "additionalProperties": true,
            "type": "object",
            "title": "Meta",
            "description": "Response metadata"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp"
          }
        },
        "type": "object",
        "required": [
          "data"
        ],
        "title": "APIResponse[APITokenResponse]"
      },
      "APIResponse_APITokenScopesResponse_": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success",
            "description": "Request success status",
            "default": true
          },
          "data": {
            "$ref": "#/components/schemas/APITokenScopesResponse",
            "description": "Response data"
          },
          "meta": {
            "additionalProperties": true,
            "type": "object",
            "title": "Meta",
            "description": "Response metadata"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp"
          }
        },
        "type": "object",
        "required": [
          "data"
        ],
        "title": "APIResponse[APITokenScopesResponse]"
      },
      "APIResponse_AccountInfo_": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success",
            "description": "Request success status",
            "default": true
          },
          "data": {
            "$ref": "#/components/schemas/AccountInfo",
            "description": "Response data"
          },
          "meta": {
            "additionalProperties": true,
            "type": "object",
            "title": "Meta",
            "description": "Response metadata"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp"
          }
        },
        "type": "object",
        "required": [
          "data"
        ],
        "title": "APIResponse[AccountInfo]"
      },
      "APIResponse_AccountListResponse_": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success",
            "description": "Request success status",
            "default": true
          },
          "data": {
            "$ref": "#/components/schemas/sealmetrics_api__models__accounts__AccountListResponse",
            "description": "Response data"
          },
          "meta": {
            "additionalProperties": true,
            "type": "object",
            "title": "Meta",
            "description": "Response metadata"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp"
          }
        },
        "type": "object",
        "required": [
          "data"
        ],
        "title": "APIResponse[AccountListResponse]"
      },
      "APIResponse_AccountUserInfo_": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success",
            "description": "Request success status",
            "default": true
          },
          "data": {
            "$ref": "#/components/schemas/AccountUserInfo",
            "description": "Response data"
          },
          "meta": {
            "additionalProperties": true,
            "type": "object",
            "title": "Meta",
            "description": "Response metadata"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp"
          }
        },
        "type": "object",
        "required": [
          "data"
        ],
        "title": "APIResponse[AccountUserInfo]"
      },
      "APIResponse_AccountUserListResponse_": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success",
            "description": "Request success status",
            "default": true
          },
          "data": {
            "$ref": "#/components/schemas/AccountUserListResponse",
            "description": "Response data"
          },
          "meta": {
            "additionalProperties": true,
            "type": "object",
            "title": "Meta",
            "description": "Response metadata"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp"
          }
        },
        "type": "object",
        "required": [
          "data"
        ],
        "title": "APIResponse[AccountUserListResponse]"
      },
      "APIResponse_AggregatedOverview_": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success",
            "description": "Request success status",
            "default": true
          },
          "data": {
            "$ref": "#/components/schemas/AggregatedOverview",
            "description": "Response data"
          },
          "meta": {
            "additionalProperties": true,
            "type": "object",
            "title": "Meta",
            "description": "Response metadata"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp"
          }
        },
        "type": "object",
        "required": [
          "data"
        ],
        "title": "APIResponse[AggregatedOverview]"
      },
      "APIResponse_AuditLogListResponse_": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success",
            "description": "Request success status",
            "default": true
          },
          "data": {
            "$ref": "#/components/schemas/AuditLogListResponse",
            "description": "Response data"
          },
          "meta": {
            "additionalProperties": true,
            "type": "object",
            "title": "Meta",
            "description": "Response metadata"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp"
          }
        },
        "type": "object",
        "required": [
          "data"
        ],
        "title": "APIResponse[AuditLogListResponse]"
      },
      "APIResponse_BackupCodesResponse_": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success",
            "description": "Request success status",
            "default": true
          },
          "data": {
            "$ref": "#/components/schemas/BackupCodesResponse",
            "description": "Response data"
          },
          "meta": {
            "additionalProperties": true,
            "type": "object",
            "title": "Meta",
            "description": "Response metadata"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp"
          }
        },
        "type": "object",
        "required": [
          "data"
        ],
        "title": "APIResponse[BackupCodesResponse]"
      },
      "APIResponse_BlocklistIPList_": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success",
            "description": "Request success status",
            "default": true
          },
          "data": {
            "$ref": "#/components/schemas/BlocklistIPList",
            "description": "Response data"
          },
          "meta": {
            "additionalProperties": true,
            "type": "object",
            "title": "Meta",
            "description": "Response metadata"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp"
          }
        },
        "type": "object",
        "required": [
          "data"
        ],
        "title": "APIResponse[BlocklistIPList]"
      },
      "APIResponse_BlocklistIPResponse_": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success",
            "description": "Request success status",
            "default": true
          },
          "data": {
            "$ref": "#/components/schemas/BlocklistIPResponse",
            "description": "Response data"
          },
          "meta": {
            "additionalProperties": true,
            "type": "object",
            "title": "Meta",
            "description": "Response metadata"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp"
          }
        },
        "type": "object",
        "required": [
          "data"
        ],
        "title": "APIResponse[BlocklistIPResponse]"
      },
      "APIResponse_BotStatsOverview_": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success",
            "description": "Request success status",
            "default": true
          },
          "data": {
            "$ref": "#/components/schemas/BotStatsOverview",
            "description": "Response data"
          },
          "meta": {
            "additionalProperties": true,
            "type": "object",
            "title": "Meta",
            "description": "Response metadata"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp"
          }
        },
        "type": "object",
        "required": [
          "data"
        ],
        "title": "APIResponse[BotStatsOverview]"
      },
      "APIResponse_ChannelGroupRuleList_": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success",
            "description": "Request success status",
            "default": true
          },
          "data": {
            "$ref": "#/components/schemas/ChannelGroupRuleList",
            "description": "Response data"
          },
          "meta": {
            "additionalProperties": true,
            "type": "object",
            "title": "Meta",
            "description": "Response metadata"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp"
          }
        },
        "type": "object",
        "required": [
          "data"
        ],
        "title": "APIResponse[ChannelGroupRuleList]"
      },
      "APIResponse_ChannelGroupRuleResponse_": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success",
            "description": "Request success status",
            "default": true
          },
          "data": {
            "$ref": "#/components/schemas/ChannelGroupRuleResponse",
            "description": "Response data"
          },
          "meta": {
            "additionalProperties": true,
            "type": "object",
            "title": "Meta",
            "description": "Response metadata"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp"
          }
        },
        "type": "object",
        "required": [
          "data"
        ],
        "title": "APIResponse[ChannelGroupRuleResponse]"
      },
      "APIResponse_ChannelMetricsList_": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success",
            "description": "Request success status",
            "default": true
          },
          "data": {
            "$ref": "#/components/schemas/ChannelMetricsList",
            "description": "Response data"
          },
          "meta": {
            "additionalProperties": true,
            "type": "object",
            "title": "Meta",
            "description": "Response metadata"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp"
          }
        },
        "type": "object",
        "required": [
          "data"
        ],
        "title": "APIResponse[ChannelMetricsList]"
      },
      "APIResponse_ChatResponse_": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success",
            "description": "Request success status",
            "default": true
          },
          "data": {
            "$ref": "#/components/schemas/ChatResponse",
            "description": "Response data"
          },
          "meta": {
            "additionalProperties": true,
            "type": "object",
            "title": "Meta",
            "description": "Response metadata"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp"
          }
        },
        "type": "object",
        "required": [
          "data"
        ],
        "title": "APIResponse[ChatResponse]"
      },
      "APIResponse_ConversationHistory_": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success",
            "description": "Request success status",
            "default": true
          },
          "data": {
            "$ref": "#/components/schemas/ConversationHistory",
            "description": "Response data"
          },
          "meta": {
            "additionalProperties": true,
            "type": "object",
            "title": "Meta",
            "description": "Response metadata"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp"
          }
        },
        "type": "object",
        "required": [
          "data"
        ],
        "title": "APIResponse[ConversationHistory]"
      },
      "APIResponse_DomainInfo_": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success",
            "description": "Request success status",
            "default": true
          },
          "data": {
            "$ref": "#/components/schemas/DomainInfo",
            "description": "Response data"
          },
          "meta": {
            "additionalProperties": true,
            "type": "object",
            "title": "Meta",
            "description": "Response metadata"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp"
          }
        },
        "type": "object",
        "required": [
          "data"
        ],
        "title": "APIResponse[DomainInfo]"
      },
      "APIResponse_DomainListResponse_": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success",
            "description": "Request success status",
            "default": true
          },
          "data": {
            "$ref": "#/components/schemas/DomainListResponse",
            "description": "Response data"
          },
          "meta": {
            "additionalProperties": true,
            "type": "object",
            "title": "Meta",
            "description": "Response metadata"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp"
          }
        },
        "type": "object",
        "required": [
          "data"
        ],
        "title": "APIResponse[DomainListResponse]"
      },
      "APIResponse_EmailVerificationStatusResponse_": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success",
            "description": "Request success status",
            "default": true
          },
          "data": {
            "$ref": "#/components/schemas/EmailVerificationStatusResponse",
            "description": "Response data"
          },
          "meta": {
            "additionalProperties": true,
            "type": "object",
            "title": "Meta",
            "description": "Response metadata"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp"
          }
        },
        "type": "object",
        "required": [
          "data"
        ],
        "title": "APIResponse[EmailVerificationStatusResponse]"
      },
      "APIResponse_FunnelReport_": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success",
            "description": "Request success status",
            "default": true
          },
          "data": {
            "$ref": "#/components/schemas/FunnelReport",
            "description": "Response data"
          },
          "meta": {
            "additionalProperties": true,
            "type": "object",
            "title": "Meta",
            "description": "Response metadata"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp"
          }
        },
        "type": "object",
        "required": [
          "data"
        ],
        "title": "APIResponse[FunnelReport]"
      },
      "APIResponse_IPAccessAttemptList_": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success",
            "description": "Request success status",
            "default": true
          },
          "data": {
            "$ref": "#/components/schemas/IPAccessAttemptList",
            "description": "Response data"
          },
          "meta": {
            "additionalProperties": true,
            "type": "object",
            "title": "Meta",
            "description": "Response metadata"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp"
          }
        },
        "type": "object",
        "required": [
          "data"
        ],
        "title": "APIResponse[IPAccessAttemptList]"
      },
      "APIResponse_IPAllowlistSettingsResponse_": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success",
            "description": "Request success status",
            "default": true
          },
          "data": {
            "$ref": "#/components/schemas/IPAllowlistSettingsResponse",
            "description": "Response data"
          },
          "meta": {
            "additionalProperties": true,
            "type": "object",
            "title": "Meta",
            "description": "Response metadata"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp"
          }
        },
        "type": "object",
        "required": [
          "data"
        ],
        "title": "APIResponse[IPAllowlistSettingsResponse]"
      },
      "APIResponse_IPCheckResponse_": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success",
            "description": "Request success status",
            "default": true
          },
          "data": {
            "$ref": "#/components/schemas/IPCheckResponse",
            "description": "Response data"
          },
          "meta": {
            "additionalProperties": true,
            "type": "object",
            "title": "Meta",
            "description": "Response metadata"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp"
          }
        },
        "type": "object",
        "required": [
          "data"
        ],
        "title": "APIResponse[IPCheckResponse]"
      },
      "APIResponse_IPPatternBulkResult_": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success",
            "description": "Request success status",
            "default": true
          },
          "data": {
            "$ref": "#/components/schemas/IPPatternBulkResult",
            "description": "Response data"
          },
          "meta": {
            "additionalProperties": true,
            "type": "object",
            "title": "Meta",
            "description": "Response metadata"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp"
          }
        },
        "type": "object",
        "required": [
          "data"
        ],
        "title": "APIResponse[IPPatternBulkResult]"
      },
      "APIResponse_IPPatternExport_": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success",
            "description": "Request success status",
            "default": true
          },
          "data": {
            "$ref": "#/components/schemas/IPPatternExport",
            "description": "Response data"
          },
          "meta": {
            "additionalProperties": true,
            "type": "object",
            "title": "Meta",
            "description": "Response metadata"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp"
          }
        },
        "type": "object",
        "required": [
          "data"
        ],
        "title": "APIResponse[IPPatternExport]"
      },
      "APIResponse_IPPatternList_": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success",
            "description": "Request success status",
            "default": true
          },
          "data": {
            "$ref": "#/components/schemas/IPPatternList",
            "description": "Response data"
          },
          "meta": {
            "additionalProperties": true,
            "type": "object",
            "title": "Meta",
            "description": "Response metadata"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp"
          }
        },
        "type": "object",
        "required": [
          "data"
        ],
        "title": "APIResponse[IPPatternList]"
      },
      "APIResponse_IPPatternResponse_": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success",
            "description": "Request success status",
            "default": true
          },
          "data": {
            "$ref": "#/components/schemas/IPPatternResponse",
            "description": "Response data"
          },
          "meta": {
            "additionalProperties": true,
            "type": "object",
            "title": "Meta",
            "description": "Response metadata"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp"
          }
        },
        "type": "object",
        "required": [
          "data"
        ],
        "title": "APIResponse[IPPatternResponse]"
      },
      "APIResponse_InvitationCreateResponse_": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success",
            "description": "Request success status",
            "default": true
          },
          "data": {
            "$ref": "#/components/schemas/InvitationCreateResponse",
            "description": "Response data"
          },
          "meta": {
            "additionalProperties": true,
            "type": "object",
            "title": "Meta",
            "description": "Response metadata"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp"
          }
        },
        "type": "object",
        "required": [
          "data"
        ],
        "title": "APIResponse[InvitationCreateResponse]"
      },
      "APIResponse_InvitationListResponse_": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success",
            "description": "Request success status",
            "default": true
          },
          "data": {
            "$ref": "#/components/schemas/InvitationListResponse",
            "description": "Response data"
          },
          "meta": {
            "additionalProperties": true,
            "type": "object",
            "title": "Meta",
            "description": "Response metadata"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp"
          }
        },
        "type": "object",
        "required": [
          "data"
        ],
        "title": "APIResponse[InvitationListResponse]"
      },
      "APIResponse_LogoutAllResponse_": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success",
            "description": "Request success status",
            "default": true
          },
          "data": {
            "$ref": "#/components/schemas/LogoutAllResponse",
            "description": "Response data"
          },
          "meta": {
            "additionalProperties": true,
            "type": "object",
            "title": "Meta",
            "description": "Response metadata"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp"
          }
        },
        "type": "object",
        "required": [
          "data"
        ],
        "title": "APIResponse[LogoutAllResponse]"
      },
      "APIResponse_MigrationJobCreate_": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success",
            "description": "Request success status",
            "default": true
          },
          "data": {
            "$ref": "#/components/schemas/MigrationJobCreate",
            "description": "Response data"
          },
          "meta": {
            "additionalProperties": true,
            "type": "object",
            "title": "Meta",
            "description": "Response metadata"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp"
          }
        },
        "type": "object",
        "required": [
          "data"
        ],
        "title": "APIResponse[MigrationJobCreate]"
      },
      "APIResponse_MigrationJobInfo_": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success",
            "description": "Request success status",
            "default": true
          },
          "data": {
            "$ref": "#/components/schemas/MigrationJobInfo",
            "description": "Response data"
          },
          "meta": {
            "additionalProperties": true,
            "type": "object",
            "title": "Meta",
            "description": "Response metadata"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp"
          }
        },
        "type": "object",
        "required": [
          "data"
        ],
        "title": "APIResponse[MigrationJobInfo]"
      },
      "APIResponse_MigrationJobListResponse_": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success",
            "description": "Request success status",
            "default": true
          },
          "data": {
            "$ref": "#/components/schemas/MigrationJobListResponse",
            "description": "Response data"
          },
          "meta": {
            "additionalProperties": true,
            "type": "object",
            "title": "Meta",
            "description": "Response metadata"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp"
          }
        },
        "type": "object",
        "required": [
          "data"
        ],
        "title": "APIResponse[MigrationJobListResponse]"
      },
      "APIResponse_MigrationProgress_": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success",
            "description": "Request success status",
            "default": true
          },
          "data": {
            "$ref": "#/components/schemas/MigrationProgress",
            "description": "Response data"
          },
          "meta": {
            "additionalProperties": true,
            "type": "object",
            "title": "Meta",
            "description": "Response metadata"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp"
          }
        },
        "type": "object",
        "required": [
          "data"
        ],
        "title": "APIResponse[MigrationProgress]"
      },
      "APIResponse_OrgInfo_": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success",
            "description": "Request success status",
            "default": true
          },
          "data": {
            "$ref": "#/components/schemas/OrgInfo",
            "description": "Response data"
          },
          "meta": {
            "additionalProperties": true,
            "type": "object",
            "title": "Meta",
            "description": "Response metadata"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp"
          }
        },
        "type": "object",
        "required": [
          "data"
        ],
        "title": "APIResponse[OrgInfo]"
      },
      "APIResponse_OrgListResponse_": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success",
            "description": "Request success status",
            "default": true
          },
          "data": {
            "$ref": "#/components/schemas/OrgListResponse",
            "description": "Response data"
          },
          "meta": {
            "additionalProperties": true,
            "type": "object",
            "title": "Meta",
            "description": "Response metadata"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp"
          }
        },
        "type": "object",
        "required": [
          "data"
        ],
        "title": "APIResponse[OrgListResponse]"
      },
      "APIResponse_OrgMemberListResponse_": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success",
            "description": "Request success status",
            "default": true
          },
          "data": {
            "$ref": "#/components/schemas/OrgMemberListResponse",
            "description": "Response data"
          },
          "meta": {
            "additionalProperties": true,
            "type": "object",
            "title": "Meta",
            "description": "Response metadata"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp"
          }
        },
        "type": "object",
        "required": [
          "data"
        ],
        "title": "APIResponse[OrgMemberListResponse]"
      },
      "APIResponse_PassthroughReferrerList_": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success",
            "description": "Request success status",
            "default": true
          },
          "data": {
            "$ref": "#/components/schemas/PassthroughReferrerList",
            "description": "Response data"
          },
          "meta": {
            "additionalProperties": true,
            "type": "object",
            "title": "Meta",
            "description": "Response metadata"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp"
          }
        },
        "type": "object",
        "required": [
          "data"
        ],
        "title": "APIResponse[PassthroughReferrerList]"
      },
      "APIResponse_PassthroughReferrerResponse_": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success",
            "description": "Request success status",
            "default": true
          },
          "data": {
            "$ref": "#/components/schemas/PassthroughReferrerResponse",
            "description": "Response data"
          },
          "meta": {
            "additionalProperties": true,
            "type": "object",
            "title": "Meta",
            "description": "Response metadata"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp"
          }
        },
        "type": "object",
        "required": [
          "data"
        ],
        "title": "APIResponse[PassthroughReferrerResponse]"
      },
      "APIResponse_PixelCode_": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success",
            "description": "Request success status",
            "default": true
          },
          "data": {
            "$ref": "#/components/schemas/PixelCode",
            "description": "Response data"
          },
          "meta": {
            "additionalProperties": true,
            "type": "object",
            "title": "Meta",
            "description": "Response metadata"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp"
          }
        },
        "type": "object",
        "required": [
          "data"
        ],
        "title": "APIResponse[PixelCode]"
      },
      "APIResponse_PixelStatus_": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success",
            "description": "Request success status",
            "default": true
          },
          "data": {
            "$ref": "#/components/schemas/PixelStatus",
            "description": "Response data"
          },
          "meta": {
            "additionalProperties": true,
            "type": "object",
            "title": "Meta",
            "description": "Response metadata"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp"
          }
        },
        "type": "object",
        "required": [
          "data"
        ],
        "title": "APIResponse[PixelStatus]"
      },
      "APIResponse_ReferrerMappingList_": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success",
            "description": "Request success status",
            "default": true
          },
          "data": {
            "$ref": "#/components/schemas/ReferrerMappingList",
            "description": "Response data"
          },
          "meta": {
            "additionalProperties": true,
            "type": "object",
            "title": "Meta",
            "description": "Response metadata"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp"
          }
        },
        "type": "object",
        "required": [
          "data"
        ],
        "title": "APIResponse[ReferrerMappingList]"
      },
      "APIResponse_ReferrerMappingResponse_": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success",
            "description": "Request success status",
            "default": true
          },
          "data": {
            "$ref": "#/components/schemas/ReferrerMappingResponse",
            "description": "Response data"
          },
          "meta": {
            "additionalProperties": true,
            "type": "object",
            "title": "Meta",
            "description": "Response metadata"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp"
          }
        },
        "type": "object",
        "required": [
          "data"
        ],
        "title": "APIResponse[ReferrerMappingResponse]"
      },
      "APIResponse_RegisterResponse_": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success",
            "description": "Request success status",
            "default": true
          },
          "data": {
            "$ref": "#/components/schemas/RegisterResponse",
            "description": "Response data"
          },
          "meta": {
            "additionalProperties": true,
            "type": "object",
            "title": "Meta",
            "description": "Response metadata"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp"
          }
        },
        "type": "object",
        "required": [
          "data"
        ],
        "title": "APIResponse[RegisterResponse]"
      },
      "APIResponse_SavedPixel_": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success",
            "description": "Request success status",
            "default": true
          },
          "data": {
            "$ref": "#/components/schemas/SavedPixel",
            "description": "Response data"
          },
          "meta": {
            "additionalProperties": true,
            "type": "object",
            "title": "Meta",
            "description": "Response metadata"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp"
          }
        },
        "type": "object",
        "required": [
          "data"
        ],
        "title": "APIResponse[SavedPixel]"
      },
      "APIResponse_Segment_": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success",
            "description": "Request success status",
            "default": true
          },
          "data": {
            "$ref": "#/components/schemas/Segment",
            "description": "Response data"
          },
          "meta": {
            "additionalProperties": true,
            "type": "object",
            "title": "Meta",
            "description": "Response metadata"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp"
          }
        },
        "type": "object",
        "required": [
          "data"
        ],
        "title": "APIResponse[Segment]"
      },
      "APIResponse_SessionListResponse_": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success",
            "description": "Request success status",
            "default": true
          },
          "data": {
            "$ref": "#/components/schemas/SessionListResponse",
            "description": "Response data"
          },
          "meta": {
            "additionalProperties": true,
            "type": "object",
            "title": "Meta",
            "description": "Response metadata"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp"
          }
        },
        "type": "object",
        "required": [
          "data"
        ],
        "title": "APIResponse[SessionListResponse]"
      },
      "APIResponse_SessionsListResponse_": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success",
            "description": "Request success status",
            "default": true
          },
          "data": {
            "$ref": "#/components/schemas/SessionsListResponse",
            "description": "Response data"
          },
          "meta": {
            "additionalProperties": true,
            "type": "object",
            "title": "Meta",
            "description": "Response metadata"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp"
          }
        },
        "type": "object",
        "required": [
          "data"
        ],
        "title": "APIResponse[SessionsListResponse]"
      },
      "APIResponse_SiteAccessResponse_": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success",
            "description": "Request success status",
            "default": true
          },
          "data": {
            "$ref": "#/components/schemas/SiteAccessResponse",
            "description": "Response data"
          },
          "meta": {
            "additionalProperties": true,
            "type": "object",
            "title": "Meta",
            "description": "Response metadata"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp"
          }
        },
        "type": "object",
        "required": [
          "data"
        ],
        "title": "APIResponse[SiteAccessResponse]"
      },
      "APIResponse_StatsOverview_": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success",
            "description": "Request success status",
            "default": true
          },
          "data": {
            "$ref": "#/components/schemas/StatsOverview",
            "description": "Response data"
          },
          "meta": {
            "additionalProperties": true,
            "type": "object",
            "title": "Meta",
            "description": "Response metadata"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp"
          }
        },
        "type": "object",
        "required": [
          "data"
        ],
        "title": "APIResponse[StatsOverview]"
      },
      "APIResponse_TimezoneListResponse_": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success",
            "description": "Request success status",
            "default": true
          },
          "data": {
            "$ref": "#/components/schemas/TimezoneListResponse",
            "description": "Response data"
          },
          "meta": {
            "additionalProperties": true,
            "type": "object",
            "title": "Meta",
            "description": "Response metadata"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp"
          }
        },
        "type": "object",
        "required": [
          "data"
        ],
        "title": "APIResponse[TimezoneListResponse]"
      },
      "APIResponse_ToolsListResponse_": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success",
            "description": "Request success status",
            "default": true
          },
          "data": {
            "$ref": "#/components/schemas/ToolsListResponse",
            "description": "Response data"
          },
          "meta": {
            "additionalProperties": true,
            "type": "object",
            "title": "Meta",
            "description": "Response metadata"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp"
          }
        },
        "type": "object",
        "required": [
          "data"
        ],
        "title": "APIResponse[ToolsListResponse]"
      },
      "APIResponse_TwoFactorSetupResponse_": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success",
            "description": "Request success status",
            "default": true
          },
          "data": {
            "$ref": "#/components/schemas/TwoFactorSetupResponse",
            "description": "Response data"
          },
          "meta": {
            "additionalProperties": true,
            "type": "object",
            "title": "Meta",
            "description": "Response metadata"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp"
          }
        },
        "type": "object",
        "required": [
          "data"
        ],
        "title": "APIResponse[TwoFactorSetupResponse]"
      },
      "APIResponse_TwoFactorStatusResponse_": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success",
            "description": "Request success status",
            "default": true
          },
          "data": {
            "$ref": "#/components/schemas/TwoFactorStatusResponse",
            "description": "Response data"
          },
          "meta": {
            "additionalProperties": true,
            "type": "object",
            "title": "Meta",
            "description": "Response metadata"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp"
          }
        },
        "type": "object",
        "required": [
          "data"
        ],
        "title": "APIResponse[TwoFactorStatusResponse]"
      },
      "APIResponse_UTMMappingInfo_": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success",
            "description": "Request success status",
            "default": true
          },
          "data": {
            "$ref": "#/components/schemas/UTMMappingInfo",
            "description": "Response data"
          },
          "meta": {
            "additionalProperties": true,
            "type": "object",
            "title": "Meta",
            "description": "Response metadata"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp"
          }
        },
        "type": "object",
        "required": [
          "data"
        ],
        "title": "APIResponse[UTMMappingInfo]"
      },
      "APIResponse_UTMMappingListResponse_": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success",
            "description": "Request success status",
            "default": true
          },
          "data": {
            "$ref": "#/components/schemas/UTMMappingListResponse",
            "description": "Response data"
          },
          "meta": {
            "additionalProperties": true,
            "type": "object",
            "title": "Meta",
            "description": "Response metadata"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp"
          }
        },
        "type": "object",
        "required": [
          "data"
        ],
        "title": "APIResponse[UTMMappingListResponse]"
      },
      "APIResponse_Union_TokenResponse__TwoFactorRequiredResponse__": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success",
            "description": "Request success status",
            "default": true
          },
          "data": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TokenResponse"
              },
              {
                "$ref": "#/components/schemas/TwoFactorRequiredResponse"
              }
            ],
            "title": "Data",
            "description": "Response data"
          },
          "meta": {
            "additionalProperties": true,
            "type": "object",
            "title": "Meta",
            "description": "Response metadata"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp"
          }
        },
        "type": "object",
        "required": [
          "data"
        ],
        "title": "APIResponse[Union[TokenResponse, TwoFactorRequiredResponse]]"
      },
      "APIResponse_UserInfo_": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success",
            "description": "Request success status",
            "default": true
          },
          "data": {
            "$ref": "#/components/schemas/UserInfo",
            "description": "Response data"
          },
          "meta": {
            "additionalProperties": true,
            "type": "object",
            "title": "Meta",
            "description": "Response metadata"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp"
          }
        },
        "type": "object",
        "required": [
          "data"
        ],
        "title": "APIResponse[UserInfo]"
      },
      "APIResponse_UserListResponse_": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success",
            "description": "Request success status",
            "default": true
          },
          "data": {
            "$ref": "#/components/schemas/sealmetrics_api__models__users__UserListResponse",
            "description": "Response data"
          },
          "meta": {
            "additionalProperties": true,
            "type": "object",
            "title": "Meta",
            "description": "Response metadata"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp"
          }
        },
        "type": "object",
        "required": [
          "data"
        ],
        "title": "APIResponse[UserListResponse]"
      },
      "APIResponse_V1ConnectionTest_": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success",
            "description": "Request success status",
            "default": true
          },
          "data": {
            "$ref": "#/components/schemas/V1ConnectionTest",
            "description": "Response data"
          },
          "meta": {
            "additionalProperties": true,
            "type": "object",
            "title": "Meta",
            "description": "Response metadata"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp"
          }
        },
        "type": "object",
        "required": [
          "data"
        ],
        "title": "APIResponse[V1ConnectionTest]"
      },
      "APIResponse_dict_": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success",
            "description": "Request success status",
            "default": true
          },
          "data": {
            "additionalProperties": true,
            "type": "object",
            "title": "Data",
            "description": "Response data"
          },
          "meta": {
            "additionalProperties": true,
            "type": "object",
            "title": "Meta",
            "description": "Response metadata"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp"
          }
        },
        "type": "object",
        "required": [
          "data"
        ],
        "title": "APIResponse[dict]"
      },
      "APIResponse_list_AggregatedDeviceStats__": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success",
            "description": "Request success status",
            "default": true
          },
          "data": {
            "items": {
              "$ref": "#/components/schemas/AggregatedDeviceStats"
            },
            "type": "array",
            "title": "Data",
            "description": "Response data"
          },
          "meta": {
            "additionalProperties": true,
            "type": "object",
            "title": "Meta",
            "description": "Response metadata"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp"
          }
        },
        "type": "object",
        "required": [
          "data"
        ],
        "title": "APIResponse[list[AggregatedDeviceStats]]"
      },
      "APIResponse_list_ContentGroupMetrics__": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success",
            "description": "Request success status",
            "default": true
          },
          "data": {
            "items": {
              "$ref": "#/components/schemas/ContentGroupMetrics"
            },
            "type": "array",
            "title": "Data",
            "description": "Response data"
          },
          "meta": {
            "additionalProperties": true,
            "type": "object",
            "title": "Meta",
            "description": "Response metadata"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp"
          }
        },
        "type": "object",
        "required": [
          "data"
        ],
        "title": "APIResponse[list[ContentGroupMetrics]]"
      },
      "APIResponse_list_SavedPixelSummary__": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success",
            "description": "Request success status",
            "default": true
          },
          "data": {
            "items": {
              "$ref": "#/components/schemas/SavedPixelSummary"
            },
            "type": "array",
            "title": "Data",
            "description": "Response data"
          },
          "meta": {
            "additionalProperties": true,
            "type": "object",
            "title": "Meta",
            "description": "Response metadata"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp"
          }
        },
        "type": "object",
        "required": [
          "data"
        ],
        "title": "APIResponse[list[SavedPixelSummary]]"
      },
      "APIResponse_list_SegmentSummary__": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success",
            "description": "Request success status",
            "default": true
          },
          "data": {
            "items": {
              "$ref": "#/components/schemas/SegmentSummary"
            },
            "type": "array",
            "title": "Data",
            "description": "Response data"
          },
          "meta": {
            "additionalProperties": true,
            "type": "object",
            "title": "Meta",
            "description": "Response metadata"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp"
          }
        },
        "type": "object",
        "required": [
          "data"
        ],
        "title": "APIResponse[list[SegmentSummary]]"
      },
      "APIResponse_list_TopLandingPage__": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success",
            "description": "Request success status",
            "default": true
          },
          "data": {
            "items": {
              "$ref": "#/components/schemas/TopLandingPage"
            },
            "type": "array",
            "title": "Data",
            "description": "Response data"
          },
          "meta": {
            "additionalProperties": true,
            "type": "object",
            "title": "Meta",
            "description": "Response metadata"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp"
          }
        },
        "type": "object",
        "required": [
          "data"
        ],
        "title": "APIResponse[list[TopLandingPage]]"
      },
      "APIResponse_list_dict__": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success",
            "description": "Request success status",
            "default": true
          },
          "data": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "type": "array",
            "title": "Data",
            "description": "Response data"
          },
          "meta": {
            "additionalProperties": true,
            "type": "object",
            "title": "Meta",
            "description": "Response metadata"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp"
          }
        },
        "type": "object",
        "required": [
          "data"
        ],
        "title": "APIResponse[list[dict]]"
      },
      "APIResponse_list_str__": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success",
            "description": "Request success status",
            "default": true
          },
          "data": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Data",
            "description": "Response data"
          },
          "meta": {
            "additionalProperties": true,
            "type": "object",
            "title": "Meta",
            "description": "Response metadata"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp"
          }
        },
        "type": "object",
        "required": [
          "data"
        ],
        "title": "APIResponse[list[str]]"
      },
      "APITokenCreate": {
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 100,
            "minLength": 1,
            "title": "Name",
            "description": "Descriptive name for the token"
          },
          "scopes": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Scopes",
            "description": "Permission scopes for this token"
          },
          "account_ids": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Account Ids",
            "description": "Restrict to specific accounts (None = all user accounts)"
          },
          "expires_in_days": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 365,
                "minimum": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires In Days",
            "description": "Token expiration in days (None = never expires)"
          }
        },
        "type": "object",
        "required": [
          "name"
        ],
        "title": "APITokenCreate",
        "description": "Request model for creating a new API token."
      },
      "APITokenCreated": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id",
            "description": "Token ID"
          },
          "name": {
            "type": "string",
            "title": "Name",
            "description": "Token name"
          },
          "token_prefix": {
            "type": "string",
            "title": "Token Prefix",
            "description": "Token prefix for identification"
          },
          "scopes": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Scopes",
            "description": "Permission scopes"
          },
          "account_ids": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Account Ids",
            "description": "Accessible account IDs"
          },
          "expires_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires At",
            "description": "Expiration timestamp"
          },
          "last_used_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Used At",
            "description": "Last usage timestamp"
          },
          "is_active": {
            "type": "boolean",
            "title": "Is Active",
            "description": "Whether token is active"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp"
          },
          "token": {
            "type": "string",
            "title": "Token",
            "description": "The complete token value. Only shown once at creation time."
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "token_prefix",
          "scopes",
          "account_ids",
          "is_active",
          "created_at",
          "token"
        ],
        "title": "APITokenCreated",
        "description": "Response when a new token is created - includes the actual token value."
      },
      "APITokenList": {
        "properties": {
          "tokens": {
            "items": {
              "$ref": "#/components/schemas/APITokenResponse"
            },
            "type": "array",
            "title": "Tokens",
            "description": "List of tokens"
          },
          "total": {
            "type": "integer",
            "title": "Total",
            "description": "Total number of tokens"
          }
        },
        "type": "object",
        "required": [
          "tokens",
          "total"
        ],
        "title": "APITokenList",
        "description": "Response for listing API tokens."
      },
      "APITokenResponse": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id",
            "description": "Token ID"
          },
          "name": {
            "type": "string",
            "title": "Name",
            "description": "Token name"
          },
          "token_prefix": {
            "type": "string",
            "title": "Token Prefix",
            "description": "Token prefix for identification"
          },
          "scopes": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Scopes",
            "description": "Permission scopes"
          },
          "account_ids": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Account Ids",
            "description": "Accessible account IDs"
          },
          "expires_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires At",
            "description": "Expiration timestamp"
          },
          "last_used_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Used At",
            "description": "Last usage timestamp"
          },
          "is_active": {
            "type": "boolean",
            "title": "Is Active",
            "description": "Whether token is active"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp"
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "token_prefix",
          "scopes",
          "account_ids",
          "is_active",
          "created_at"
        ],
        "title": "APITokenResponse",
        "description": "Response model for API token (without the actual token value)."
      },
      "APITokenScopesResponse": {
        "properties": {
          "scopes": {
            "items": {
              "$ref": "#/components/schemas/TokenScope"
            },
            "type": "array",
            "title": "Scopes",
            "description": "Available scopes"
          }
        },
        "type": "object",
        "required": [
          "scopes"
        ],
        "title": "APITokenScopesResponse",
        "description": "Response for listing available scopes."
      },
      "AcceptInvitationExistingRequest": {
        "properties": {
          "token": {
            "type": "string",
            "title": "Token"
          }
        },
        "type": "object",
        "required": [
          "token"
        ],
        "title": "AcceptInvitationExistingRequest",
        "description": "Request to accept an invitation (for existing logged-in users)."
      },
      "AcceptInvitationRequest": {
        "properties": {
          "token": {
            "type": "string",
            "title": "Token"
          },
          "name": {
            "type": "string",
            "maxLength": 255,
            "minLength": 1,
            "title": "Name"
          },
          "password": {
            "type": "string",
            "minLength": 8,
            "title": "Password"
          }
        },
        "type": "object",
        "required": [
          "token",
          "name",
          "password"
        ],
        "title": "AcceptInvitationRequest",
        "description": "Request to accept an invitation (for new users)."
      },
      "AccountBreakdown": {
        "properties": {
          "account_id": {
            "type": "string",
            "title": "Account Id",
            "description": "Account ID"
          },
          "entrances": {
            "type": "integer",
            "minimum": 0,
            "title": "Entrances",
            "default": 0
          },
          "engaged_entrances": {
            "type": "integer",
            "minimum": 0,
            "title": "Engaged Entrances",
            "default": 0
          },
          "page_views": {
            "type": "integer",
            "minimum": 0,
            "title": "Page Views",
            "default": 0
          },
          "microconversions": {
            "type": "integer",
            "minimum": 0,
            "title": "Microconversions",
            "default": 0
          },
          "conversions": {
            "type": "integer",
            "minimum": 0,
            "title": "Conversions",
            "default": 0
          },
          "revenue": {
            "type": "string",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Revenue",
            "default": "0"
          },
          "bounce_rate": {
            "type": "number",
            "title": "Bounce Rate",
            "description": "Bounce rate as percentage.",
            "readOnly": true
          },
          "conversion_rate": {
            "type": "number",
            "title": "Conversion Rate",
            "description": "Conversion rate as percentage.",
            "readOnly": true
          }
        },
        "type": "object",
        "required": [
          "account_id",
          "bounce_rate",
          "conversion_rate"
        ],
        "title": "AccountBreakdown",
        "description": "Metrics breakdown for a single account within aggregation."
      },
      "AccountCreate": {
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 255,
            "minLength": 1,
            "title": "Name",
            "description": "Account display name"
          },
          "domains": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "maxItems": 50,
            "title": "Domains",
            "description": "Authorized domains for tracking"
          },
          "timezone": {
            "type": "string",
            "maxLength": 64,
            "title": "Timezone",
            "description": "IANA timezone (e.g., Europe/Madrid)",
            "default": "UTC"
          },
          "currency": {
            "type": "string",
            "maxLength": 3,
            "minLength": 3,
            "title": "Currency",
            "description": "ISO 4217 currency code",
            "default": "EUR"
          },
          "org_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Org Id",
            "description": "Organization ID to associate the site with"
          }
        },
        "type": "object",
        "required": [
          "name"
        ],
        "title": "AccountCreate",
        "description": "Request model for creating an account."
      },
      "AccountInfo": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "domains": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Domains"
          },
          "timezone": {
            "type": "string",
            "title": "Timezone",
            "default": "UTC"
          },
          "currency": {
            "type": "string",
            "title": "Currency",
            "default": "EUR"
          },
          "is_active": {
            "type": "boolean",
            "title": "Is Active",
            "default": true
          },
          "lens_tier": {
            "type": "string",
            "title": "Lens Tier",
            "default": "guard"
          },
          "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": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created By"
          },
          "user_count": {
            "type": "integer",
            "title": "User Count",
            "default": 0
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "created_at"
        ],
        "title": "AccountInfo",
        "description": "Account information returned by API."
      },
      "AccountRole": {
        "type": "string",
        "enum": [
          "owner",
          "admin",
          "editor",
          "viewer"
        ],
        "title": "AccountRole",
        "description": "Role within an account."
      },
      "AccountSettingsResponse": {
        "properties": {
          "account_id": {
            "type": "string",
            "title": "Account Id"
          },
          "is_enabled": {
            "type": "boolean",
            "title": "Is Enabled",
            "default": true
          },
          "notify_email": {
            "type": "boolean",
            "title": "Notify Email",
            "default": true
          },
          "notify_on_red": {
            "type": "boolean",
            "title": "Notify On Red",
            "default": true
          },
          "notify_on_yellow": {
            "type": "boolean",
            "title": "Notify On Yellow",
            "default": false
          },
          "notify_on_green": {
            "type": "boolean",
            "title": "Notify On Green",
            "default": false
          },
          "email_recipients": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Email Recipients"
          },
          "analysis_frequency": {
            "type": "string",
            "title": "Analysis Frequency",
            "default": "daily"
          },
          "created_at": {
            "type": "string",
            "title": "Created At"
          },
          "updated_at": {
            "type": "string",
            "title": "Updated At"
          }
        },
        "type": "object",
        "required": [
          "account_id",
          "created_at",
          "updated_at"
        ],
        "title": "AccountSettingsResponse",
        "description": "LENS account settings response."
      },
      "AccountSettingsUpdate": {
        "properties": {
          "is_enabled": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Is Enabled"
          },
          "notify_email": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Notify Email"
          },
          "notify_on_red": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Notify On Red"
          },
          "notify_on_yellow": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Notify On Yellow"
          },
          "notify_on_green": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Notify On Green"
          },
          "email_recipients": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email Recipients"
          },
          "analysis_frequency": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^(daily|weekly|manual)$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Analysis Frequency"
          }
        },
        "type": "object",
        "title": "AccountSettingsUpdate",
        "description": "Request to update LENS account settings."
      },
      "AccountUpdate": {
        "properties": {
          "name": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 255,
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "timezone": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 64
              },
              {
                "type": "null"
              }
            ],
            "title": "Timezone"
          },
          "currency": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 3,
                "minLength": 3
              },
              {
                "type": "null"
              }
            ],
            "title": "Currency"
          },
          "is_active": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Is Active"
          }
        },
        "type": "object",
        "title": "AccountUpdate",
        "description": "Request model for updating an account."
      },
      "AccountUserAdd": {
        "properties": {
          "user_id": {
            "type": "integer",
            "title": "User Id",
            "description": "User ID to add"
          },
          "role": {
            "$ref": "#/components/schemas/AccountRole",
            "description": "Role within the account",
            "default": "viewer"
          }
        },
        "type": "object",
        "required": [
          "user_id"
        ],
        "title": "AccountUserAdd",
        "description": "Request to add a user to an account."
      },
      "AccountUserInfo": {
        "properties": {
          "user_id": {
            "type": "integer",
            "title": "User Id"
          },
          "email": {
            "type": "string",
            "title": "Email"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "role": {
            "$ref": "#/components/schemas/AccountRole"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          }
        },
        "type": "object",
        "required": [
          "user_id",
          "email",
          "name",
          "role",
          "created_at"
        ],
        "title": "AccountUserInfo",
        "description": "User information within an account."
      },
      "AccountUserListResponse": {
        "properties": {
          "users": {
            "items": {
              "$ref": "#/components/schemas/AccountUserInfo"
            },
            "type": "array",
            "title": "Users"
          },
          "total": {
            "type": "integer",
            "title": "Total"
          }
        },
        "type": "object",
        "required": [
          "users",
          "total"
        ],
        "title": "AccountUserListResponse",
        "description": "Response for account users list endpoint."
      },
      "AccountUserUpdate": {
        "properties": {
          "role": {
            "$ref": "#/components/schemas/AccountRole",
            "description": "New role for the user"
          }
        },
        "type": "object",
        "required": [
          "role"
        ],
        "title": "AccountUserUpdate",
        "description": "Request to update a user's role in an account."
      },
      "AcknowledgeAlertRequest": {
        "properties": {
          "status": {
            "$ref": "#/components/schemas/AlertStatus",
            "description": "New status for the alert",
            "default": "acknowledged"
          },
          "notes": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 1000
              },
              {
                "type": "null"
              }
            ],
            "title": "Notes",
            "description": "Notes about the alert"
          }
        },
        "type": "object",
        "title": "AcknowledgeAlertRequest",
        "description": "Request to acknowledge an alert."
      },
      "ActionItemResponse": {
        "properties": {
          "title": {
            "type": "string",
            "title": "Title"
          },
          "description": {
            "type": "string",
            "title": "Description"
          },
          "priority": {
            "type": "string",
            "title": "Priority"
          },
          "owner": {
            "type": "string",
            "title": "Owner"
          },
          "category": {
            "type": "string",
            "title": "Category"
          },
          "related_insight": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Related Insight"
          },
          "expected_impact": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expected Impact"
          }
        },
        "type": "object",
        "required": [
          "title",
          "description",
          "priority",
          "owner",
          "category"
        ],
        "title": "ActionItemResponse",
        "description": "Action item."
      },
      "AddMemberRequest": {
        "properties": {
          "user_id": {
            "type": "integer",
            "title": "User Id"
          },
          "role": {
            "$ref": "#/components/schemas/OrgRole",
            "default": "member"
          }
        },
        "type": "object",
        "required": [
          "user_id"
        ],
        "title": "AddMemberRequest",
        "description": "Request to add a member to the organization."
      },
      "AggregatedComparisonTotals": {
        "properties": {
          "date_range": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object",
            "title": "Date Range",
            "description": "Previous period date range"
          },
          "entrances": {
            "type": "integer",
            "minimum": 0,
            "title": "Entrances",
            "default": 0
          },
          "engaged_entrances": {
            "type": "integer",
            "minimum": 0,
            "title": "Engaged Entrances",
            "default": 0
          },
          "page_views": {
            "type": "integer",
            "minimum": 0,
            "title": "Page Views",
            "default": 0
          },
          "microconversions": {
            "type": "integer",
            "minimum": 0,
            "title": "Microconversions",
            "default": 0
          },
          "conversions": {
            "type": "integer",
            "minimum": 0,
            "title": "Conversions",
            "default": 0
          },
          "revenue": {
            "type": "string",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Revenue",
            "default": "0"
          },
          "bounce_rate": {
            "type": "number",
            "title": "Bounce Rate",
            "description": "Bounce rate as percentage.",
            "readOnly": true
          },
          "conversion_rate": {
            "type": "number",
            "title": "Conversion Rate",
            "description": "Conversion rate as percentage.",
            "readOnly": true
          }
        },
        "type": "object",
        "required": [
          "date_range",
          "bounce_rate",
          "conversion_rate"
        ],
        "title": "AggregatedComparisonTotals",
        "description": "Aggregated comparison totals for previous period."
      },
      "AggregatedConversionMetrics": {
        "properties": {
          "conversions": {
            "type": "integer",
            "minimum": 0,
            "title": "Conversions",
            "description": "Total conversions",
            "default": 0
          },
          "revenue": {
            "type": "string",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Revenue",
            "description": "Total revenue",
            "default": "0"
          },
          "microconversions": {
            "type": "integer",
            "minimum": 0,
            "title": "Microconversions",
            "description": "Total microconversions",
            "default": 0
          },
          "conversion_rate": {
            "type": "number",
            "minimum": 0,
            "title": "Conversion Rate",
            "description": "Conversion rate percentage",
            "default": 0
          },
          "average_order_value": {
            "type": "string",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Average Order Value",
            "description": "Average order value",
            "default": "0"
          }
        },
        "type": "object",
        "title": "AggregatedConversionMetrics",
        "description": "Aggregated conversion metrics across multiple accounts."
      },
      "AggregatedConversionsByType": {
        "properties": {
          "conversion_type": {
            "type": "string",
            "title": "Conversion Type",
            "description": "Conversion type name"
          },
          "account_count": {
            "type": "integer",
            "minimum": 1,
            "title": "Account Count",
            "default": 1
          },
          "count": {
            "type": "integer",
            "minimum": 0,
            "title": "Count",
            "default": 0
          },
          "revenue": {
            "type": "string",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Revenue",
            "default": "0"
          },
          "avg_value": {
            "type": "string",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Avg Value",
            "default": "0"
          }
        },
        "type": "object",
        "required": [
          "conversion_type"
        ],
        "title": "AggregatedConversionsByType",
        "description": "Conversions by type aggregated across accounts."
      },
      "AggregatedDeviceStats": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name",
            "description": "Device type"
          },
          "entrances": {
            "type": "integer",
            "minimum": 0,
            "title": "Entrances",
            "default": 0
          },
          "engaged_entrances": {
            "type": "integer",
            "minimum": 0,
            "title": "Engaged Entrances",
            "default": 0
          },
          "page_views": {
            "type": "integer",
            "minimum": 0,
            "title": "Page Views",
            "default": 0
          },
          "microconversions": {
            "type": "integer",
            "minimum": 0,
            "title": "Microconversions",
            "default": 0
          },
          "conversions": {
            "type": "integer",
            "minimum": 0,
            "title": "Conversions",
            "default": 0
          },
          "revenue": {
            "type": "string",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Revenue",
            "default": "0"
          },
          "percentage": {
            "type": "number",
            "maximum": 100,
            "minimum": 0,
            "title": "Percentage",
            "default": 0
          },
          "bounce_rate": {
            "type": "number",
            "title": "Bounce Rate",
            "readOnly": true
          },
          "conversion_rate": {
            "type": "number",
            "title": "Conversion Rate",
            "readOnly": true
          }
        },
        "type": "object",
        "required": [
          "name",
          "bounce_rate",
          "conversion_rate"
        ],
        "title": "AggregatedDeviceStats",
        "description": "Device stats aggregated across accounts."
      },
      "AggregatedGeoMetrics": {
        "properties": {
          "country": {
            "type": "string",
            "title": "Country",
            "description": "ISO country code"
          },
          "country_name": {
            "type": "string",
            "title": "Country Name",
            "default": ""
          },
          "account_count": {
            "type": "integer",
            "minimum": 1,
            "title": "Account Count",
            "default": 1
          },
          "entrances": {
            "type": "integer",
            "minimum": 0,
            "title": "Entrances",
            "default": 0
          },
          "engaged_entrances": {
            "type": "integer",
            "minimum": 0,
            "title": "Engaged Entrances",
            "default": 0
          },
          "page_views": {
            "type": "integer",
            "minimum": 0,
            "title": "Page Views",
            "default": 0
          },
          "microconversions": {
            "type": "integer",
            "minimum": 0,
            "title": "Microconversions",
            "default": 0
          },
          "conversions": {
            "type": "integer",
            "minimum": 0,
            "title": "Conversions",
            "default": 0
          },
          "revenue": {
            "type": "string",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Revenue",
            "default": "0"
          },
          "bounce_rate": {
            "type": "number",
            "title": "Bounce Rate",
            "readOnly": true
          }
        },
        "type": "object",
        "required": [
          "country",
          "bounce_rate"
        ],
        "title": "AggregatedGeoMetrics",
        "description": "Geographic metrics aggregated across accounts."
      },
      "AggregatedLandingPageMetrics": {
        "properties": {
          "landing_page": {
            "type": "string",
            "title": "Landing Page",
            "description": "Landing page path"
          },
          "content_grouping": {
            "type": "string",
            "title": "Content Grouping",
            "default": ""
          },
          "account_count": {
            "type": "integer",
            "minimum": 1,
            "title": "Account Count",
            "default": 1
          },
          "entrances": {
            "type": "integer",
            "minimum": 0,
            "title": "Entrances",
            "default": 0
          },
          "engaged_entrances": {
            "type": "integer",
            "minimum": 0,
            "title": "Engaged Entrances",
            "default": 0
          },
          "microconversions": {
            "type": "integer",
            "minimum": 0,
            "title": "Microconversions",
            "default": 0
          },
          "conversions": {
            "type": "integer",
            "minimum": 0,
            "title": "Conversions",
            "default": 0
          },
          "revenue": {
            "type": "string",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Revenue",
            "default": "0"
          },
          "bounce_rate": {
            "type": "number",
            "title": "Bounce Rate",
            "readOnly": true
          },
          "conversion_rate": {
            "type": "number",
            "title": "Conversion Rate",
            "readOnly": true
          }
        },
        "type": "object",
        "required": [
          "landing_page",
          "bounce_rate",
          "conversion_rate"
        ],
        "title": "AggregatedLandingPageMetrics",
        "description": "Landing page metrics aggregated across accounts."
      },
      "AggregatedOverview": {
        "properties": {
          "account_ids": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Account Ids",
            "description": "Aggregated account IDs"
          },
          "account_count": {
            "type": "integer",
            "minimum": 1,
            "title": "Account Count",
            "description": "Number of accounts"
          },
          "date_range": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object",
            "title": "Date Range",
            "description": "Query date range"
          },
          "traffic": {
            "$ref": "#/components/schemas/AggregatedTrafficMetrics",
            "description": "Aggregated traffic metrics"
          },
          "conversions": {
            "$ref": "#/components/schemas/AggregatedConversionMetrics",
            "description": "Aggregated conversion metrics"
          },
          "comparison": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AggregatedComparisonTotals"
              },
              {
                "type": "null"
              }
            ],
            "description": "Previous period totals for comparison"
          },
          "entrances_series": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AggregatedTimeSeries"
              },
              {
                "type": "null"
              }
            ]
          },
          "page_views_series": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AggregatedTimeSeries"
              },
              {
                "type": "null"
              }
            ]
          },
          "conversions_series": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AggregatedTimeSeries"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "account_ids",
          "account_count",
          "date_range",
          "traffic",
          "conversions"
        ],
        "title": "AggregatedOverview",
        "description": "Aggregated overview for multi-site dashboard."
      },
      "AggregatedPageMetrics": {
        "properties": {
          "path": {
            "type": "string",
            "title": "Path",
            "description": "Page path"
          },
          "content_grouping": {
            "type": "string",
            "title": "Content Grouping",
            "description": "Content group",
            "default": ""
          },
          "account_count": {
            "type": "integer",
            "minimum": 1,
            "title": "Account Count",
            "description": "Number of accounts with this page",
            "default": 1
          },
          "entrances": {
            "type": "integer",
            "minimum": 0,
            "title": "Entrances",
            "default": 0
          },
          "engaged_entrances": {
            "type": "integer",
            "minimum": 0,
            "title": "Engaged Entrances",
            "default": 0
          },
          "page_views": {
            "type": "integer",
            "minimum": 0,
            "title": "Page Views",
            "default": 0
          },
          "conversions": {
            "type": "integer",
            "minimum": 0,
            "title": "Conversions",
            "default": 0
          },
          "bounce_rate": {
            "type": "number",
            "title": "Bounce Rate",
            "readOnly": true
          }
        },
        "type": "object",
        "required": [
          "path",
          "bounce_rate"
        ],
        "title": "AggregatedPageMetrics",
        "description": "Page metrics aggregated across accounts."
      },
      "AggregatedSourceMetrics": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name",
            "description": "Dimension value"
          },
          "utm_source": {
            "type": "string",
            "title": "Utm Source",
            "default": ""
          },
          "utm_medium": {
            "type": "string",
            "title": "Utm Medium",
            "default": ""
          },
          "utm_campaign": {
            "type": "string",
            "title": "Utm Campaign",
            "default": ""
          },
          "account_count": {
            "type": "integer",
            "minimum": 1,
            "title": "Account Count",
            "default": 1
          },
          "entrances": {
            "type": "integer",
            "minimum": 0,
            "title": "Entrances",
            "default": 0
          },
          "engaged_entrances": {
            "type": "integer",
            "minimum": 0,
            "title": "Engaged Entrances",
            "default": 0
          },
          "page_views": {
            "type": "integer",
            "minimum": 0,
            "title": "Page Views",
            "default": 0
          },
          "microconversions": {
            "type": "integer",
            "minimum": 0,
            "title": "Microconversions",
            "default": 0
          },
          "conversions": {
            "type": "integer",
            "minimum": 0,
            "title": "Conversions",
            "default": 0
          },
          "revenue": {
            "type": "string",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Revenue",
            "default": "0"
          },
          "bounce_rate": {
            "type": "number",
            "title": "Bounce Rate",
            "readOnly": true
          },
          "conversion_rate": {
            "type": "number",
            "title": "Conversion Rate",
            "readOnly": true
          }
        },
        "type": "object",
        "required": [
          "name",
          "bounce_rate",
          "conversion_rate"
        ],
        "title": "AggregatedSourceMetrics",
        "description": "Source metrics aggregated across accounts."
      },
      "AggregatedTimeSeries": {
        "properties": {
          "metric": {
            "type": "string",
            "title": "Metric",
            "description": "Metric name"
          },
          "points": {
            "items": {
              "$ref": "#/components/schemas/AggregatedTimeSeriesPoint"
            },
            "type": "array",
            "title": "Points"
          },
          "total": {
            "type": "number",
            "title": "Total",
            "description": "Sum of all values.",
            "readOnly": true
          }
        },
        "type": "object",
        "required": [
          "metric",
          "total"
        ],
        "title": "AggregatedTimeSeries",
        "description": "Time series data aggregated across accounts."
      },
      "AggregatedTimeSeriesPoint": {
        "properties": {
          "date": {
            "type": "string",
            "title": "Date",
            "description": "Date in ISO format"
          },
          "value": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              }
            ],
            "title": "Value",
            "description": "Aggregated metric value"
          }
        },
        "type": "object",
        "required": [
          "date",
          "value"
        ],
        "title": "AggregatedTimeSeriesPoint",
        "description": "Single point in an aggregated time series."
      },
      "AggregatedTrafficMetrics": {
        "properties": {
          "account_count": {
            "type": "integer",
            "minimum": 1,
            "title": "Account Count",
            "description": "Number of accounts aggregated"
          },
          "entrances": {
            "type": "integer",
            "minimum": 0,
            "title": "Entrances",
            "description": "Total entrances across all accounts",
            "default": 0
          },
          "engaged_entrances": {
            "type": "integer",
            "minimum": 0,
            "title": "Engaged Entrances",
            "description": "Total engaged entrances",
            "default": 0
          },
          "page_views": {
            "type": "integer",
            "minimum": 0,
            "title": "Page Views",
            "description": "Total page views",
            "default": 0
          },
          "microconversions": {
            "type": "integer",
            "minimum": 0,
            "title": "Microconversions",
            "description": "Total microconversions",
            "default": 0
          },
          "conversions": {
            "type": "integer",
            "minimum": 0,
            "title": "Conversions",
            "description": "Total conversions",
            "default": 0
          },
          "revenue": {
            "type": "string",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Revenue",
            "description": "Total revenue",
            "default": "0"
          },
          "by_account": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/AccountBreakdown"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "By Account",
            "description": "Optional breakdown by account"
          },
          "bounce_rate": {
            "type": "number",
            "title": "Bounce Rate",
            "description": "Bounce rate as percentage.",
            "readOnly": true
          },
          "pages_per_session": {
            "type": "number",
            "title": "Pages Per Session",
            "description": "Average pages per session.",
            "readOnly": true
          },
          "conversion_rate": {
            "type": "number",
            "title": "Conversion Rate",
            "description": "Conversion rate as percentage.",
            "readOnly": true
          }
        },
        "type": "object",
        "required": [
          "account_count",
          "bounce_rate",
          "pages_per_session",
          "conversion_rate"
        ],
        "title": "AggregatedTrafficMetrics",
        "description": "Aggregated traffic metrics across multiple accounts."
      },
      "AlertHistoryInfo": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "rule_id": {
            "type": "integer",
            "title": "Rule Id"
          },
          "rule_name": {
            "type": "string",
            "title": "Rule Name"
          },
          "account_id": {
            "type": "string",
            "title": "Account Id"
          },
          "alert_type": {
            "$ref": "#/components/schemas/AlertType"
          },
          "metric": {
            "$ref": "#/components/schemas/AlertMetric"
          },
          "current_value": {
            "type": "string",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Current Value"
          },
          "baseline_value": {
            "type": "string",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Baseline Value"
          },
          "change_percentage": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Change Percentage"
          },
          "triggered_at": {
            "type": "string",
            "format": "date-time",
            "title": "Triggered At"
          },
          "period_start": {
            "type": "string",
            "format": "date-time",
            "title": "Period Start"
          },
          "period_end": {
            "type": "string",
            "format": "date-time",
            "title": "Period End"
          },
          "context": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Context"
          },
          "notification_sent": {
            "type": "boolean",
            "title": "Notification Sent"
          },
          "notification_channels": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Notification Channels"
          },
          "notification_error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Notification Error"
          },
          "acknowledged_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Acknowledged At"
          },
          "acknowledged_by": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Acknowledged By"
          },
          "notes": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Notes"
          },
          "status": {
            "$ref": "#/components/schemas/AlertStatus"
          }
        },
        "type": "object",
        "required": [
          "id",
          "rule_id",
          "rule_name",
          "account_id",
          "alert_type",
          "metric",
          "current_value",
          "baseline_value",
          "change_percentage",
          "triggered_at",
          "period_start",
          "period_end",
          "context",
          "notification_sent",
          "notification_channels",
          "notification_error",
          "acknowledged_at",
          "acknowledged_by",
          "notes",
          "status"
        ],
        "title": "AlertHistoryInfo",
        "description": "Alert history entry information."
      },
      "AlertHistoryListResponse": {
        "properties": {
          "alerts": {
            "items": {
              "$ref": "#/components/schemas/AlertHistoryInfo"
            },
            "type": "array",
            "title": "Alerts"
          },
          "total": {
            "type": "integer",
            "title": "Total"
          }
        },
        "type": "object",
        "required": [
          "alerts",
          "total"
        ],
        "title": "AlertHistoryListResponse",
        "description": "Response for alert history list endpoint."
      },
      "AlertMetric": {
        "type": "string",
        "enum": [
          "pageviews",
          "sessions",
          "visitors",
          "entrances",
          "bounce_rate",
          "conversions",
          "conversion_rate",
          "custom"
        ],
        "title": "AlertMetric",
        "description": "Metric to monitor for alerts."
      },
      "AlertRuleCreate": {
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 255,
            "minLength": 1,
            "title": "Name",
            "description": "Alert name"
          },
          "description": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 1000
              },
              {
                "type": "null"
              }
            ],
            "title": "Description",
            "description": "Alert description"
          },
          "alert_type": {
            "$ref": "#/components/schemas/AlertType",
            "description": "Type of alert",
            "default": "traffic_spike"
          },
          "metric": {
            "$ref": "#/components/schemas/AlertMetric",
            "description": "Metric to monitor",
            "default": "pageviews"
          },
          "condition_type": {
            "$ref": "#/components/schemas/ConditionType",
            "description": "How to detect anomaly",
            "default": "percentage_change"
          },
          "threshold_value": {
            "anyOf": [
              {
                "type": "number",
                "maximum": 10000,
                "minimum": 0
              },
              {
                "type": "string",
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
              }
            ],
            "title": "Threshold Value",
            "description": "Threshold value (e.g., 50 for 50% change)",
            "default": "50.0"
          },
          "threshold_direction": {
            "$ref": "#/components/schemas/ThresholdDirection",
            "description": "Direction to alert on",
            "default": "both"
          },
          "baseline_period": {
            "$ref": "#/components/schemas/BaselinePeriod",
            "description": "Period for baseline calculation",
            "default": "7d"
          },
          "comparison_window": {
            "$ref": "#/components/schemas/ComparisonWindow",
            "description": "Window for current value",
            "default": "1h"
          },
          "custom_condition": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Custom Condition",
            "description": "Custom condition config"
          },
          "notify_email": {
            "type": "boolean",
            "title": "Notify Email",
            "description": "Send email notifications",
            "default": true
          },
          "notify_slack": {
            "type": "boolean",
            "title": "Notify Slack",
            "description": "Send Slack notifications",
            "default": false
          },
          "notify_webhook": {
            "type": "boolean",
            "title": "Notify Webhook",
            "description": "Send webhook notifications",
            "default": false
          },
          "email_recipients": {
            "items": {
              "type": "string",
              "format": "email"
            },
            "type": "array",
            "maxItems": 10,
            "title": "Email Recipients",
            "description": "Email recipients"
          },
          "slack_webhook_url": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 500
              },
              {
                "type": "null"
              }
            ],
            "title": "Slack Webhook Url",
            "description": "Slack webhook URL"
          },
          "custom_webhook_url": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 500
              },
              {
                "type": "null"
              }
            ],
            "title": "Custom Webhook Url",
            "description": "Custom webhook URL"
          },
          "cooldown_minutes": {
            "type": "integer",
            "maximum": 1440,
            "minimum": 5,
            "title": "Cooldown Minutes",
            "description": "Minutes between alerts",
            "default": 60
          }
        },
        "type": "object",
        "required": [
          "name"
        ],
        "title": "AlertRuleCreate",
        "description": "Request model for creating an alert rule."
      },
      "AlertRuleInfo": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "account_id": {
            "type": "string",
            "title": "Account Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "alert_type": {
            "$ref": "#/components/schemas/AlertType"
          },
          "metric": {
            "$ref": "#/components/schemas/AlertMetric"
          },
          "condition_type": {
            "$ref": "#/components/schemas/ConditionType"
          },
          "threshold_value": {
            "type": "string",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Threshold Value"
          },
          "threshold_direction": {
            "$ref": "#/components/schemas/ThresholdDirection"
          },
          "baseline_period": {
            "$ref": "#/components/schemas/BaselinePeriod"
          },
          "comparison_window": {
            "$ref": "#/components/schemas/ComparisonWindow"
          },
          "custom_condition": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Custom Condition"
          },
          "notify_email": {
            "type": "boolean",
            "title": "Notify Email"
          },
          "notify_slack": {
            "type": "boolean",
            "title": "Notify Slack"
          },
          "notify_webhook": {
            "type": "boolean",
            "title": "Notify Webhook"
          },
          "email_recipients": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Email Recipients"
          },
          "slack_webhook_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Slack Webhook Url"
          },
          "custom_webhook_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Custom Webhook Url"
          },
          "cooldown_minutes": {
            "type": "integer",
            "title": "Cooldown Minutes"
          },
          "last_triggered_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Triggered At"
          },
          "is_active": {
            "type": "boolean",
            "title": "Is Active"
          },
          "trigger_count": {
            "type": "integer",
            "title": "Trigger Count"
          },
          "created_by": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "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"
          }
        },
        "type": "object",
        "required": [
          "id",
          "account_id",
          "name",
          "description",
          "alert_type",
          "metric",
          "condition_type",
          "threshold_value",
          "threshold_direction",
          "baseline_period",
          "comparison_window",
          "custom_condition",
          "notify_email",
          "notify_slack",
          "notify_webhook",
          "email_recipients",
          "slack_webhook_url",
          "custom_webhook_url",
          "cooldown_minutes",
          "last_triggered_at",
          "is_active",
          "trigger_count",
          "created_by",
          "created_at",
          "updated_at"
        ],
        "title": "AlertRuleInfo",
        "description": "Alert rule information returned by API."
      },
      "AlertRuleListResponse": {
        "properties": {
          "rules": {
            "items": {
              "$ref": "#/components/schemas/AlertRuleInfo"
            },
            "type": "array",
            "title": "Rules"
          },
          "total": {
            "type": "integer",
            "title": "Total"
          }
        },
        "type": "object",
        "required": [
          "rules",
          "total"
        ],
        "title": "AlertRuleListResponse",
        "description": "Response for alert rule list endpoint."
      },
      "AlertRuleUpdate": {
        "properties": {
          "name": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 255,
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "description": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 1000
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "alert_type": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AlertType"
              },
              {
                "type": "null"
              }
            ]
          },
          "metric": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AlertMetric"
              },
              {
                "type": "null"
              }
            ]
          },
          "condition_type": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ConditionType"
              },
              {
                "type": "null"
              }
            ]
          },
          "threshold_value": {
            "anyOf": [
              {
                "type": "number",
                "maximum": 10000,
                "minimum": 0
              },
              {
                "type": "string",
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Threshold Value"
          },
          "threshold_direction": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ThresholdDirection"
              },
              {
                "type": "null"
              }
            ]
          },
          "baseline_period": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BaselinePeriod"
              },
              {
                "type": "null"
              }
            ]
          },
          "comparison_window": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ComparisonWindow"
              },
              {
                "type": "null"
              }
            ]
          },
          "custom_condition": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Custom Condition"
          },
          "notify_email": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Notify Email"
          },
          "notify_slack": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Notify Slack"
          },
          "notify_webhook": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Notify Webhook"
          },
          "email_recipients": {
            "anyOf": [
              {
                "items": {
                  "type": "string",
                  "format": "email"
                },
                "type": "array",
                "maxItems": 10
              },
              {
                "type": "null"
              }
            ],
            "title": "Email Recipients"
          },
          "slack_webhook_url": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 500
              },
              {
                "type": "null"
              }
            ],
            "title": "Slack Webhook Url"
          },
          "custom_webhook_url": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 500
              },
              {
                "type": "null"
              }
            ],
            "title": "Custom Webhook Url"
          },
          "cooldown_minutes": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 1440,
                "minimum": 5
              },
              {
                "type": "null"
              }
            ],
            "title": "Cooldown Minutes"
          },
          "is_active": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Is Active"
          }
        },
        "type": "object",
        "title": "AlertRuleUpdate",
        "description": "Request model for updating an alert rule."
      },
      "AlertStats": {
        "properties": {
          "active_rules": {
            "type": "integer",
            "title": "Active Rules"
          },
          "total_triggers_24h": {
            "type": "integer",
            "title": "Total Triggers 24H"
          },
          "total_triggers_7d": {
            "type": "integer",
            "title": "Total Triggers 7D"
          },
          "total_triggers_30d": {
            "type": "integer",
            "title": "Total Triggers 30D"
          },
          "unacknowledged_alerts": {
            "type": "integer",
            "title": "Unacknowledged Alerts"
          },
          "most_triggered_rule": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Most Triggered Rule"
          },
          "last_trigger": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Trigger"
          }
        },
        "type": "object",
        "required": [
          "active_rules",
          "total_triggers_24h",
          "total_triggers_7d",
          "total_triggers_30d",
          "unacknowledged_alerts",
          "most_triggered_rule",
          "last_trigger"
        ],
        "title": "AlertStats",
        "description": "Alert statistics for an account."
      },
      "AlertStatus": {
        "type": "string",
        "enum": [
          "active",
          "acknowledged",
          "resolved",
          "false_positive"
        ],
        "title": "AlertStatus",
        "description": "Status of an alert."
      },
      "AlertType": {
        "type": "string",
        "enum": [
          "traffic_spike",
          "traffic_drop",
          "conversion_change",
          "error_rate",
          "source_change",
          "goal_reached",
          "custom"
        ],
        "title": "AlertType",
        "description": "Type of alert to monitor."
      },
      "AudienceInsightsResponse": {
        "properties": {
          "devices": {
            "items": {
              "$ref": "#/components/schemas/DimensionBreakdownResponse"
            },
            "type": "array",
            "title": "Devices"
          },
          "countries": {
            "items": {
              "$ref": "#/components/schemas/DimensionBreakdownResponse"
            },
            "type": "array",
            "title": "Countries"
          },
          "browsers": {
            "items": {
              "$ref": "#/components/schemas/DimensionBreakdownResponse"
            },
            "type": "array",
            "title": "Browsers"
          },
          "shifts": {
            "items": {
              "$ref": "#/components/schemas/AudienceShiftResponse"
            },
            "type": "array",
            "title": "Shifts"
          }
        },
        "type": "object",
        "title": "AudienceInsightsResponse",
        "description": "Audience insights section."
      },
      "AudienceShiftResponse": {
        "properties": {
          "dimension": {
            "type": "string",
            "title": "Dimension"
          },
          "description": {
            "type": "string",
            "title": "Description"
          },
          "impact": {
            "type": "string",
            "title": "Impact",
            "default": "neutral"
          }
        },
        "type": "object",
        "required": [
          "dimension",
          "description"
        ],
        "title": "AudienceShiftResponse",
        "description": "Audience shift notification."
      },
      "AuditLogEntry": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "user_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "User Id"
          },
          "user_email": {
            "type": "string",
            "title": "User Email"
          },
          "user_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "User Name"
          },
          "action": {
            "type": "string",
            "title": "Action"
          },
          "resource_type": {
            "type": "string",
            "title": "Resource Type"
          },
          "resource_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Resource Id"
          },
          "account_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Account Id"
          },
          "details": {
            "additionalProperties": true,
            "type": "object",
            "title": "Details"
          },
          "ip_address": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ip Address"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "user_email",
          "action",
          "resource_type",
          "created_at"
        ],
        "title": "AuditLogEntry",
        "description": "Single audit log entry."
      },
      "AuditLogListResponse": {
        "properties": {
          "logs": {
            "items": {
              "$ref": "#/components/schemas/AuditLogEntry"
            },
            "type": "array",
            "title": "Logs"
          },
          "total": {
            "type": "integer",
            "title": "Total"
          },
          "page": {
            "type": "integer",
            "title": "Page"
          },
          "page_size": {
            "type": "integer",
            "title": "Page Size"
          },
          "total_pages": {
            "type": "integer",
            "title": "Total Pages"
          }
        },
        "type": "object",
        "required": [
          "logs",
          "total",
          "page",
          "page_size",
          "total_pages"
        ],
        "title": "AuditLogListResponse",
        "description": "Paginated response for audit logs."
      },
      "AvailableTool": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "description": {
            "type": "string",
            "title": "Description"
          },
          "category": {
            "type": "string",
            "title": "Category"
          }
        },
        "type": "object",
        "required": [
          "name",
          "description",
          "category"
        ],
        "title": "AvailableTool",
        "description": "Information about an available tool."
      },
      "BackupCodesResponse": {
        "properties": {
          "backup_codes": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Backup Codes",
            "description": "New backup codes (show once)"
          },
          "count": {
            "type": "integer",
            "title": "Count",
            "description": "Number of backup codes"
          }
        },
        "type": "object",
        "required": [
          "backup_codes",
          "count"
        ],
        "title": "BackupCodesResponse",
        "description": "Regenerated backup codes."
      },
      "BaselinePeriod": {
        "type": "string",
        "enum": [
          "24h",
          "7d",
          "30d",
          "90d"
        ],
        "title": "BaselinePeriod",
        "description": "Period for baseline calculation."
      },
      "BatchMeta": {
        "properties": {
          "total_queries": {
            "type": "integer",
            "title": "Total Queries",
            "description": "Total number of queries"
          },
          "successful": {
            "type": "integer",
            "title": "Successful",
            "description": "Number of successful queries"
          },
          "failed": {
            "type": "integer",
            "title": "Failed",
            "description": "Number of failed queries"
          },
          "skipped": {
            "type": "integer",
            "title": "Skipped",
            "description": "Number of skipped queries",
            "default": 0
          },
          "total_timing_ms": {
            "type": "integer",
            "title": "Total Timing Ms",
            "description": "Total execution time in ms"
          },
          "parallel_execution": {
            "type": "boolean",
            "title": "Parallel Execution",
            "description": "Whether parallel execution was used"
          }
        },
        "type": "object",
        "required": [
          "total_queries",
          "successful",
          "failed",
          "total_timing_ms",
          "parallel_execution"
        ],
        "title": "BatchMeta",
        "description": "Metadata about batch execution."
      },
      "BatchOptions": {
        "properties": {
          "fail_fast": {
            "type": "boolean",
            "title": "Fail Fast",
            "description": "Stop execution on first error",
            "default": false
          },
          "dry_run": {
            "type": "boolean",
            "title": "Dry Run",
            "description": "Validate queries without executing",
            "default": false
          },
          "include_timing": {
            "type": "boolean",
            "title": "Include Timing",
            "description": "Include execution timing in response",
            "default": true
          },
          "parallel_limit": {
            "type": "integer",
            "maximum": 10,
            "minimum": 1,
            "title": "Parallel Limit",
            "description": "Maximum parallel query execution",
            "default": 5
          }
        },
        "type": "object",
        "title": "BatchOptions",
        "description": "Options for batch execution."
      },
      "BatchQuery": {
        "properties": {
          "id": {
            "type": "string",
            "maxLength": 64,
            "minLength": 1,
            "pattern": "^[a-zA-Z][a-zA-Z0-9_-]*$",
            "title": "Id",
            "description": "Unique identifier for this query (alphanumeric, starts with letter)"
          },
          "endpoint": {
            "type": "string",
            "title": "Endpoint",
            "description": "Stats endpoint path (e.g., '/stats/overview', '/stats/pages')"
          },
          "params": {
            "additionalProperties": true,
            "type": "object",
            "title": "Params",
            "description": "Query parameters for the endpoint"
          },
          "depends_on": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Depends On",
            "description": "List of query IDs this query depends on"
          }
        },
        "type": "object",
        "required": [
          "id",
          "endpoint"
        ],
        "title": "BatchQuery",
        "description": "Single query in a batch request.\n\nEach query targets an existing stats endpoint with its parameters."
      },
      "BatchQueryStatus": {
        "type": "string",
        "enum": [
          "success",
          "error",
          "skipped"
        ],
        "title": "BatchQueryStatus",
        "description": "Status of an individual query in a batch."
      },
      "BatchRequest": {
        "properties": {
          "queries": {
            "items": {
              "$ref": "#/components/schemas/BatchQuery"
            },
            "type": "array",
            "maxItems": 50,
            "minItems": 1,
            "title": "Queries",
            "description": "List of queries to execute (max 50)"
          },
          "options": {
            "$ref": "#/components/schemas/BatchOptions",
            "description": "Batch execution options"
          }
        },
        "type": "object",
        "required": [
          "queries"
        ],
        "title": "BatchRequest",
        "description": "Batch request containing multiple queries.\n\nExecutes multiple stats queries in a single HTTP request,\nwith support for dependencies between queries and parallel execution."
      },
      "BatchResponse": {
        "properties": {
          "batch_id": {
            "type": "string",
            "title": "Batch Id",
            "description": "Unique batch identifier"
          },
          "status": {
            "$ref": "#/components/schemas/BatchStatus",
            "description": "Overall batch status"
          },
          "results": {
            "additionalProperties": {
              "$ref": "#/components/schemas/QueryResult"
            },
            "type": "object",
            "title": "Results",
            "description": "Results keyed by query ID"
          },
          "meta": {
            "$ref": "#/components/schemas/BatchMeta",
            "description": "Execution metadata"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp",
            "description": "Response timestamp"
          }
        },
        "type": "object",
        "required": [
          "batch_id",
          "status",
          "results",
          "meta"
        ],
        "title": "BatchResponse",
        "description": "Response for a batch request.\n\nContains results for all queries and execution metadata."
      },
      "BatchStatus": {
        "type": "string",
        "enum": [
          "completed",
          "partial",
          "failed"
        ],
        "title": "BatchStatus",
        "description": "Overall batch execution status."
      },
      "BatchValidationResponse": {
        "properties": {
          "valid": {
            "type": "boolean",
            "title": "Valid",
            "description": "Whether the batch is valid"
          },
          "query_count": {
            "type": "integer",
            "title": "Query Count",
            "description": "Number of queries"
          },
          "execution_order": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Execution Order",
            "description": "Order queries will be executed"
          },
          "parallel_groups": {
            "items": {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "type": "array",
            "title": "Parallel Groups",
            "description": "Groups of queries that can run in parallel"
          },
          "errors": {
            "items": {
              "additionalProperties": {
                "type": "string"
              },
              "type": "object"
            },
            "type": "array",
            "title": "Errors",
            "description": "Validation errors"
          },
          "warnings": {
            "items": {
              "additionalProperties": {
                "type": "string"
              },
              "type": "object"
            },
            "type": "array",
            "title": "Warnings",
            "description": "Validation warnings"
          }
        },
        "type": "object",
        "required": [
          "valid",
          "query_count",
          "execution_order",
          "parallel_groups"
        ],
        "title": "BatchValidationResponse",
        "description": "Response for batch validation (dry-run)."
      },
      "BigQueryBackfillRequest": {
        "properties": {
          "date_from": {
            "type": "string",
            "format": "date",
            "title": "Date From",
            "description": "Start date for backfill"
          },
          "date_to": {
            "type": "string",
            "format": "date",
            "title": "Date To",
            "description": "End date for backfill"
          },
          "chunk_days": {
            "type": "integer",
            "maximum": 30,
            "minimum": 1,
            "title": "Chunk Days",
            "description": "Days per chunk (smaller = more progress updates)",
            "default": 7
          }
        },
        "type": "object",
        "required": [
          "date_from",
          "date_to"
        ],
        "title": "BigQueryBackfillRequest",
        "description": "Request to trigger a backfill sync."
      },
      "BigQueryBackfillResponse": {
        "properties": {
          "sync_id": {
            "type": "string",
            "title": "Sync Id"
          },
          "sync_type": {
            "type": "string",
            "title": "Sync Type",
            "default": "backfill"
          },
          "date_from": {
            "type": "string",
            "format": "date",
            "title": "Date From"
          },
          "date_to": {
            "type": "string",
            "format": "date",
            "title": "Date To"
          },
          "status": {
            "type": "string",
            "title": "Status"
          },
          "tables": {
            "additionalProperties": true,
            "type": "object",
            "title": "Tables"
          },
          "total_rows": {
            "type": "integer",
            "title": "Total Rows"
          },
          "total_bytes": {
            "type": "integer",
            "title": "Total Bytes"
          },
          "total_chunks": {
            "type": "integer",
            "title": "Total Chunks"
          },
          "failed_chunks": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "type": "array",
            "title": "Failed Chunks"
          },
          "duration_seconds": {
            "type": "number",
            "title": "Duration Seconds"
          },
          "message": {
            "type": "string",
            "title": "Message"
          }
        },
        "type": "object",
        "required": [
          "sync_id",
          "date_from",
          "date_to",
          "status",
          "tables",
          "total_rows",
          "total_bytes",
          "total_chunks",
          "failed_chunks",
          "duration_seconds",
          "message"
        ],
        "title": "BigQueryBackfillResponse",
        "description": "Response after triggering a backfill."
      },
      "BigQueryIntegrationInfo": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "account_id": {
            "type": "string",
            "title": "Account Id"
          },
          "gcp_project_id": {
            "type": "string",
            "title": "Gcp Project Id"
          },
          "dataset_id": {
            "type": "string",
            "title": "Dataset Id"
          },
          "location": {
            "type": "string",
            "title": "Location"
          },
          "sync_frequency": {
            "$ref": "#/components/schemas/SyncFrequency"
          },
          "data_types": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Data Types"
          },
          "backfill_days": {
            "type": "integer",
            "title": "Backfill Days"
          },
          "initial_date_from": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "title": "Initial Date From"
          },
          "initial_date_to": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "title": "Initial Date To"
          },
          "is_active": {
            "type": "boolean",
            "title": "Is Active"
          },
          "setup_completed": {
            "type": "boolean",
            "title": "Setup Completed"
          },
          "setup_completed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Setup Completed At"
          },
          "tables_created": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tables Created"
          },
          "last_sync_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Sync At"
          },
          "last_sync_status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Sync Status"
          },
          "last_error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Error"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "title": "Updated At"
          },
          "created_by": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created By"
          }
        },
        "type": "object",
        "required": [
          "id",
          "account_id",
          "gcp_project_id",
          "dataset_id",
          "location",
          "sync_frequency",
          "data_types",
          "backfill_days",
          "is_active",
          "setup_completed",
          "created_at",
          "updated_at"
        ],
        "title": "BigQueryIntegrationInfo",
        "description": "BigQuery integration details."
      },
      "BigQuerySetupResponse": {
        "properties": {
          "integration": {
            "$ref": "#/components/schemas/BigQueryIntegrationInfo"
          },
          "dataset_ref": {
            "type": "string",
            "title": "Dataset Ref",
            "description": "Full BigQuery dataset reference"
          },
          "tables_created": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Tables Created",
            "description": "Tables created in BigQuery"
          },
          "message": {
            "type": "string",
            "title": "Message"
          }
        },
        "type": "object",
        "required": [
          "integration",
          "dataset_ref",
          "tables_created",
          "message"
        ],
        "title": "BigQuerySetupResponse",
        "description": "Response after setting up BigQuery integration."
      },
      "BigQuerySyncLogInfo": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "sync_id": {
            "type": "string",
            "format": "uuid",
            "title": "Sync Id"
          },
          "sync_type": {
            "type": "string",
            "title": "Sync Type"
          },
          "sync_started_at": {
            "type": "string",
            "format": "date-time",
            "title": "Sync Started At"
          },
          "sync_completed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sync Completed At"
          },
          "date_from": {
            "type": "string",
            "format": "date",
            "title": "Date From"
          },
          "date_to": {
            "type": "string",
            "format": "date",
            "title": "Date To"
          },
          "tables_synced": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tables Synced"
          },
          "total_rows_synced": {
            "type": "integer",
            "title": "Total Rows Synced"
          },
          "total_bytes_synced": {
            "type": "integer",
            "title": "Total Bytes Synced"
          },
          "status": {
            "$ref": "#/components/schemas/SyncStatus"
          },
          "error_message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error Message"
          },
          "duration_seconds": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Duration Seconds"
          }
        },
        "type": "object",
        "required": [
          "id",
          "sync_id",
          "sync_type",
          "sync_started_at",
          "date_from",
          "date_to",
          "total_rows_synced",
          "total_bytes_synced",
          "status"
        ],
        "title": "BigQuerySyncLogInfo",
        "description": "Sync log entry information."
      },
      "BigQuerySyncLogsResponse": {
        "properties": {
          "logs": {
            "items": {
              "$ref": "#/components/schemas/BigQuerySyncLogInfo"
            },
            "type": "array",
            "title": "Logs"
          },
          "total": {
            "type": "integer",
            "title": "Total"
          }
        },
        "type": "object",
        "required": [
          "logs",
          "total"
        ],
        "title": "BigQuerySyncLogsResponse",
        "description": "Response for sync logs list."
      },
      "BigQueryUpdateRequest": {
        "properties": {
          "sync_frequency": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SyncFrequency"
              },
              {
                "type": "null"
              }
            ]
          },
          "data_types": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/DataType"
                },
                "type": "array",
                "minItems": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Data Types"
          },
          "is_active": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Is Active"
          },
          "backfill_days": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 365,
                "minimum": 0
              },
              {
                "type": "null"
              }
            ],
            "title": "Backfill Days"
          }
        },
        "type": "object",
        "title": "BigQueryUpdateRequest",
        "description": "Request to update BigQuery integration settings."
      },
      "BlocklistIPCreate": {
        "properties": {
          "ip_or_cidr": {
            "type": "string",
            "maxLength": 50,
            "minLength": 1,
            "title": "Ip Or Cidr",
            "description": "IP address or CIDR range to block (e.g., '192.168.1.100' or '10.0.0.0/8')"
          },
          "reason": {
            "type": "string",
            "maxLength": 255,
            "title": "Reason",
            "description": "Reason for blocking (e.g., 'competitor', 'bot', 'internal')",
            "default": ""
          },
          "is_active": {
            "type": "boolean",
            "title": "Is Active",
            "description": "Whether this entry is active",
            "default": true
          }
        },
        "type": "object",
        "required": [
          "ip_or_cidr"
        ],
        "title": "BlocklistIPCreate",
        "description": "Request model for creating a blocklist entry."
      },
      "BlocklistIPList": {
        "properties": {
          "entries": {
            "items": {
              "$ref": "#/components/schemas/BlocklistIPResponse"
            },
            "type": "array",
            "title": "Entries",
            "description": "List of blocklist entries"
          },
          "total": {
            "type": "integer",
            "title": "Total",
            "description": "Total number of entries"
          },
          "active_count": {
            "type": "integer",
            "title": "Active Count",
            "description": "Number of active entries"
          }
        },
        "type": "object",
        "required": [
          "entries",
          "total",
          "active_count"
        ],
        "title": "BlocklistIPList",
        "description": "Response for listing blocklist entries."
      },
      "BlocklistIPResponse": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id",
            "description": "Entry ID"
          },
          "account_id": {
            "type": "string",
            "title": "Account Id",
            "description": "Account ID"
          },
          "ip_or_cidr": {
            "type": "string",
            "title": "Ip Or Cidr",
            "description": "IP address or CIDR range"
          },
          "reason": {
            "type": "string",
            "title": "Reason",
            "description": "Reason for blocking"
          },
          "is_active": {
            "type": "boolean",
            "title": "Is Active",
            "description": "Whether this entry is active"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp"
          }
        },
        "type": "object",
        "required": [
          "id",
          "account_id",
          "ip_or_cidr",
          "reason",
          "is_active",
          "created_at"
        ],
        "title": "BlocklistIPResponse",
        "description": "Response model for blocklist entry."
      },
      "BlocklistIPUpdate": {
        "properties": {
          "ip_or_cidr": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 50,
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Ip Or Cidr",
            "description": "IP address or CIDR range"
          },
          "reason": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 255
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason",
            "description": "Reason for blocking"
          },
          "is_active": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Is Active",
            "description": "Whether this entry is active"
          }
        },
        "type": "object",
        "title": "BlocklistIPUpdate",
        "description": "Request model for updating a blocklist entry."
      },
      "Body_setup_bigquery_integration_api_v1_integrations_bigquery_post": {
        "properties": {
          "service_account_file": {
            "type": "string",
            "format": "binary",
            "title": "Service Account File",
            "description": "Service Account JSON file"
          }
        },
        "type": "object",
        "required": [
          "service_account_file"
        ],
        "title": "Body_setup_bigquery_integration_api_v1_integrations_bigquery_post"
      },
      "BotStatsOverview": {
        "properties": {
          "period_start": {
            "type": "string",
            "format": "date",
            "title": "Period Start"
          },
          "period_end": {
            "type": "string",
            "format": "date",
            "title": "Period End"
          },
          "distribution": {
            "$ref": "#/components/schemas/ScoreDistribution"
          },
          "top_flags": {
            "items": {
              "$ref": "#/components/schemas/FlagCount"
            },
            "type": "array",
            "title": "Top Flags"
          },
          "daily_trend": {
            "items": {
              "$ref": "#/components/schemas/DailyStats"
            },
            "type": "array",
            "title": "Daily Trend"
          }
        },
        "type": "object",
        "required": [
          "period_start",
          "period_end",
          "distribution",
          "top_flags",
          "daily_trend"
        ],
        "title": "BotStatsOverview",
        "description": "Overview of bot detection statistics."
      },
      "ChannelGroupRuleCreate": {
        "properties": {
          "channel_name": {
            "type": "string",
            "maxLength": 50,
            "minLength": 1,
            "title": "Channel Name",
            "description": "Channel name (e.g., 'Organic Search', 'Paid Social')"
          },
          "source_pattern": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 255
              },
              {
                "type": "null"
              }
            ],
            "title": "Source Pattern",
            "description": "Regex pattern for utm_source (NULL = match any)"
          },
          "medium_pattern": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 255
              },
              {
                "type": "null"
              }
            ],
            "title": "Medium Pattern",
            "description": "Regex pattern for utm_medium (NULL = match any)"
          },
          "campaign_pattern": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 255
              },
              {
                "type": "null"
              }
            ],
            "title": "Campaign Pattern",
            "description": "Regex pattern for utm_campaign (NULL = match any)"
          },
          "priority": {
            "type": "integer",
            "maximum": 1000,
            "minimum": 0,
            "title": "Priority",
            "description": "Higher priority rules are evaluated first (0-1000)",
            "default": 50
          },
          "is_active": {
            "type": "boolean",
            "title": "Is Active",
            "description": "Whether this rule is active",
            "default": true
          }
        },
        "type": "object",
        "required": [
          "channel_name"
        ],
        "title": "ChannelGroupRuleCreate",
        "description": "Request model for creating a channel group rule."
      },
      "ChannelGroupRuleList": {
        "properties": {
          "rules": {
            "items": {
              "$ref": "#/components/schemas/ChannelGroupRuleResponse"
            },
            "type": "array",
            "title": "Rules",
            "description": "List of rules"
          },
          "total": {
            "type": "integer",
            "title": "Total",
            "description": "Total number of rules"
          },
          "default_count": {
            "type": "integer",
            "title": "Default Count",
            "description": "Number of default (system) rules"
          },
          "custom_count": {
            "type": "integer",
            "title": "Custom Count",
            "description": "Number of custom (account) rules"
          }
        },
        "type": "object",
        "required": [
          "rules",
          "total",
          "default_count",
          "custom_count"
        ],
        "title": "ChannelGroupRuleList",
        "description": "Response for listing channel group rules."
      },
      "ChannelGroupRuleResponse": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id",
            "description": "Rule ID"
          },
          "account_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Account Id",
            "description": "Account ID (NULL = global rule)"
          },
          "channel_name": {
            "type": "string",
            "title": "Channel Name",
            "description": "Channel name"
          },
          "source_pattern": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source Pattern",
            "description": "Source pattern regex"
          },
          "medium_pattern": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Medium Pattern",
            "description": "Medium pattern regex"
          },
          "campaign_pattern": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Campaign Pattern",
            "description": "Campaign pattern regex"
          },
          "priority": {
            "type": "integer",
            "title": "Priority",
            "description": "Priority (higher = checked first)"
          },
          "is_default": {
            "type": "boolean",
            "title": "Is Default",
            "description": "Whether this is a system default rule"
          },
          "is_active": {
            "type": "boolean",
            "title": "Is Active",
            "description": "Whether this rule is active"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "title": "Updated At",
            "description": "Last update timestamp"
          }
        },
        "type": "object",
        "required": [
          "id",
          "channel_name",
          "priority",
          "is_default",
          "is_active",
          "created_at",
          "updated_at"
        ],
        "title": "ChannelGroupRuleResponse",
        "description": "Response model for a channel group rule."
      },
      "ChannelGroupRuleUpdate": {
        "properties": {
          "channel_name": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 50,
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Channel Name",
            "description": "Channel name"
          },
          "source_pattern": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 255
              },
              {
                "type": "null"
              }
            ],
            "title": "Source Pattern",
            "description": "Regex pattern for utm_source"
          },
          "medium_pattern": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 255
              },
              {
                "type": "null"
              }
            ],
            "title": "Medium Pattern",
            "description": "Regex pattern for utm_medium"
          },
          "campaign_pattern": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 255
              },
              {
                "type": "null"
              }
            ],
            "title": "Campaign Pattern",
            "description": "Regex pattern for utm_campaign"
          },
          "priority": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 1000,
                "minimum": 0
              },
              {
                "type": "null"
              }
            ],
            "title": "Priority",
            "description": "Priority (0-1000)"
          },
          "is_active": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Is Active",
            "description": "Whether this rule is active"
          }
        },
        "type": "object",
        "title": "ChannelGroupRuleUpdate",
        "description": "Request model for updating a channel group rule."
      },
      "ChannelMetrics": {
        "properties": {
          "channel": {
            "type": "string",
            "title": "Channel",
            "description": "Channel name"
          },
          "entrances": {
            "type": "integer",
            "title": "Entrances",
            "description": "Number of entrances"
          },
          "engaged_entrances": {
            "type": "integer",
            "title": "Engaged Entrances",
            "description": "Number of engaged sessions"
          },
          "bounces": {
            "type": "integer",
            "title": "Bounces",
            "description": "Number of bounces"
          },
          "bounce_rate": {
            "type": "number",
            "title": "Bounce Rate",
            "description": "Bounce rate percentage"
          },
          "page_views": {
            "type": "integer",
            "title": "Page Views",
            "description": "Total page views"
          },
          "microconversions": {
            "type": "integer",
            "title": "Microconversions",
            "description": "Number of microconversions"
          },
          "conversions": {
            "type": "integer",
            "title": "Conversions",
            "description": "Number of conversions"
          },
          "conversion_rate": {
            "type": "number",
            "title": "Conversion Rate",
            "description": "Conversion rate percentage"
          },
          "revenue": {
            "type": "number",
            "title": "Revenue",
            "description": "Total revenue"
          }
        },
        "type": "object",
        "required": [
          "channel",
          "entrances",
          "engaged_entrances",
          "bounces",
          "bounce_rate",
          "page_views",
          "microconversions",
          "conversions",
          "conversion_rate",
          "revenue"
        ],
        "title": "ChannelMetrics",
        "description": "Metrics for a single channel."
      },
      "ChannelMetricsList": {
        "properties": {
          "channels": {
            "items": {
              "$ref": "#/components/schemas/ChannelMetrics"
            },
            "type": "array",
            "title": "Channels",
            "description": "Channel metrics"
          },
          "total": {
            "type": "integer",
            "title": "Total",
            "description": "Total number of channels"
          }
        },
        "type": "object",
        "required": [
          "channels",
          "total"
        ],
        "title": "ChannelMetricsList",
        "description": "Response for channel analytics."
      },
      "ChannelMetricsResponse": {
        "properties": {
          "channel": {
            "type": "string",
            "title": "Channel"
          },
          "revenue": {
            "type": "number",
            "title": "Revenue",
            "default": 0
          },
          "conversions": {
            "type": "integer",
            "title": "Conversions",
            "default": 0
          },
          "entrances": {
            "type": "integer",
            "title": "Entrances",
            "default": 0
          },
          "conversion_rate": {
            "type": "number",
            "title": "Conversion Rate",
            "default": 0
          },
          "revenue_share": {
            "type": "number",
            "title": "Revenue Share",
            "default": 0
          },
          "change_pct": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Change Pct"
          },
          "trend": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Trend"
          },
          "recommendation": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Recommendation"
          }
        },
        "type": "object",
        "required": [
          "channel"
        ],
        "title": "ChannelMetricsResponse",
        "description": "Channel performance metrics."
      },
      "ChannelPerformanceResponse": {
        "properties": {
          "channels": {
            "items": {
              "$ref": "#/components/schemas/ChannelMetricsResponse"
            },
            "type": "array",
            "title": "Channels"
          },
          "top_performer": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Top Performer"
          },
          "biggest_decline": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Biggest Decline"
          },
          "total_revenue": {
            "type": "number",
            "title": "Total Revenue",
            "default": 0
          }
        },
        "type": "object",
        "title": "ChannelPerformanceResponse",
        "description": "Channel performance section."
      },
      "ChartData": {
        "properties": {
          "type": {
            "type": "string",
            "title": "Type",
            "description": "Chart type: line, bar, or pie"
          },
          "title": {
            "type": "string",
            "title": "Title"
          },
          "data": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "type": "array",
            "title": "Data"
          },
          "x_key": {
            "type": "string",
            "title": "X Key",
            "default": "date"
          },
          "y_key": {
            "type": "string",
            "title": "Y Key",
            "default": "value"
          },
          "y_label": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Y Label"
          }
        },
        "type": "object",
        "required": [
          "type",
          "title",
          "data"
        ],
        "title": "ChartData",
        "description": "Structured chart data for frontend rendering."
      },
      "ChatRequest": {
        "properties": {
          "message": {
            "type": "string",
            "maxLength": 1000,
            "minLength": 1,
            "title": "Message",
            "description": "User message to the assistant"
          },
          "account_id": {
            "type": "string",
            "title": "Account Id",
            "description": "Account ID to query data for"
          },
          "conversation_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Conversation Id",
            "description": "Conversation ID to continue a previous conversation"
          },
          "language": {
            "type": "string",
            "title": "Language",
            "description": "Response language: 'es' (Spanish) or 'en' (English)",
            "default": "es"
          }
        },
        "type": "object",
        "required": [
          "message",
          "account_id"
        ],
        "title": "ChatRequest",
        "description": "Request to chat with the AI assistant."
      },
      "ChatResponse": {
        "properties": {
          "response": {
            "type": "string",
            "title": "Response",
            "description": "Assistant's response message"
          },
          "conversation_id": {
            "type": "string",
            "title": "Conversation Id",
            "description": "Conversation ID for follow-ups"
          },
          "tools_used": {
            "items": {
              "$ref": "#/components/schemas/ToolUsage"
            },
            "type": "array",
            "title": "Tools Used",
            "description": "Tools used to generate the response"
          },
          "charts": {
            "items": {
              "$ref": "#/components/schemas/ChartData"
            },
            "type": "array",
            "title": "Charts",
            "description": "Charts to render in the response"
          },
          "tables": {
            "items": {
              "$ref": "#/components/schemas/TableData"
            },
            "type": "array",
            "title": "Tables",
            "description": "Tables to render in the response"
          },
          "input_tokens": {
            "type": "integer",
            "title": "Input Tokens",
            "description": "Input tokens consumed",
            "default": 0
          },
          "output_tokens": {
            "type": "integer",
            "title": "Output Tokens",
            "description": "Output tokens generated",
            "default": 0
          }
        },
        "type": "object",
        "required": [
          "response",
          "conversation_id"
        ],
        "title": "ChatResponse",
        "description": "Response from the AI assistant."
      },
      "ChatUsageCheckResponse": {
        "properties": {
          "can_ask": {
            "type": "boolean",
            "title": "Can Ask"
          },
          "questions_remaining": {
            "type": "integer",
            "title": "Questions Remaining"
          },
          "message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Message"
          }
        },
        "type": "object",
        "required": [
          "can_ask",
          "questions_remaining"
        ],
        "title": "ChatUsageCheckResponse",
        "description": "Response when checking if user can ask a question."
      },
      "ChatUsageResponse": {
        "properties": {
          "questions_used": {
            "type": "integer",
            "title": "Questions Used"
          },
          "questions_limit": {
            "type": "integer",
            "title": "Questions Limit"
          },
          "bonus_questions": {
            "type": "integer",
            "title": "Bonus Questions"
          },
          "questions_remaining": {
            "type": "integer",
            "title": "Questions Remaining"
          },
          "period_start": {
            "type": "string",
            "title": "Period Start"
          },
          "period_end": {
            "type": "string",
            "title": "Period End"
          },
          "percentage_used": {
            "type": "number",
            "title": "Percentage Used"
          }
        },
        "type": "object",
        "required": [
          "questions_used",
          "questions_limit",
          "bonus_questions",
          "questions_remaining",
          "period_start",
          "period_end",
          "percentage_used"
        ],
        "title": "ChatUsageResponse",
        "description": "Chat question usage response."
      },
      "ComparisonWindow": {
        "type": "string",
        "enum": [
          "15m",
          "1h",
          "6h",
          "24h"
        ],
        "title": "ComparisonWindow",
        "description": "Window for current value comparison."
      },
      "ConditionType": {
        "type": "string",
        "enum": [
          "percentage_change",
          "absolute_threshold",
          "std_deviation",
          "rate_of_change"
        ],
        "title": "ConditionType",
        "description": "How to detect anomaly."
      },
      "ContentGroupMetrics": {
        "properties": {
          "content_grouping": {
            "type": "string",
            "title": "Content Grouping",
            "description": "Content group name"
          },
          "unique_pages": {
            "type": "integer",
            "minimum": 0,
            "title": "Unique Pages",
            "description": "Unique pages in group",
            "default": 0
          },
          "entrances": {
            "type": "integer",
            "minimum": 0,
            "title": "Entrances",
            "default": 0
          },
          "engaged_entrances": {
            "type": "integer",
            "minimum": 0,
            "title": "Engaged Entrances",
            "default": 0
          },
          "bounce_rate": {
            "type": "number",
            "maximum": 100,
            "minimum": 0,
            "title": "Bounce Rate",
            "default": 0
          },
          "microconversions": {
            "type": "integer",
            "minimum": 0,
            "title": "Microconversions",
            "default": 0
          },
          "conversions": {
            "type": "integer",
            "minimum": 0,
            "title": "Conversions",
            "default": 0
          },
          "conversion_rate": {
            "type": "number",
            "maximum": 100,
            "minimum": 0,
            "title": "Conversion Rate",
            "default": 0
          },
          "revenue": {
            "type": "string",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Revenue",
            "default": "0"
          }
        },
        "type": "object",
        "required": [
          "content_grouping"
        ],
        "title": "ContentGroupMetrics",
        "description": "Metrics for a content group (from report_landing_pages)."
      },
      "ConversationHistory": {
        "properties": {
          "conversation_id": {
            "type": "string",
            "title": "Conversation Id"
          },
          "account_id": {
            "type": "string",
            "title": "Account Id"
          },
          "title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Title"
          },
          "messages": {
            "items": {
              "$ref": "#/components/schemas/ConversationMessage"
            },
            "type": "array",
            "title": "Messages"
          },
          "created_at": {
            "type": "string",
            "title": "Created At"
          },
          "updated_at": {
            "type": "string",
            "title": "Updated At"
          }
        },
        "type": "object",
        "required": [
          "conversation_id",
          "account_id",
          "messages",
          "created_at",
          "updated_at"
        ],
        "title": "ConversationHistory",
        "description": "Conversation history."
      },
      "ConversationMessage": {
        "properties": {
          "role": {
            "type": "string",
            "title": "Role",
            "description": "Message role: user or assistant"
          },
          "content": {
            "type": "string",
            "title": "Content",
            "description": "Message content"
          },
          "timestamp": {
            "type": "string",
            "title": "Timestamp",
            "description": "ISO timestamp"
          },
          "charts": {
            "items": {
              "$ref": "#/components/schemas/ChartData"
            },
            "type": "array",
            "title": "Charts"
          },
          "tables": {
            "items": {
              "$ref": "#/components/schemas/TableData"
            },
            "type": "array",
            "title": "Tables"
          }
        },
        "type": "object",
        "required": [
          "role",
          "content",
          "timestamp"
        ],
        "title": "ConversationMessage",
        "description": "A message in a conversation."
      },
      "ConversionMetrics": {
        "properties": {
          "conversions": {
            "type": "integer",
            "minimum": 0,
            "title": "Conversions",
            "description": "Total conversions",
            "default": 0
          },
          "revenue": {
            "type": "string",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Revenue",
            "description": "Total revenue",
            "default": "0"
          },
          "microconversions": {
            "type": "integer",
            "minimum": 0,
            "title": "Microconversions",
            "description": "Total microconversions",
            "default": 0
          },
          "conversion_rate": {
            "type": "number",
            "minimum": 0,
            "title": "Conversion Rate",
            "description": "Conversion rate percentage",
            "default": 0
          },
          "average_order_value": {
            "type": "string",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Average Order Value",
            "description": "Average order value",
            "default": "0"
          }
        },
        "type": "object",
        "title": "ConversionMetrics",
        "description": "Conversion metrics."
      },
      "ConversionsByType": {
        "properties": {
          "conversion_type": {
            "type": "string",
            "title": "Conversion Type",
            "description": "Conversion type name"
          },
          "count": {
            "type": "integer",
            "minimum": 0,
            "title": "Count",
            "default": 0
          },
          "revenue": {
            "type": "string",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Revenue",
            "default": "0"
          },
          "avg_value": {
            "type": "string",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Avg Value",
            "default": "0"
          },
          "by_source": {
            "items": {
              "$ref": "#/components/schemas/SourceConversion"
            },
            "type": "array",
            "title": "By Source"
          },
          "by_country": {
            "items": {
              "$ref": "#/components/schemas/GeoConversion"
            },
            "type": "array",
            "title": "By Country"
          }
        },
        "type": "object",
        "required": [
          "conversion_type"
        ],
        "title": "ConversionsByType",
        "description": "Conversions grouped by type."
      },
      "DailyStats": {
        "properties": {
          "date": {
            "type": "string",
            "format": "date",
            "title": "Date"
          },
          "total_hits": {
            "type": "integer",
            "title": "Total Hits"
          },
          "suspicious_hits": {
            "type": "integer",
            "title": "Suspicious Hits",
            "description": "Hits with score > 30"
          },
          "avg_score": {
            "type": "number",
            "title": "Avg Score"
          }
        },
        "type": "object",
        "required": [
          "date",
          "total_hits",
          "suspicious_hits",
          "avg_score"
        ],
        "title": "DailyStats",
        "description": "Daily bot detection statistics."
      },
      "DashboardType": {
        "type": "string",
        "enum": [
          "overview",
          "sources",
          "pages",
          "geo",
          "devices",
          "conversions",
          "custom"
        ],
        "title": "DashboardType",
        "description": "Type of dashboard to share."
      },
      "DataType": {
        "type": "string",
        "enum": [
          "traffic",
          "traffic_hourly",
          "conversions",
          "microconversions",
          "pages",
          "landing_pages",
          "accounts"
        ],
        "title": "DataType",
        "description": "Types of data that can be synced to BigQuery."
      },
      "DateRange": {
        "properties": {
          "start_date": {
            "type": "string",
            "format": "date",
            "title": "Start Date",
            "description": "Start date (inclusive)"
          },
          "end_date": {
            "type": "string",
            "format": "date",
            "title": "End Date",
            "description": "End date (inclusive)"
          },
          "days": {
            "type": "integer",
            "title": "Days",
            "description": "Number of days in range.",
            "readOnly": true
          }
        },
        "type": "object",
        "required": [
          "start_date",
          "end_date",
          "days"
        ],
        "title": "DateRange",
        "description": "Date range for analytics queries."
      },
      "DimensionBreakdownResponse": {
        "properties": {
          "value": {
            "type": "string",
            "title": "Value"
          },
          "share": {
            "type": "number",
            "title": "Share"
          },
          "change": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Change"
          }
        },
        "type": "object",
        "required": [
          "value",
          "share"
        ],
        "title": "DimensionBreakdownResponse",
        "description": "Dimension breakdown item."
      },
      "DomainAdd": {
        "properties": {
          "domain": {
            "type": "string",
            "maxLength": 255,
            "minLength": 3,
            "title": "Domain",
            "description": "Domain to add (e.g., example.com or sub.example.com)"
          }
        },
        "type": "object",
        "required": [
          "domain"
        ],
        "title": "DomainAdd",
        "description": "Request to add a domain."
      },
      "DomainInfo": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "domain": {
            "type": "string",
            "title": "Domain"
          },
          "is_active": {
            "type": "boolean",
            "title": "Is Active",
            "default": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "domain",
          "created_at"
        ],
        "title": "DomainInfo",
        "description": "Domain information."
      },
      "DomainListResponse": {
        "properties": {
          "domains": {
            "items": {
              "$ref": "#/components/schemas/DomainInfo"
            },
            "type": "array",
            "title": "Domains"
          },
          "total": {
            "type": "integer",
            "title": "Total"
          }
        },
        "type": "object",
        "required": [
          "domains",
          "total"
        ],
        "title": "DomainListResponse",
        "description": "Response for domain list endpoint."
      },
      "EmailReportCreate": {
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 255,
            "minLength": 1,
            "title": "Name",
            "description": "Report name"
          },
          "frequency": {
            "$ref": "#/components/schemas/ReportFrequency",
            "description": "How often to send",
            "default": "weekly"
          },
          "day_of_week": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 6,
                "minimum": 0
              },
              {
                "type": "null"
              }
            ],
            "title": "Day Of Week",
            "description": "Day of week for weekly reports (0=Sunday)"
          },
          "day_of_month": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 28,
                "minimum": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Day Of Month",
            "description": "Day of month for monthly reports"
          },
          "hour_utc": {
            "type": "integer",
            "maximum": 23,
            "minimum": 0,
            "title": "Hour Utc",
            "description": "Hour to send (UTC)",
            "default": 9
          },
          "timezone": {
            "type": "string",
            "maxLength": 64,
            "title": "Timezone",
            "description": "Timezone for schedule display",
            "default": "UTC"
          },
          "report_type": {
            "$ref": "#/components/schemas/ReportType",
            "description": "Type of report",
            "default": "summary"
          },
          "include_overview": {
            "type": "boolean",
            "title": "Include Overview",
            "description": "Include overview section",
            "default": true
          },
          "include_sources": {
            "type": "boolean",
            "title": "Include Sources",
            "description": "Include sources section",
            "default": true
          },
          "include_pages": {
            "type": "boolean",
            "title": "Include Pages",
            "description": "Include pages section",
            "default": true
          },
          "include_geo": {
            "type": "boolean",
            "title": "Include Geo",
            "description": "Include geography section",
            "default": false
          },
          "include_devices": {
            "type": "boolean",
            "title": "Include Devices",
            "description": "Include devices section",
            "default": false
          },
          "include_conversions": {
            "type": "boolean",
            "title": "Include Conversions",
            "description": "Include conversions section",
            "default": true
          },
          "compare_previous": {
            "type": "boolean",
            "title": "Compare Previous",
            "description": "Compare with previous period",
            "default": true
          },
          "recipients": {
            "items": {
              "type": "string",
              "format": "email"
            },
            "type": "array",
            "maxItems": 20,
            "minItems": 1,
            "title": "Recipients",
            "description": "Email recipients"
          },
          "config": {
            "additionalProperties": true,
            "type": "object",
            "title": "Config",
            "description": "Custom configuration"
          }
        },
        "type": "object",
        "required": [
          "name",
          "recipients"
        ],
        "title": "EmailReportCreate",
        "description": "Request model for creating an email report."
      },
      "EmailReportInfo": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "account_id": {
            "type": "string",
            "title": "Account Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "frequency": {
            "$ref": "#/components/schemas/ReportFrequency"
          },
          "day_of_week": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Day Of Week"
          },
          "day_of_month": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Day Of Month"
          },
          "hour_utc": {
            "type": "integer",
            "title": "Hour Utc"
          },
          "timezone": {
            "type": "string",
            "title": "Timezone"
          },
          "report_type": {
            "$ref": "#/components/schemas/ReportType"
          },
          "include_overview": {
            "type": "boolean",
            "title": "Include Overview"
          },
          "include_sources": {
            "type": "boolean",
            "title": "Include Sources"
          },
          "include_pages": {
            "type": "boolean",
            "title": "Include Pages"
          },
          "include_geo": {
            "type": "boolean",
            "title": "Include Geo"
          },
          "include_devices": {
            "type": "boolean",
            "title": "Include Devices"
          },
          "include_conversions": {
            "type": "boolean",
            "title": "Include Conversions"
          },
          "compare_previous": {
            "type": "boolean",
            "title": "Compare Previous"
          },
          "recipients": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Recipients"
          },
          "config": {
            "additionalProperties": true,
            "type": "object",
            "title": "Config"
          },
          "is_active": {
            "type": "boolean",
            "title": "Is Active"
          },
          "last_sent_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Sent At"
          },
          "next_scheduled_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Scheduled At"
          },
          "send_count": {
            "type": "integer",
            "title": "Send Count"
          },
          "created_by": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "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"
          }
        },
        "type": "object",
        "required": [
          "id",
          "account_id",
          "name",
          "frequency",
          "day_of_week",
          "day_of_month",
          "hour_utc",
          "timezone",
          "report_type",
          "include_overview",
          "include_sources",
          "include_pages",
          "include_geo",
          "include_devices",
          "include_conversions",
          "compare_previous",
          "recipients",
          "config",
          "is_active",
          "last_sent_at",
          "next_scheduled_at",
          "send_count",
          "created_by",
          "created_at",
          "updated_at"
        ],
        "title": "EmailReportInfo",
        "description": "Email report information returned by API."
      },
      "EmailReportListResponse": {
        "properties": {
          "reports": {
            "items": {
              "$ref": "#/components/schemas/EmailReportInfo"
            },
            "type": "array",
            "title": "Reports"
          },
          "total": {
            "type": "integer",
            "title": "Total"
          }
        },
        "type": "object",
        "required": [
          "reports",
          "total"
        ],
        "title": "EmailReportListResponse",
        "description": "Response for email report list endpoint."
      },
      "EmailReportUpdate": {
        "properties": {
          "name": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 255,
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "frequency": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ReportFrequency"
              },
              {
                "type": "null"
              }
            ]
          },
          "day_of_week": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 6,
                "minimum": 0
              },
              {
                "type": "null"
              }
            ],
            "title": "Day Of Week"
          },
          "day_of_month": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 28,
                "minimum": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Day Of Month"
          },
          "hour_utc": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 23,
                "minimum": 0
              },
              {
                "type": "null"
              }
            ],
            "title": "Hour Utc"
          },
          "timezone": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 64
              },
              {
                "type": "null"
              }
            ],
            "title": "Timezone"
          },
          "report_type": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ReportType"
              },
              {
                "type": "null"
              }
            ]
          },
          "include_overview": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Include Overview"
          },
          "include_sources": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Include Sources"
          },
          "include_pages": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Include Pages"
          },
          "include_geo": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Include Geo"
          },
          "include_devices": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Include Devices"
          },
          "include_conversions": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Include Conversions"
          },
          "compare_previous": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Compare Previous"
          },
          "recipients": {
            "anyOf": [
              {
                "items": {
                  "type": "string",
                  "format": "email"
                },
                "type": "array",
                "maxItems": 20,
                "minItems": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Recipients"
          },
          "config": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Config"
          },
          "is_active": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Is Active"
          }
        },
        "type": "object",
        "title": "EmailReportUpdate",
        "description": "Request model for updating an email report."
      },
      "EmailVerificationStatusResponse": {
        "properties": {
          "verified": {
            "type": "boolean",
            "title": "Verified"
          },
          "email": {
            "type": "string",
            "title": "Email"
          }
        },
        "type": "object",
        "required": [
          "verified",
          "email"
        ],
        "title": "EmailVerificationStatusResponse",
        "description": "Email verification status."
      },
      "EmbedConfigCreate": {
        "properties": {
          "allowed_domains": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Allowed Domains",
            "description": "Domains allowed to embed (null = all)"
          },
          "show_header": {
            "type": "boolean",
            "title": "Show Header",
            "description": "Show dashboard header",
            "default": true
          },
          "show_filters": {
            "type": "boolean",
            "title": "Show Filters",
            "description": "Show date filters",
            "default": false
          },
          "theme": {
            "$ref": "#/components/schemas/EmbedTheme",
            "description": "Embed theme",
            "default": "auto"
          },
          "min_width": {
            "type": "integer",
            "maximum": 2000,
            "minimum": 200,
            "title": "Min Width",
            "description": "Minimum width in pixels",
            "default": 320
          },
          "min_height": {
            "type": "integer",
            "maximum": 2000,
            "minimum": 200,
            "title": "Min Height",
            "description": "Minimum height in pixels",
            "default": 400
          }
        },
        "type": "object",
        "title": "EmbedConfigCreate",
        "description": "Request to create/update embed configuration."
      },
      "EmbedConfigInfo": {
        "properties": {
          "dashboard_id": {
            "type": "integer",
            "title": "Dashboard Id"
          },
          "allowed_domains": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Allowed Domains"
          },
          "show_header": {
            "type": "boolean",
            "title": "Show Header"
          },
          "show_filters": {
            "type": "boolean",
            "title": "Show Filters"
          },
          "theme": {
            "$ref": "#/components/schemas/EmbedTheme"
          },
          "min_width": {
            "type": "integer",
            "title": "Min Width"
          },
          "min_height": {
            "type": "integer",
            "title": "Min Height"
          },
          "embed_code": {
            "type": "string",
            "title": "Embed Code"
          }
        },
        "type": "object",
        "required": [
          "dashboard_id",
          "allowed_domains",
          "show_header",
          "show_filters",
          "theme",
          "min_width",
          "min_height",
          "embed_code"
        ],
        "title": "EmbedConfigInfo",
        "description": "Embed configuration information."
      },
      "EmbedTheme": {
        "type": "string",
        "enum": [
          "light",
          "dark",
          "auto"
        ],
        "title": "EmbedTheme",
        "description": "Theme for embedded dashboards."
      },
      "ExportCreateRequest": {
        "properties": {
          "export_type": {
            "$ref": "#/components/schemas/ExportType",
            "description": "Type of data to export"
          },
          "format": {
            "$ref": "#/components/schemas/ExportFormat",
            "description": "Output format",
            "default": "csv"
          },
          "date_from": {
            "type": "string",
            "format": "date",
            "title": "Date From",
            "description": "Start date (inclusive)"
          },
          "date_to": {
            "type": "string",
            "format": "date",
            "title": "Date To",
            "description": "End date (inclusive)"
          },
          "filters": {
            "$ref": "#/components/schemas/ExportFilters",
            "description": "Optional filters"
          }
        },
        "type": "object",
        "required": [
          "export_type",
          "date_from",
          "date_to"
        ],
        "title": "ExportCreateRequest",
        "description": "Request to create a new export job."
      },
      "ExportCreateResponse": {
        "properties": {
          "job": {
            "$ref": "#/components/schemas/ExportJobInfo"
          },
          "estimate": {
            "$ref": "#/components/schemas/ExportEstimate"
          },
          "message": {
            "type": "string",
            "title": "Message"
          }
        },
        "type": "object",
        "required": [
          "job",
          "estimate",
          "message"
        ],
        "title": "ExportCreateResponse",
        "description": "Response when creating an export."
      },
      "ExportEstimate": {
        "properties": {
          "estimated_rows": {
            "type": "integer",
            "minimum": 0,
            "title": "Estimated Rows",
            "description": "Estimated number of rows"
          },
          "estimated_size_bytes": {
            "type": "integer",
            "minimum": 0,
            "title": "Estimated Size Bytes",
            "description": "Estimated file size in bytes"
          },
          "estimated_size_human": {
            "type": "string",
            "title": "Estimated Size Human",
            "description": "Human-readable file size"
          },
          "recommended_format": {
            "$ref": "#/components/schemas/ExportFormat",
            "description": "Recommended format for this size"
          },
          "will_use_background_job": {
            "type": "boolean",
            "title": "Will Use Background Job",
            "description": "Whether export will run in background"
          },
          "estimated_duration_seconds": {
            "type": "integer",
            "minimum": 0,
            "title": "Estimated Duration Seconds",
            "description": "Estimated processing time"
          }
        },
        "type": "object",
        "required": [
          "estimated_rows",
          "estimated_size_bytes",
          "estimated_size_human",
          "recommended_format",
          "will_use_background_job",
          "estimated_duration_seconds"
        ],
        "title": "ExportEstimate",
        "description": "Estimated export size."
      },
      "ExportFilters": {
        "properties": {
          "utm_source": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 255
              },
              {
                "type": "null"
              }
            ],
            "title": "Utm Source",
            "description": "Filter by UTM source"
          },
          "utm_medium": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 255
              },
              {
                "type": "null"
              }
            ],
            "title": "Utm Medium",
            "description": "Filter by UTM medium"
          },
          "utm_campaign": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 255
              },
              {
                "type": "null"
              }
            ],
            "title": "Utm Campaign",
            "description": "Filter by UTM campaign"
          },
          "utm_term": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 255
              },
              {
                "type": "null"
              }
            ],
            "title": "Utm Term",
            "description": "Filter by UTM term"
          },
          "utm_content": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 255
              },
              {
                "type": "null"
              }
            ],
            "title": "Utm Content",
            "description": "Filter by UTM content"
          },
          "country": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2,
                "minLength": 2
              },
              {
                "type": "null"
              }
            ],
            "title": "Country",
            "description": "Filter by country (ISO 2-letter)"
          },
          "device_type": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 50
              },
              {
                "type": "null"
              }
            ],
            "title": "Device Type",
            "description": "Filter by device type"
          },
          "browser": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 100
              },
              {
                "type": "null"
              }
            ],
            "title": "Browser",
            "description": "Filter by browser"
          },
          "os": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 100
              },
              {
                "type": "null"
              }
            ],
            "title": "Os",
            "description": "Filter by operating system"
          },
          "content_grouping": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 255
              },
              {
                "type": "null"
              }
            ],
            "title": "Content Grouping",
            "description": "Filter by content grouping"
          },
          "conversion_type": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 100
              },
              {
                "type": "null"
              }
            ],
            "title": "Conversion Type",
            "description": "Filter by conversion type"
          },
          "advanced_filters": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 1000
              },
              {
                "type": "null"
              }
            ],
            "title": "Advanced Filters",
            "description": "Advanced filters: field:op:value,field2:op2:value2"
          }
        },
        "type": "object",
        "title": "ExportFilters",
        "description": "Filters for export query."
      },
      "ExportFormat": {
        "type": "string",
        "enum": [
          "csv",
          "json"
        ],
        "title": "ExportFormat",
        "description": "Export file formats."
      },
      "ExportJobInfo": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "job_id": {
            "type": "string",
            "format": "uuid",
            "title": "Job Id"
          },
          "account_id": {
            "type": "string",
            "title": "Account Id"
          },
          "export_type": {
            "$ref": "#/components/schemas/ExportType"
          },
          "format": {
            "$ref": "#/components/schemas/ExportFormat"
          },
          "date_from": {
            "type": "string",
            "format": "date",
            "title": "Date From"
          },
          "date_to": {
            "type": "string",
            "format": "date",
            "title": "Date To"
          },
          "filters": {
            "additionalProperties": true,
            "type": "object",
            "title": "Filters"
          },
          "status": {
            "$ref": "#/components/schemas/ExportStatus"
          },
          "estimated_rows": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Estimated Rows"
          },
          "actual_rows": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Actual Rows"
          },
          "file_size_bytes": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "File Size Bytes"
          },
          "file_size_human": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "File Size Human"
          },
          "progress_percent": {
            "type": "integer",
            "title": "Progress Percent",
            "default": 0
          },
          "download_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Download Url",
            "description": "Download URL (only when completed)"
          },
          "download_expires_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Download Expires At"
          },
          "error_message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error Message"
          },
          "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"
          },
          "expires_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires At"
          },
          "created_by": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created By"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "job_id",
          "account_id",
          "export_type",
          "format",
          "date_from",
          "date_to",
          "filters",
          "status",
          "created_at"
        ],
        "title": "ExportJobInfo",
        "description": "Export job information returned by API."
      },
      "ExportListResponse": {
        "properties": {
          "exports": {
            "items": {
              "$ref": "#/components/schemas/ExportJobInfo"
            },
            "type": "array",
            "title": "Exports"
          },
          "total": {
            "type": "integer",
            "title": "Total"
          }
        },
        "type": "object",
        "required": [
          "exports",
          "total"
        ],
        "title": "ExportListResponse",
        "description": "Response for export list endpoint."
      },
      "ExportStatus": {
        "type": "string",
        "enum": [
          "pending",
          "estimating",
          "generating",
          "completed",
          "failed",
          "expired"
        ],
        "title": "ExportStatus",
        "description": "Export job status."
      },
      "ExportType": {
        "type": "string",
        "enum": [
          "pages",
          "sources",
          "mediums",
          "campaigns",
          "terms",
          "countries",
          "devices",
          "browsers",
          "os",
          "conversions",
          "microconversions",
          "time_series",
          "landing_pages"
        ],
        "title": "ExportType",
        "description": "Types of data that can be exported."
      },
      "FeedbackRequest": {
        "properties": {
          "feedback_type": {
            "type": "string",
            "pattern": "^(helpful|not_helpful|incorrect|already_known)$",
            "title": "Feedback Type"
          },
          "comment": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Comment"
          }
        },
        "type": "object",
        "required": [
          "feedback_type"
        ],
        "title": "FeedbackRequest",
        "description": "Request to submit feedback on an insight."
      },
      "FilterCondition": {
        "properties": {
          "field": {
            "type": "string",
            "title": "Field",
            "description": "Field to filter on",
            "examples": [
              "utm_source",
              "utm_medium",
              "country",
              "device_type",
              "path"
            ]
          },
          "operator": {
            "$ref": "#/components/schemas/FilterOperator",
            "description": "Filter operator",
            "default": "eq"
          },
          "value": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              }
            ],
            "title": "Value",
            "description": "Value(s) to match"
          }
        },
        "type": "object",
        "required": [
          "field",
          "value"
        ],
        "title": "FilterCondition",
        "description": "A single filter condition within a segment.\n\nExamples:\n    {\"field\": \"utm_medium\", \"operator\": \"eq\", \"value\": \"cpc\"}\n    {\"field\": \"country\", \"operator\": \"in\", \"value\": [\"ES\", \"FR\", \"DE\"]}\n    {\"field\": \"path\", \"operator\": \"starts_with\", \"value\": \"/blog\"}"
      },
      "FilterOperator": {
        "type": "string",
        "enum": [
          "eq",
          "neq",
          "contains",
          "not_contains",
          "starts_with",
          "ends_with",
          "in",
          "not_in",
          "regex",
          "not_regex"
        ],
        "title": "FilterOperator",
        "description": "Operators for segment filter conditions."
      },
      "FlagCount": {
        "properties": {
          "flag": {
            "type": "string",
            "title": "Flag",
            "description": "Flag name"
          },
          "count": {
            "type": "integer",
            "title": "Count",
            "description": "Number of occurrences"
          },
          "description": {
            "type": "string",
            "title": "Description",
            "description": "Human-readable description"
          }
        },
        "type": "object",
        "required": [
          "flag",
          "count",
          "description"
        ],
        "title": "FlagCount",
        "description": "Count of a specific detection flag."
      },
      "FunnelHealthResponse": {
        "properties": {
          "steps": {
            "items": {
              "$ref": "#/components/schemas/FunnelStepResponse"
            },
            "type": "array",
            "title": "Steps"
          },
          "overall_conversion_rate": {
            "type": "number",
            "title": "Overall Conversion Rate",
            "default": 0
          },
          "vs_previous": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Vs Previous"
          },
          "biggest_leak": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Biggest Leak"
          },
          "recommendation": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Recommendation"
          }
        },
        "type": "object",
        "title": "FunnelHealthResponse",
        "description": "Funnel health section."
      },
      "FunnelReport": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name",
            "description": "Funnel name"
          },
          "date_range": {
            "$ref": "#/components/schemas/DateRange"
          },
          "steps": {
            "items": {
              "$ref": "#/components/schemas/FunnelStep"
            },
            "type": "array",
            "title": "Steps"
          },
          "total_entries": {
            "type": "integer",
            "minimum": 0,
            "title": "Total Entries",
            "description": "Users entering the funnel",
            "default": 0
          },
          "total_completions": {
            "type": "integer",
            "minimum": 0,
            "title": "Total Completions",
            "description": "Users completing the funnel",
            "default": 0
          },
          "overall_conversion_rate": {
            "type": "number",
            "title": "Overall Conversion Rate",
            "description": "Overall funnel conversion rate.",
            "readOnly": true
          }
        },
        "type": "object",
        "required": [
          "name",
          "date_range",
          "overall_conversion_rate"
        ],
        "title": "FunnelReport",
        "description": "Complete funnel analysis."
      },
      "FunnelRequest": {
        "properties": {
          "steps": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "maxItems": 10,
            "minItems": 2,
            "title": "Steps",
            "description": "Ordered list of funnel steps"
          },
          "name": {
            "type": "string",
            "title": "Name",
            "description": "Funnel name",
            "default": "Custom Funnel"
          }
        },
        "type": "object",
        "required": [
          "steps"
        ],
        "title": "FunnelRequest",
        "description": "Request model for funnel analysis."
      },
      "FunnelResponse": {
        "properties": {
          "account_id": {
            "type": "string",
            "title": "Account Id"
          },
          "date_from": {
            "type": "string",
            "title": "Date From"
          },
          "date_to": {
            "type": "string",
            "title": "Date To"
          },
          "microconversion_types": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Microconversion Types"
          },
          "conversion_types": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Conversion Types"
          },
          "rows": {
            "items": {
              "$ref": "#/components/schemas/FunnelRow"
            },
            "type": "array",
            "title": "Rows"
          },
          "totals": {
            "$ref": "#/components/schemas/FunnelRow"
          }
        },
        "type": "object",
        "required": [
          "account_id",
          "date_from",
          "date_to",
          "microconversion_types",
          "conversion_types",
          "rows",
          "totals"
        ],
        "title": "FunnelResponse",
        "description": "Response for funnel report with UTM breakdown."
      },
      "FunnelRow": {
        "properties": {
          "utm_source": {
            "type": "string",
            "title": "Utm Source"
          },
          "utm_medium": {
            "type": "string",
            "title": "Utm Medium"
          },
          "utm_campaign": {
            "type": "string",
            "title": "Utm Campaign"
          },
          "utm_term": {
            "type": "string",
            "title": "Utm Term"
          },
          "entrances": {
            "type": "integer",
            "title": "Entrances"
          },
          "page_views": {
            "type": "integer",
            "title": "Page Views"
          },
          "microconversions": {
            "additionalProperties": {
              "type": "integer"
            },
            "type": "object",
            "title": "Microconversions"
          },
          "conversions": {
            "additionalProperties": {
              "type": "integer"
            },
            "type": "object",
            "title": "Conversions"
          },
          "revenue": {
            "additionalProperties": {
              "type": "number"
            },
            "type": "object",
            "title": "Revenue"
          }
        },
        "type": "object",
        "required": [
          "utm_source",
          "utm_medium",
          "utm_campaign",
          "utm_term",
          "entrances",
          "page_views",
          "microconversions",
          "conversions",
          "revenue"
        ],
        "title": "FunnelRow",
        "description": "Row in funnel UTM breakdown."
      },
      "FunnelStep": {
        "properties": {
          "step_number": {
            "type": "integer",
            "minimum": 1,
            "title": "Step Number",
            "description": "Step position in funnel"
          },
          "name": {
            "type": "string",
            "title": "Name",
            "description": "Step name/event type"
          },
          "count": {
            "type": "integer",
            "minimum": 0,
            "title": "Count",
            "description": "Number of users at this step",
            "default": 0
          },
          "conversion_rate": {
            "type": "number",
            "maximum": 100,
            "minimum": 0,
            "title": "Conversion Rate",
            "description": "Rate from previous step",
            "default": 0
          },
          "drop_off_rate": {
            "type": "number",
            "maximum": 100,
            "minimum": 0,
            "title": "Drop Off Rate",
            "description": "Drop-off from previous step",
            "default": 0
          }
        },
        "type": "object",
        "required": [
          "step_number",
          "name"
        ],
        "title": "FunnelStep",
        "description": "Single step in a funnel."
      },
      "FunnelStepResponse": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "count": {
            "type": "integer",
            "title": "Count"
          },
          "drop_off_pct": {
            "type": "number",
            "title": "Drop Off Pct",
            "default": 0
          },
          "vs_previous": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Vs Previous"
          }
        },
        "type": "object",
        "required": [
          "name",
          "count"
        ],
        "title": "FunnelStepResponse",
        "description": "Funnel step data."
      },
      "GenerateReportRequest": {
        "properties": {
          "report_type": {
            "type": "string",
            "pattern": "^(weekly|monthly)$",
            "title": "Report Type"
          },
          "period_end": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Period End",
            "description": "End of period (YYYY-MM-DD). Defaults to last completed period."
          }
        },
        "type": "object",
        "required": [
          "report_type"
        ],
        "title": "GenerateReportRequest",
        "description": "Request to generate a report."
      },
      "GeoConversion": {
        "properties": {
          "country": {
            "type": "string",
            "title": "Country"
          },
          "conversions": {
            "type": "integer",
            "title": "Conversions"
          },
          "revenue": {
            "type": "string",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Revenue"
          },
          "percentage": {
            "type": "number",
            "title": "Percentage"
          }
        },
        "type": "object",
        "required": [
          "country",
          "conversions",
          "revenue",
          "percentage"
        ],
        "title": "GeoConversion",
        "description": "Conversions by country."
      },
      "GeoMetrics": {
        "properties": {
          "country": {
            "type": "string",
            "title": "Country",
            "description": "ISO country code"
          },
          "country_name": {
            "type": "string",
            "title": "Country Name",
            "description": "Country name",
            "default": ""
          },
          "entrances": {
            "type": "integer",
            "minimum": 0,
            "title": "Entrances",
            "default": 0
          },
          "engaged_entrances": {
            "type": "integer",
            "minimum": 0,
            "title": "Engaged Entrances",
            "default": 0
          },
          "page_views": {
            "type": "integer",
            "minimum": 0,
            "title": "Page Views",
            "default": 0
          },
          "microconversions": {
            "type": "integer",
            "minimum": 0,
            "title": "Microconversions",
            "default": 0
          },
          "conversions": {
            "type": "integer",
            "minimum": 0,
            "title": "Conversions",
            "default": 0
          },
          "revenue": {
            "type": "string",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Revenue",
            "default": "0"
          },
          "entrances_prev": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ],
            "title": "Entrances Prev"
          },
          "engaged_entrances_prev": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ],
            "title": "Engaged Entrances Prev"
          },
          "page_views_prev": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ],
            "title": "Page Views Prev"
          },
          "microconversions_prev": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ],
            "title": "Microconversions Prev"
          },
          "conversions_prev": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ],
            "title": "Conversions Prev"
          },
          "revenue_prev": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Revenue Prev"
          },
          "bounce_rate": {
            "type": "number",
            "title": "Bounce Rate",
            "readOnly": true
          }
        },
        "type": "object",
        "required": [
          "country",
          "bounce_rate"
        ],
        "title": "GeoMetrics",
        "description": "Geographic breakdown of traffic."
      },
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
          }
        },
        "type": "object",
        "title": "HTTPValidationError"
      },
      "HealthCheck": {
        "properties": {
          "status": {
            "type": "string",
            "title": "Status",
            "description": "Component status: healthy, degraded, unhealthy"
          },
          "latency_ms": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Latency Ms",
            "description": "Check latency in milliseconds"
          },
          "message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Message",
            "description": "Status message"
          }
        },
        "type": "object",
        "required": [
          "status"
        ],
        "title": "HealthCheck",
        "description": "Individual health check result."
      },
      "HealthResponse": {
        "properties": {
          "status": {
            "type": "string",
            "title": "Status",
            "description": "Overall health status"
          },
          "version": {
            "type": "string",
            "title": "Version",
            "description": "API version"
          },
          "environment": {
            "type": "string",
            "title": "Environment",
            "description": "Environment name"
          },
          "checks": {
            "additionalProperties": {
              "$ref": "#/components/schemas/HealthCheck"
            },
            "type": "object",
            "title": "Checks",
            "description": "Individual component health checks"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp"
          }
        },
        "type": "object",
        "required": [
          "status",
          "version",
          "environment"
        ],
        "title": "HealthResponse",
        "description": "Health check response."
      },
      "IPAccessAttempt": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id",
            "description": "Log entry ID"
          },
          "account_id": {
            "type": "string",
            "title": "Account Id",
            "description": "Account ID"
          },
          "user_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "User Id",
            "description": "User ID if available"
          },
          "user_email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "User Email",
            "description": "User email if available"
          },
          "ip_address": {
            "type": "string",
            "title": "Ip Address",
            "description": "Client IP address"
          },
          "auth_type": {
            "type": "string",
            "title": "Auth Type",
            "description": "Authentication type: jwt or api_key"
          },
          "access_granted": {
            "type": "boolean",
            "title": "Access Granted",
            "description": "Whether access was granted"
          },
          "matched_pattern_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Matched Pattern Id",
            "description": "ID of the pattern that matched (null if denied)"
          },
          "matched_pattern": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Matched Pattern",
            "description": "The pattern that matched (null if denied)"
          },
          "user_agent": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "User Agent",
            "description": "Client user agent"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Timestamp of the attempt"
          }
        },
        "type": "object",
        "required": [
          "id",
          "account_id",
          "ip_address",
          "auth_type",
          "access_granted",
          "created_at"
        ],
        "title": "IPAccessAttempt",
        "description": "Model for IP access attempt audit log entry."
      },
      "IPAccessAttemptList": {
        "properties": {
          "attempts": {
            "items": {
              "$ref": "#/components/schemas/IPAccessAttempt"
            },
            "type": "array",
            "title": "Attempts",
            "description": "List of attempts"
          },
          "total": {
            "type": "integer",
            "title": "Total",
            "description": "Total number of attempts"
          },
          "denied_count": {
            "type": "integer",
            "title": "Denied Count",
            "description": "Number of denied attempts"
          }
        },
        "type": "object",
        "required": [
          "attempts",
          "total",
          "denied_count"
        ],
        "title": "IPAccessAttemptList",
        "description": "Response for listing IP access attempts."
      },
      "IPAllowlistSettingsResponse": {
        "properties": {
          "is_enabled": {
            "type": "boolean",
            "title": "Is Enabled",
            "description": "Whether IP allowlist is enforced for this account",
            "default": false
          },
          "enforce_for_api_tokens": {
            "type": "boolean",
            "title": "Enforce For Api Tokens",
            "description": "Enforce IP check for API token authentication",
            "default": true
          },
          "enforce_for_dashboard": {
            "type": "boolean",
            "title": "Enforce For Dashboard",
            "description": "Enforce IP check for dashboard/JWT authentication",
            "default": true
          },
          "account_id": {
            "type": "string",
            "title": "Account Id",
            "description": "Account ID"
          },
          "active_patterns_count": {
            "type": "integer",
            "title": "Active Patterns Count",
            "description": "Number of active IP patterns",
            "default": 0
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "title": "Updated At",
            "description": "Last update timestamp"
          }
        },
        "type": "object",
        "required": [
          "account_id",
          "created_at",
          "updated_at"
        ],
        "title": "IPAllowlistSettingsResponse",
        "description": "Response model for IP allowlist settings."
      },
      "IPAllowlistSettingsUpdate": {
        "properties": {
          "is_enabled": {
            "type": "boolean",
            "title": "Is Enabled",
            "description": "Whether IP allowlist is enforced for this account",
            "default": false
          },
          "enforce_for_api_tokens": {
            "type": "boolean",
            "title": "Enforce For Api Tokens",
            "description": "Enforce IP check for API token authentication",
            "default": true
          },
          "enforce_for_dashboard": {
            "type": "boolean",
            "title": "Enforce For Dashboard",
            "description": "Enforce IP check for dashboard/JWT authentication",
            "default": true
          }
        },
        "type": "object",
        "title": "IPAllowlistSettingsUpdate",
        "description": "Request model for updating IP allowlist settings."
      },
      "IPCheckRequest": {
        "properties": {
          "ip_address": {
            "type": "string",
            "title": "Ip Address",
            "description": "IP address to check"
          }
        },
        "type": "object",
        "required": [
          "ip_address"
        ],
        "title": "IPCheckRequest",
        "description": "Request to check if an IP would be allowed."
      },
      "IPCheckResponse": {
        "properties": {
          "ip_address": {
            "type": "string",
            "title": "Ip Address",
            "description": "IP address that was checked"
          },
          "is_allowed": {
            "type": "boolean",
            "title": "Is Allowed",
            "description": "Whether this IP would be allowed"
          },
          "matched_pattern": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/IPPatternResponse"
              },
              {
                "type": "null"
              }
            ],
            "description": "The pattern that matched (null if denied or allowlist disabled)"
          },
          "allowlist_enabled": {
            "type": "boolean",
            "title": "Allowlist Enabled",
            "description": "Whether IP allowlist is enabled for this account"
          }
        },
        "type": "object",
        "required": [
          "ip_address",
          "is_allowed",
          "allowlist_enabled"
        ],
        "title": "IPCheckResponse",
        "description": "Response for IP check."
      },
      "IPPatternBulkCreate": {
        "properties": {
          "patterns": {
            "items": {
              "$ref": "#/components/schemas/IPPatternCreate"
            },
            "type": "array",
            "maxItems": 100,
            "minItems": 1,
            "title": "Patterns",
            "description": "List of patterns to create (max 100)"
          }
        },
        "type": "object",
        "required": [
          "patterns"
        ],
        "title": "IPPatternBulkCreate",
        "description": "Request model for bulk creating IP patterns."
      },
      "IPPatternBulkDelete": {
        "properties": {
          "pattern_ids": {
            "items": {
              "type": "integer"
            },
            "type": "array",
            "maxItems": 100,
            "minItems": 1,
            "title": "Pattern Ids",
            "description": "List of pattern IDs to delete (max 100)"
          }
        },
        "type": "object",
        "required": [
          "pattern_ids"
        ],
        "title": "IPPatternBulkDelete",
        "description": "Request model for bulk deleting IP patterns."
      },
      "IPPatternBulkResult": {
        "properties": {
          "success_count": {
            "type": "integer",
            "title": "Success Count",
            "description": "Number of successful operations"
          },
          "error_count": {
            "type": "integer",
            "title": "Error Count",
            "description": "Number of failed operations"
          },
          "errors": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "type": "array",
            "title": "Errors",
            "description": "List of errors with pattern and error message"
          }
        },
        "type": "object",
        "required": [
          "success_count",
          "error_count"
        ],
        "title": "IPPatternBulkResult",
        "description": "Response for bulk operations."
      },
      "IPPatternCreate": {
        "properties": {
          "pattern": {
            "type": "string",
            "maxLength": 255,
            "minLength": 1,
            "title": "Pattern",
            "description": "IP address, CIDR range, or regex pattern"
          },
          "pattern_type": {
            "$ref": "#/components/schemas/PatternType",
            "description": "Type of pattern: ip, cidr, or regex",
            "default": "ip"
          },
          "label": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 100
              },
              {
                "type": "null"
              }
            ],
            "title": "Label",
            "description": "Human-readable label (e.g., 'Office Network')"
          },
          "description": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 500
              },
              {
                "type": "null"
              }
            ],
            "title": "Description",
            "description": "Optional description"
          },
          "is_active": {
            "type": "boolean",
            "title": "Is Active",
            "description": "Whether pattern is active",
            "default": true
          }
        },
        "type": "object",
        "required": [
          "pattern"
        ],
        "title": "IPPatternCreate",
        "description": "Request model for creating a new IP pattern."
      },
      "IPPatternExport": {
        "properties": {
          "text": {
            "type": "string",
            "title": "Text",
            "description": "Exported patterns, one per line"
          },
          "count": {
            "type": "integer",
            "title": "Count",
            "description": "Number of patterns exported"
          }
        },
        "type": "object",
        "required": [
          "text",
          "count"
        ],
        "title": "IPPatternExport",
        "description": "Response for exporting IP patterns."
      },
      "IPPatternImport": {
        "properties": {
          "text": {
            "type": "string",
            "maxLength": 50000,
            "minLength": 1,
            "title": "Text",
            "description": "Text containing IP patterns, one per line. Lines starting with # are comments."
          },
          "default_pattern_type": {
            "$ref": "#/components/schemas/PatternType",
            "description": "Default pattern type for entries without explicit type",
            "default": "ip"
          },
          "label_prefix": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 50
              },
              {
                "type": "null"
              }
            ],
            "title": "Label Prefix",
            "description": "Prefix to add to auto-generated labels"
          },
          "skip_duplicates": {
            "type": "boolean",
            "title": "Skip Duplicates",
            "description": "Skip patterns that already exist instead of erroring",
            "default": true
          }
        },
        "type": "object",
        "required": [
          "text"
        ],
        "title": "IPPatternImport",
        "description": "Request model for importing IP patterns from text."
      },
      "IPPatternList": {
        "properties": {
          "patterns": {
            "items": {
              "$ref": "#/components/schemas/IPPatternResponse"
            },
            "type": "array",
            "title": "Patterns",
            "description": "List of patterns"
          },
          "total": {
            "type": "integer",
            "title": "Total",
            "description": "Total number of patterns"
          },
          "active_count": {
            "type": "integer",
            "title": "Active Count",
            "description": "Number of active patterns"
          }
        },
        "type": "object",
        "required": [
          "patterns",
          "total",
          "active_count"
        ],
        "title": "IPPatternList",
        "description": "Response for listing IP patterns."
      },
      "IPPatternResponse": {
        "properties": {
          "pattern": {
            "type": "string",
            "maxLength": 255,
            "minLength": 1,
            "title": "Pattern",
            "description": "IP address, CIDR range, or regex pattern"
          },
          "pattern_type": {
            "$ref": "#/components/schemas/PatternType",
            "description": "Type of pattern: ip, cidr, or regex",
            "default": "ip"
          },
          "label": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 100
              },
              {
                "type": "null"
              }
            ],
            "title": "Label",
            "description": "Human-readable label (e.g., 'Office Network')"
          },
          "description": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 500
              },
              {
                "type": "null"
              }
            ],
            "title": "Description",
            "description": "Optional description"
          },
          "id": {
            "type": "integer",
            "title": "Id",
            "description": "Pattern ID"
          },
          "account_id": {
            "type": "string",
            "title": "Account Id",
            "description": "Account ID"
          },
          "is_active": {
            "type": "boolean",
            "title": "Is Active",
            "description": "Whether pattern is active"
          },
          "created_by": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created By",
            "description": "User ID who created this pattern"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "title": "Updated At",
            "description": "Last update timestamp"
          }
        },
        "type": "object",
        "required": [
          "pattern",
          "id",
          "account_id",
          "is_active",
          "created_at",
          "updated_at"
        ],
        "title": "IPPatternResponse",
        "description": "Response model for IP pattern."
      },
      "IPPatternUpdate": {
        "properties": {
          "pattern": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 255,
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Pattern",
            "description": "IP address, CIDR range, or regex pattern"
          },
          "pattern_type": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PatternType"
              },
              {
                "type": "null"
              }
            ],
            "description": "Type of pattern: ip, cidr, or regex"
          },
          "label": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 100
              },
              {
                "type": "null"
              }
            ],
            "title": "Label",
            "description": "Human-readable label"
          },
          "description": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 500
              },
              {
                "type": "null"
              }
            ],
            "title": "Description",
            "description": "Optional description"
          },
          "is_active": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Is Active",
            "description": "Whether pattern is active"
          }
        },
        "type": "object",
        "title": "IPPatternUpdate",
        "description": "Request model for updating an IP pattern."
      },
      "InsightGroupListResponse": {
        "properties": {
          "groups": {
            "items": {
              "$ref": "#/components/schemas/InsightGroupResponse"
            },
            "type": "array",
            "title": "Groups"
          },
          "total_groups": {
            "type": "integer",
            "title": "Total Groups"
          }
        },
        "type": "object",
        "required": [
          "groups",
          "total_groups"
        ],
        "title": "InsightGroupListResponse",
        "description": "Response containing grouped insights."
      },
      "InsightGroupResponse": {
        "properties": {
          "group_key": {
            "type": "string",
            "title": "Group Key"
          },
          "group_title": {
            "type": "string",
            "title": "Group Title"
          },
          "insight_type": {
            "type": "string",
            "title": "Insight Type"
          },
          "max_severity": {
            "type": "string",
            "title": "Max Severity"
          },
          "insight_count": {
            "type": "integer",
            "title": "Insight Count"
          },
          "unread_count": {
            "type": "integer",
            "title": "Unread Count",
            "default": 0
          },
          "total_economic_impact": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Total Economic Impact"
          },
          "latest_insight": {
            "$ref": "#/components/schemas/InsightResponse"
          },
          "related_entities": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Related Entities"
          },
          "first_detected_at": {
            "type": "string",
            "title": "First Detected At"
          },
          "last_detected_at": {
            "type": "string",
            "title": "Last Detected At"
          }
        },
        "type": "object",
        "required": [
          "group_key",
          "group_title",
          "insight_type",
          "max_severity",
          "insight_count",
          "latest_insight",
          "first_detected_at",
          "last_detected_at"
        ],
        "title": "InsightGroupResponse",
        "description": "Grouped insights response."
      },
      "InsightListResponse": {
        "properties": {
          "insights": {
            "items": {
              "$ref": "#/components/schemas/InsightResponse"
            },
            "type": "array",
            "title": "Insights"
          },
          "total": {
            "type": "integer",
            "title": "Total"
          },
          "page": {
            "type": "integer",
            "title": "Page",
            "default": 1
          },
          "page_size": {
            "type": "integer",
            "title": "Page Size",
            "default": 50
          },
          "has_next": {
            "type": "boolean",
            "title": "Has Next",
            "default": false
          },
          "has_prev": {
            "type": "boolean",
            "title": "Has Prev",
            "default": false
          }
        },
        "type": "object",
        "required": [
          "insights",
          "total"
        ],
        "title": "InsightListResponse",
        "description": "Paginated insight list response."
      },
      "InsightResponse": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "account_id": {
            "type": "string",
            "title": "Account Id"
          },
          "insight_type": {
            "type": "string",
            "title": "Insight Type"
          },
          "severity": {
            "type": "string",
            "title": "Severity"
          },
          "category": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Category"
          },
          "title": {
            "type": "string",
            "title": "Title"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "recommendation": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Recommendation"
          },
          "economic_impact": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Economic Impact"
          },
          "source_tool": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source Tool"
          },
          "source_rule": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source Rule"
          },
          "related_entity": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Related Entity"
          },
          "deep_link": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Deep Link"
          },
          "metadata": {
            "additionalProperties": true,
            "type": "object",
            "title": "Metadata"
          },
          "created_at": {
            "type": "string",
            "title": "Created At"
          },
          "expires_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires At"
          },
          "read_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Read At"
          },
          "dismissed_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Dismissed At"
          },
          "is_read": {
            "type": "boolean",
            "title": "Is Read",
            "default": false
          },
          "is_dismissed": {
            "type": "boolean",
            "title": "Is Dismissed",
            "default": false
          },
          "is_locked": {
            "type": "boolean",
            "title": "Is Locked",
            "default": false
          },
          "locked_tier": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Locked Tier"
          },
          "evidence": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Evidence"
          }
        },
        "type": "object",
        "required": [
          "id",
          "account_id",
          "insight_type",
          "severity",
          "title",
          "created_at"
        ],
        "title": "InsightResponse",
        "description": "Single insight response."
      },
      "InvitationCreate": {
        "properties": {
          "email": {
            "type": "string",
            "format": "email",
            "title": "Email"
          },
          "role": {
            "$ref": "#/components/schemas/OrgRole",
            "default": "member"
          },
          "site_ids": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Site Ids"
          }
        },
        "type": "object",
        "required": [
          "email"
        ],
        "title": "InvitationCreate",
        "description": "Request to invite a user to the organization."
      },
      "InvitationCreateResponse": {
        "properties": {
          "invitation_id": {
            "type": "integer",
            "title": "Invitation Id"
          },
          "invitation_link": {
            "type": "string",
            "title": "Invitation Link"
          },
          "expires_at": {
            "type": "string",
            "format": "date-time",
            "title": "Expires At"
          }
        },
        "type": "object",
        "required": [
          "invitation_id",
          "invitation_link",
          "expires_at"
        ],
        "title": "InvitationCreateResponse",
        "description": "Response after creating an invitation."
      },
      "InvitationInfo": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "org_id": {
            "type": "string",
            "title": "Org Id"
          },
          "email": {
            "type": "string",
            "title": "Email"
          },
          "role": {
            "$ref": "#/components/schemas/OrgRole"
          },
          "invited_by_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Invited By Name"
          },
          "is_active": {
            "type": "boolean",
            "title": "Is Active",
            "default": true
          },
          "expires_at": {
            "type": "string",
            "format": "date-time",
            "title": "Expires At"
          },
          "accepted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Accepted At"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "org_id",
          "email",
          "role",
          "expires_at",
          "created_at"
        ],
        "title": "InvitationInfo",
        "description": "Organization invitation information."
      },
      "InvitationListResponse": {
        "properties": {
          "invitations": {
            "items": {
              "$ref": "#/components/schemas/InvitationInfo"
            },
            "type": "array",
            "title": "Invitations"
          },
          "total": {
            "type": "integer",
            "title": "Total"
          }
        },
        "type": "object",
        "required": [
          "invitations",
          "total"
        ],
        "title": "InvitationListResponse",
        "description": "Response for invitation list endpoint."
      },
      "KeyMetricsResponse": {
        "properties": {
          "revenue": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/MetricValueResponse"
              },
              {
                "type": "null"
              }
            ]
          },
          "conversions": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/MetricValueResponse"
              },
              {
                "type": "null"
              }
            ]
          },
          "entrances": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/MetricValueResponse"
              },
              {
                "type": "null"
              }
            ]
          },
          "pageviews": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/MetricValueResponse"
              },
              {
                "type": "null"
              }
            ]
          },
          "conversion_rate": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/MetricValueResponse"
              },
              {
                "type": "null"
              }
            ]
          },
          "bounce_rate": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/MetricValueResponse"
              },
              {
                "type": "null"
              }
            ]
          },
          "aov": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/MetricValueResponse"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "title": "KeyMetricsResponse",
        "description": "Key metrics section."
      },
      "LandingPageMetrics": {
        "properties": {
          "landing_page": {
            "type": "string",
            "title": "Landing Page",
            "description": "Landing page path"
          },
          "content_grouping": {
            "type": "string",
            "title": "Content Grouping",
            "description": "Content group",
            "default": ""
          },
          "entrances": {
            "type": "integer",
            "minimum": 0,
            "title": "Entrances",
            "description": "Total entrances",
            "default": 0
          },
          "engaged_entrances": {
            "type": "integer",
            "minimum": 0,
            "title": "Engaged Entrances",
            "description": "Engaged entrances",
            "default": 0
          },
          "bounce_rate": {
            "type": "number",
            "maximum": 100,
            "minimum": 0,
            "title": "Bounce Rate",
            "description": "Bounce rate %",
            "default": 0
          },
          "microconversions": {
            "type": "integer",
            "minimum": 0,
            "title": "Microconversions",
            "description": "Microconversions",
            "default": 0
          },
          "conversions": {
            "type": "integer",
            "minimum": 0,
            "title": "Conversions",
            "description": "Conversions",
            "default": 0
          },
          "conversion_rate": {
            "type": "number",
            "maximum": 100,
            "minimum": 0,
            "title": "Conversion Rate",
            "description": "Conversion rate %",
            "default": 0
          },
          "revenue": {
            "type": "string",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Revenue",
            "description": "Total revenue",
            "default": "0"
          },
          "utm_source": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Utm Source",
            "description": "UTM source (only with include_utm=true)"
          },
          "utm_medium": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Utm Medium",
            "description": "UTM medium (only with include_utm=true)"
          },
          "utm_campaign": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Utm Campaign",
            "description": "UTM campaign (only with include_utm=true)"
          },
          "utm_term": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Utm Term",
            "description": "UTM term (only with include_utm=true)"
          },
          "utm_content": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Utm Content",
            "description": "UTM content (only with include_utm=true)"
          }
        },
        "type": "object",
        "required": [
          "landing_page"
        ],
        "title": "LandingPageMetrics",
        "description": "Metrics for a landing page."
      },
      "LoginRequest": {
        "properties": {
          "email": {
            "type": "string",
            "format": "email",
            "title": "Email"
          },
          "password": {
            "type": "string",
            "title": "Password"
          }
        },
        "type": "object",
        "required": [
          "email",
          "password"
        ],
        "title": "LoginRequest",
        "description": "Login request with email and password."
      },
      "LogoutAllResponse": {
        "properties": {
          "message": {
            "type": "string",
            "title": "Message"
          },
          "sessions_terminated": {
            "type": "integer",
            "title": "Sessions Terminated"
          }
        },
        "type": "object",
        "required": [
          "message",
          "sessions_terminated"
        ],
        "title": "LogoutAllResponse",
        "description": "Response after logging out all sessions."
      },
      "MatchType": {
        "type": "string",
        "enum": [
          "exact",
          "contains",
          "starts_with",
          "ends_with",
          "regex"
        ],
        "title": "MatchType",
        "description": "How to match the referrer pattern."
      },
      "MetricValueResponse": {
        "properties": {
          "current": {
            "type": "number",
            "title": "Current"
          },
          "previous": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Previous"
          },
          "change_pct": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Change Pct"
          },
          "change_abs": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Change Abs"
          },
          "trend": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Trend"
          },
          "unit": {
            "type": "string",
            "title": "Unit",
            "default": "number"
          }
        },
        "type": "object",
        "required": [
          "current"
        ],
        "title": "MetricValueResponse",
        "description": "A single metric with comparison."
      },
      "MicroconversionMetrics": {
        "properties": {
          "conversion_type": {
            "type": "string",
            "title": "Conversion Type",
            "description": "Microconversion type name"
          },
          "count": {
            "type": "integer",
            "minimum": 0,
            "title": "Count",
            "description": "Total occurrences",
            "default": 0
          },
          "by_source": {
            "items": {
              "$ref": "#/components/schemas/MicroconversionSourceBreakdown"
            },
            "type": "array",
            "title": "By Source",
            "description": "Attribution by source"
          }
        },
        "type": "object",
        "required": [
          "conversion_type"
        ],
        "title": "MicroconversionMetrics",
        "description": "Metrics for a microconversion type."
      },
      "MicroconversionSourceBreakdown": {
        "properties": {
          "utm_source": {
            "type": "string",
            "title": "Utm Source",
            "description": "UTM source",
            "default": ""
          },
          "utm_medium": {
            "type": "string",
            "title": "Utm Medium",
            "description": "UTM medium",
            "default": ""
          },
          "utm_campaign": {
            "type": "string",
            "title": "Utm Campaign",
            "description": "UTM campaign",
            "default": ""
          },
          "utm_term": {
            "type": "string",
            "title": "Utm Term",
            "description": "UTM term",
            "default": ""
          },
          "utm_content": {
            "type": "string",
            "title": "Utm Content",
            "description": "UTM content",
            "default": ""
          },
          "count": {
            "type": "integer",
            "minimum": 0,
            "title": "Count",
            "default": 0
          },
          "percentage": {
            "type": "number",
            "maximum": 100,
            "minimum": 0,
            "title": "Percentage",
            "default": 0
          }
        },
        "type": "object",
        "title": "MicroconversionSourceBreakdown",
        "description": "Source attribution breakdown for microconversions."
      },
      "MigrationConfig": {
        "properties": {
          "v1_email": {
            "type": "string",
            "maxLength": 255,
            "minLength": 5,
            "title": "V1 Email",
            "description": "Email de la cuenta v1"
          },
          "v1_password": {
            "type": "string",
            "minLength": 1,
            "title": "V1 Password",
            "description": "Password de la cuenta v1"
          },
          "v1_account_id": {
            "type": "string",
            "maxLength": 64,
            "minLength": 1,
            "pattern": "^[a-zA-Z0-9_-]+$",
            "title": "V1 Account Id",
            "description": "Account ID en v1"
          },
          "date_from": {
            "type": "string",
            "format": "date",
            "title": "Date From",
            "description": "Fecha inicio de migración"
          },
          "date_to": {
            "type": "string",
            "format": "date",
            "title": "Date To",
            "description": "Fecha fin de migración"
          },
          "migrate_conversions": {
            "type": "boolean",
            "title": "Migrate Conversions",
            "description": "Migrar conversiones",
            "default": true
          },
          "migrate_microconversions": {
            "type": "boolean",
            "title": "Migrate Microconversions",
            "description": "Migrar microconversiones",
            "default": true
          },
          "migrate_pageviews": {
            "type": "boolean",
            "title": "Migrate Pageviews",
            "description": "Migrar pageviews (disabled - v1 has no date data)",
            "default": false
          }
        },
        "type": "object",
        "required": [
          "v1_email",
          "v1_password",
          "v1_account_id",
          "date_from",
          "date_to"
        ],
        "title": "MigrationConfig",
        "description": "Configuration for starting a migration job."
      },
      "MigrationJobCreate": {
        "properties": {
          "job_id": {
            "type": "integer",
            "title": "Job Id",
            "description": "Created job ID"
          },
          "status": {
            "$ref": "#/components/schemas/MigrationStatus",
            "description": "Initial status"
          },
          "message": {
            "type": "string",
            "title": "Message",
            "description": "Status message"
          }
        },
        "type": "object",
        "required": [
          "job_id",
          "status",
          "message"
        ],
        "title": "MigrationJobCreate",
        "description": "Response after creating a migration job."
      },
      "MigrationJobInfo": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id",
            "description": "Job ID"
          },
          "account_id": {
            "type": "string",
            "title": "Account Id",
            "description": "Target account in v2"
          },
          "v1_account_id": {
            "type": "string",
            "title": "V1 Account Id",
            "description": "Source account in v1"
          },
          "date_from": {
            "type": "string",
            "format": "date",
            "title": "Date From",
            "description": "Migration date range start"
          },
          "date_to": {
            "type": "string",
            "format": "date",
            "title": "Date To",
            "description": "Migration date range end"
          },
          "migrate_conversions": {
            "type": "boolean",
            "title": "Migrate Conversions",
            "description": "Whether conversions are migrated"
          },
          "migrate_microconversions": {
            "type": "boolean",
            "title": "Migrate Microconversions",
            "description": "Whether microconversions are migrated"
          },
          "migrate_pageviews": {
            "type": "boolean",
            "title": "Migrate Pageviews",
            "description": "Whether pageviews are migrated"
          },
          "status": {
            "$ref": "#/components/schemas/MigrationStatus",
            "description": "Current status"
          },
          "progress": {
            "$ref": "#/components/schemas/MigrationProgress",
            "description": "Detailed progress"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "When job was created"
          },
          "started_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Started At",
            "description": "When migration started"
          },
          "completed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Completed At",
            "description": "When migration completed"
          }
        },
        "type": "object",
        "required": [
          "id",
          "account_id",
          "v1_account_id",
          "date_from",
          "date_to",
          "migrate_conversions",
          "migrate_microconversions",
          "migrate_pageviews",
          "status",
          "progress",
          "created_at"
        ],
        "title": "MigrationJobInfo",
        "description": "Full information about a migration job."
      },
      "MigrationJobListResponse": {
        "properties": {
          "jobs": {
            "items": {
              "$ref": "#/components/schemas/MigrationJobInfo"
            },
            "type": "array",
            "title": "Jobs",
            "description": "Migration jobs"
          },
          "total": {
            "type": "integer",
            "minimum": 0,
            "title": "Total",
            "description": "Total number of jobs",
            "default": 0
          }
        },
        "type": "object",
        "title": "MigrationJobListResponse",
        "description": "List of migration jobs."
      },
      "MigrationProgress": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id",
            "description": "Job ID"
          },
          "status": {
            "$ref": "#/components/schemas/MigrationStatus",
            "description": "Current status"
          },
          "conversions_progress": {
            "$ref": "#/components/schemas/ProgressDetail",
            "description": "Conversions migration progress"
          },
          "microconversions_progress": {
            "$ref": "#/components/schemas/ProgressDetail",
            "description": "Microconversions migration progress"
          },
          "pageviews_progress": {
            "$ref": "#/components/schemas/ProgressDetail",
            "description": "Pageviews migration progress"
          },
          "overall_percent": {
            "type": "number",
            "maximum": 100,
            "minimum": 0,
            "title": "Overall Percent",
            "description": "Overall completion percentage",
            "default": 0
          },
          "current_step": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Current Step",
            "description": "Current step description"
          },
          "error_message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error Message",
            "description": "Error message if failed"
          },
          "started_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Started At",
            "description": "When migration started"
          },
          "estimated_completion": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Estimated Completion",
            "description": "Estimated completion time"
          }
        },
        "type": "object",
        "required": [
          "id",
          "status"
        ],
        "title": "MigrationProgress",
        "description": "Current progress of a migration job."
      },
      "MigrationStatus": {
        "type": "string",
        "enum": [
          "pending",
          "running",
          "completed",
          "failed",
          "cancelled"
        ],
        "title": "MigrationStatus",
        "description": "Migration job status."
      },
      "OrgCreate": {
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 255,
            "minLength": 1,
            "title": "Name"
          }
        },
        "type": "object",
        "required": [
          "name"
        ],
        "title": "OrgCreate",
        "description": "Request model for creating an organization."
      },
      "OrgDeleteConfirmation": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name",
            "description": "Type the organization name to confirm deletion"
          }
        },
        "type": "object",
        "required": [
          "name"
        ],
        "title": "OrgDeleteConfirmation",
        "description": "Request model for deleting an organization (requires name confirmation)."
      },
      "OrgInfo": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "slug": {
            "type": "string",
            "title": "Slug"
          },
          "is_active": {
            "type": "boolean",
            "title": "Is Active",
            "default": true
          },
          "member_count": {
            "type": "integer",
            "title": "Member Count",
            "default": 0
          },
          "site_count": {
            "type": "integer",
            "title": "Site Count",
            "default": 0
          },
          "user_role": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/OrgRole"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "title": "Updated At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "slug",
          "created_at",
          "updated_at"
        ],
        "title": "OrgInfo",
        "description": "Organization information returned by API."
      },
      "OrgListResponse": {
        "properties": {
          "organizations": {
            "items": {
              "$ref": "#/components/schemas/OrgInfo"
            },
            "type": "array",
            "title": "Organizations"
          },
          "total": {
            "type": "integer",
            "title": "Total"
          },
          "can_create_org": {
            "type": "boolean",
            "title": "Can Create Org",
            "default": true
          }
        },
        "type": "object",
        "required": [
          "organizations",
          "total"
        ],
        "title": "OrgListResponse",
        "description": "Response for organization list endpoint."
      },
      "OrgMemberInfo": {
        "properties": {
          "user_id": {
            "type": "integer",
            "title": "User Id"
          },
          "email": {
            "type": "string",
            "title": "Email"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "role": {
            "$ref": "#/components/schemas/OrgRole"
          },
          "site_count": {
            "type": "integer",
            "title": "Site Count",
            "default": 0
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          }
        },
        "type": "object",
        "required": [
          "user_id",
          "email",
          "name",
          "role",
          "created_at"
        ],
        "title": "OrgMemberInfo",
        "description": "Organization member information."
      },
      "OrgMemberListResponse": {
        "properties": {
          "members": {
            "items": {
              "$ref": "#/components/schemas/OrgMemberInfo"
            },
            "type": "array",
            "title": "Members"
          },
          "total": {
            "type": "integer",
            "title": "Total"
          }
        },
        "type": "object",
        "required": [
          "members",
          "total"
        ],
        "title": "OrgMemberListResponse",
        "description": "Response for member list endpoint."
      },
      "OrgRole": {
        "type": "string",
        "enum": [
          "owner",
          "admin",
          "member"
        ],
        "title": "OrgRole",
        "description": "Organization member roles."
      },
      "OrgUpdate": {
        "properties": {
          "name": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 255,
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          }
        },
        "type": "object",
        "title": "OrgUpdate",
        "description": "Request model for updating an organization."
      },
      "PaginatedResponse_AggregatedConversionsByType_": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success",
            "default": true
          },
          "data": {
            "items": {
              "$ref": "#/components/schemas/AggregatedConversionsByType"
            },
            "type": "array",
            "title": "Data",
            "description": "List of items"
          },
          "total": {
            "type": "integer",
            "minimum": 0,
            "title": "Total",
            "description": "Total number of items"
          },
          "page": {
            "type": "integer",
            "minimum": 1,
            "title": "Page",
            "description": "Current page number"
          },
          "page_size": {
            "type": "integer",
            "maximum": 1000,
            "minimum": 1,
            "title": "Page Size",
            "description": "Items per page"
          },
          "has_next": {
            "type": "boolean",
            "title": "Has Next",
            "description": "Whether more pages exist"
          },
          "has_prev": {
            "type": "boolean",
            "title": "Has Prev",
            "description": "Whether previous pages exist"
          },
          "comparison": {
            "anyOf": [
              {},
              {
                "type": "null"
              }
            ],
            "title": "Comparison",
            "description": "Aggregated totals from previous period for comparison (when compare=true)"
          },
          "totals": {
            "anyOf": [
              {},
              {
                "type": "null"
              }
            ],
            "title": "Totals",
            "description": "Aggregated totals for current period (when include_totals=true)"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp"
          }
        },
        "type": "object",
        "required": [
          "data",
          "total",
          "page",
          "page_size",
          "has_next",
          "has_prev"
        ],
        "title": "PaginatedResponse[AggregatedConversionsByType]"
      },
      "PaginatedResponse_AggregatedGeoMetrics_": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success",
            "default": true
          },
          "data": {
            "items": {
              "$ref": "#/components/schemas/AggregatedGeoMetrics"
            },
            "type": "array",
            "title": "Data",
            "description": "List of items"
          },
          "total": {
            "type": "integer",
            "minimum": 0,
            "title": "Total",
            "description": "Total number of items"
          },
          "page": {
            "type": "integer",
            "minimum": 1,
            "title": "Page",
            "description": "Current page number"
          },
          "page_size": {
            "type": "integer",
            "maximum": 1000,
            "minimum": 1,
            "title": "Page Size",
            "description": "Items per page"
          },
          "has_next": {
            "type": "boolean",
            "title": "Has Next",
            "description": "Whether more pages exist"
          },
          "has_prev": {
            "type": "boolean",
            "title": "Has Prev",
            "description": "Whether previous pages exist"
          },
          "comparison": {
            "anyOf": [
              {},
              {
                "type": "null"
              }
            ],
            "title": "Comparison",
            "description": "Aggregated totals from previous period for comparison (when compare=true)"
          },
          "totals": {
            "anyOf": [
              {},
              {
                "type": "null"
              }
            ],
            "title": "Totals",
            "description": "Aggregated totals for current period (when include_totals=true)"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp"
          }
        },
        "type": "object",
        "required": [
          "data",
          "total",
          "page",
          "page_size",
          "has_next",
          "has_prev"
        ],
        "title": "PaginatedResponse[AggregatedGeoMetrics]"
      },
      "PaginatedResponse_AggregatedLandingPageMetrics_": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success",
            "default": true
          },
          "data": {
            "items": {
              "$ref": "#/components/schemas/AggregatedLandingPageMetrics"
            },
            "type": "array",
            "title": "Data",
            "description": "List of items"
          },
          "total": {
            "type": "integer",
            "minimum": 0,
            "title": "Total",
            "description": "Total number of items"
          },
          "page": {
            "type": "integer",
            "minimum": 1,
            "title": "Page",
            "description": "Current page number"
          },
          "page_size": {
            "type": "integer",
            "maximum": 1000,
            "minimum": 1,
            "title": "Page Size",
            "description": "Items per page"
          },
          "has_next": {
            "type": "boolean",
            "title": "Has Next",
            "description": "Whether more pages exist"
          },
          "has_prev": {
            "type": "boolean",
            "title": "Has Prev",
            "description": "Whether previous pages exist"
          },
          "comparison": {
            "anyOf": [
              {},
              {
                "type": "null"
              }
            ],
            "title": "Comparison",
            "description": "Aggregated totals from previous period for comparison (when compare=true)"
          },
          "totals": {
            "anyOf": [
              {},
              {
                "type": "null"
              }
            ],
            "title": "Totals",
            "description": "Aggregated totals for current period (when include_totals=true)"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp"
          }
        },
        "type": "object",
        "required": [
          "data",
          "total",
          "page",
          "page_size",
          "has_next",
          "has_prev"
        ],
        "title": "PaginatedResponse[AggregatedLandingPageMetrics]"
      },
      "PaginatedResponse_AggregatedPageMetrics_": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success",
            "default": true
          },
          "data": {
            "items": {
              "$ref": "#/components/schemas/AggregatedPageMetrics"
            },
            "type": "array",
            "title": "Data",
            "description": "List of items"
          },
          "total": {
            "type": "integer",
            "minimum": 0,
            "title": "Total",
            "description": "Total number of items"
          },
          "page": {
            "type": "integer",
            "minimum": 1,
            "title": "Page",
            "description": "Current page number"
          },
          "page_size": {
            "type": "integer",
            "maximum": 1000,
            "minimum": 1,
            "title": "Page Size",
            "description": "Items per page"
          },
          "has_next": {
            "type": "boolean",
            "title": "Has Next",
            "description": "Whether more pages exist"
          },
          "has_prev": {
            "type": "boolean",
            "title": "Has Prev",
            "description": "Whether previous pages exist"
          },
          "comparison": {
            "anyOf": [
              {},
              {
                "type": "null"
              }
            ],
            "title": "Comparison",
            "description": "Aggregated totals from previous period for comparison (when compare=true)"
          },
          "totals": {
            "anyOf": [
              {},
              {
                "type": "null"
              }
            ],
            "title": "Totals",
            "description": "Aggregated totals for current period (when include_totals=true)"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp"
          }
        },
        "type": "object",
        "required": [
          "data",
          "total",
          "page",
          "page_size",
          "has_next",
          "has_prev"
        ],
        "title": "PaginatedResponse[AggregatedPageMetrics]"
      },
      "PaginatedResponse_AggregatedSourceMetrics_": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success",
            "default": true
          },
          "data": {
            "items": {
              "$ref": "#/components/schemas/AggregatedSourceMetrics"
            },
            "type": "array",
            "title": "Data",
            "description": "List of items"
          },
          "total": {
            "type": "integer",
            "minimum": 0,
            "title": "Total",
            "description": "Total number of items"
          },
          "page": {
            "type": "integer",
            "minimum": 1,
            "title": "Page",
            "description": "Current page number"
          },
          "page_size": {
            "type": "integer",
            "maximum": 1000,
            "minimum": 1,
            "title": "Page Size",
            "description": "Items per page"
          },
          "has_next": {
            "type": "boolean",
            "title": "Has Next",
            "description": "Whether more pages exist"
          },
          "has_prev": {
            "type": "boolean",
            "title": "Has Prev",
            "description": "Whether previous pages exist"
          },
          "comparison": {
            "anyOf": [
              {},
              {
                "type": "null"
              }
            ],
            "title": "Comparison",
            "description": "Aggregated totals from previous period for comparison (when compare=true)"
          },
          "totals": {
            "anyOf": [
              {},
              {
                "type": "null"
              }
            ],
            "title": "Totals",
            "description": "Aggregated totals for current period (when include_totals=true)"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp"
          }
        },
        "type": "object",
        "required": [
          "data",
          "total",
          "page",
          "page_size",
          "has_next",
          "has_prev"
        ],
        "title": "PaginatedResponse[AggregatedSourceMetrics]"
      },
      "PaginatedResponse_ConversionsByType_": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success",
            "default": true
          },
          "data": {
            "items": {
              "$ref": "#/components/schemas/ConversionsByType"
            },
            "type": "array",
            "title": "Data",
            "description": "List of items"
          },
          "total": {
            "type": "integer",
            "minimum": 0,
            "title": "Total",
            "description": "Total number of items"
          },
          "page": {
            "type": "integer",
            "minimum": 1,
            "title": "Page",
            "description": "Current page number"
          },
          "page_size": {
            "type": "integer",
            "maximum": 1000,
            "minimum": 1,
            "title": "Page Size",
            "description": "Items per page"
          },
          "has_next": {
            "type": "boolean",
            "title": "Has Next",
            "description": "Whether more pages exist"
          },
          "has_prev": {
            "type": "boolean",
            "title": "Has Prev",
            "description": "Whether previous pages exist"
          },
          "comparison": {
            "anyOf": [
              {},
              {
                "type": "null"
              }
            ],
            "title": "Comparison",
            "description": "Aggregated totals from previous period for comparison (when compare=true)"
          },
          "totals": {
            "anyOf": [
              {},
              {
                "type": "null"
              }
            ],
            "title": "Totals",
            "description": "Aggregated totals for current period (when include_totals=true)"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp"
          }
        },
        "type": "object",
        "required": [
          "data",
          "total",
          "page",
          "page_size",
          "has_next",
          "has_prev"
        ],
        "title": "PaginatedResponse[ConversionsByType]"
      },
      "PaginatedResponse_GeoMetrics_": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success",
            "default": true
          },
          "data": {
            "items": {
              "$ref": "#/components/schemas/GeoMetrics"
            },
            "type": "array",
            "title": "Data",
            "description": "List of items"
          },
          "total": {
            "type": "integer",
            "minimum": 0,
            "title": "Total",
            "description": "Total number of items"
          },
          "page": {
            "type": "integer",
            "minimum": 1,
            "title": "Page",
            "description": "Current page number"
          },
          "page_size": {
            "type": "integer",
            "maximum": 1000,
            "minimum": 1,
            "title": "Page Size",
            "description": "Items per page"
          },
          "has_next": {
            "type": "boolean",
            "title": "Has Next",
            "description": "Whether more pages exist"
          },
          "has_prev": {
            "type": "boolean",
            "title": "Has Prev",
            "description": "Whether previous pages exist"
          },
          "comparison": {
            "anyOf": [
              {},
              {
                "type": "null"
              }
            ],
            "title": "Comparison",
            "description": "Aggregated totals from previous period for comparison (when compare=true)"
          },
          "totals": {
            "anyOf": [
              {},
              {
                "type": "null"
              }
            ],
            "title": "Totals",
            "description": "Aggregated totals for current period (when include_totals=true)"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp"
          }
        },
        "type": "object",
        "required": [
          "data",
          "total",
          "page",
          "page_size",
          "has_next",
          "has_prev"
        ],
        "title": "PaginatedResponse[GeoMetrics]"
      },
      "PaginatedResponse_LandingPageMetrics_": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success",
            "default": true
          },
          "data": {
            "items": {
              "$ref": "#/components/schemas/LandingPageMetrics"
            },
            "type": "array",
            "title": "Data",
            "description": "List of items"
          },
          "total": {
            "type": "integer",
            "minimum": 0,
            "title": "Total",
            "description": "Total number of items"
          },
          "page": {
            "type": "integer",
            "minimum": 1,
            "title": "Page",
            "description": "Current page number"
          },
          "page_size": {
            "type": "integer",
            "maximum": 1000,
            "minimum": 1,
            "title": "Page Size",
            "description": "Items per page"
          },
          "has_next": {
            "type": "boolean",
            "title": "Has Next",
            "description": "Whether more pages exist"
          },
          "has_prev": {
            "type": "boolean",
            "title": "Has Prev",
            "description": "Whether previous pages exist"
          },
          "comparison": {
            "anyOf": [
              {},
              {
                "type": "null"
              }
            ],
            "title": "Comparison",
            "description": "Aggregated totals from previous period for comparison (when compare=true)"
          },
          "totals": {
            "anyOf": [
              {},
              {
                "type": "null"
              }
            ],
            "title": "Totals",
            "description": "Aggregated totals for current period (when include_totals=true)"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp"
          }
        },
        "type": "object",
        "required": [
          "data",
          "total",
          "page",
          "page_size",
          "has_next",
          "has_prev"
        ],
        "title": "PaginatedResponse[LandingPageMetrics]"
      },
      "PaginatedResponse_MicroconversionMetrics_": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success",
            "default": true
          },
          "data": {
            "items": {
              "$ref": "#/components/schemas/MicroconversionMetrics"
            },
            "type": "array",
            "title": "Data",
            "description": "List of items"
          },
          "total": {
            "type": "integer",
            "minimum": 0,
            "title": "Total",
            "description": "Total number of items"
          },
          "page": {
            "type": "integer",
            "minimum": 1,
            "title": "Page",
            "description": "Current page number"
          },
          "page_size": {
            "type": "integer",
            "maximum": 1000,
            "minimum": 1,
            "title": "Page Size",
            "description": "Items per page"
          },
          "has_next": {
            "type": "boolean",
            "title": "Has Next",
            "description": "Whether more pages exist"
          },
          "has_prev": {
            "type": "boolean",
            "title": "Has Prev",
            "description": "Whether previous pages exist"
          },
          "comparison": {
            "anyOf": [
              {},
              {
                "type": "null"
              }
            ],
            "title": "Comparison",
            "description": "Aggregated totals from previous period for comparison (when compare=true)"
          },
          "totals": {
            "anyOf": [
              {},
              {
                "type": "null"
              }
            ],
            "title": "Totals",
            "description": "Aggregated totals for current period (when include_totals=true)"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp"
          }
        },
        "type": "object",
        "required": [
          "data",
          "total",
          "page",
          "page_size",
          "has_next",
          "has_prev"
        ],
        "title": "PaginatedResponse[MicroconversionMetrics]"
      },
      "PaginatedResponse_dict_": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success",
            "default": true
          },
          "data": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "type": "array",
            "title": "Data",
            "description": "List of items"
          },
          "total": {
            "type": "integer",
            "minimum": 0,
            "title": "Total",
            "description": "Total number of items"
          },
          "page": {
            "type": "integer",
            "minimum": 1,
            "title": "Page",
            "description": "Current page number"
          },
          "page_size": {
            "type": "integer",
            "maximum": 1000,
            "minimum": 1,
            "title": "Page Size",
            "description": "Items per page"
          },
          "has_next": {
            "type": "boolean",
            "title": "Has Next",
            "description": "Whether more pages exist"
          },
          "has_prev": {
            "type": "boolean",
            "title": "Has Prev",
            "description": "Whether previous pages exist"
          },
          "comparison": {
            "anyOf": [
              {},
              {
                "type": "null"
              }
            ],
            "title": "Comparison",
            "description": "Aggregated totals from previous period for comparison (when compare=true)"
          },
          "totals": {
            "anyOf": [
              {},
              {
                "type": "null"
              }
            ],
            "title": "Totals",
            "description": "Aggregated totals for current period (when include_totals=true)"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp"
          }
        },
        "type": "object",
        "required": [
          "data",
          "total",
          "page",
          "page_size",
          "has_next",
          "has_prev"
        ],
        "title": "PaginatedResponse[dict]"
      },
      "PassthroughReferrerCreate": {
        "properties": {
          "domain": {
            "type": "string",
            "maxLength": 255,
            "minLength": 1,
            "title": "Domain",
            "description": "Domain name (e.g., 'booking.mirai.com')"
          },
          "utm_source": {
            "type": "string",
            "maxLength": 255,
            "minLength": 1,
            "title": "Utm Source",
            "description": "Fallback UTM source when no session exists"
          },
          "utm_medium": {
            "type": "string",
            "maxLength": 100,
            "title": "Utm Medium",
            "description": "Fallback UTM medium (default: passthrough)",
            "default": "passthrough"
          },
          "utm_campaign": {
            "type": "string",
            "maxLength": 255,
            "title": "Utm Campaign",
            "description": "Fallback UTM campaign",
            "default": ""
          },
          "utm_term": {
            "type": "string",
            "maxLength": 255,
            "title": "Utm Term",
            "description": "Fallback UTM term",
            "default": ""
          },
          "service_name": {
            "type": "string",
            "maxLength": 100,
            "title": "Service Name",
            "description": "Descriptive name of the service (e.g., 'Mirai Booking Engine')",
            "default": ""
          },
          "is_active": {
            "type": "boolean",
            "title": "Is Active",
            "description": "Whether this referrer is active",
            "default": true
          }
        },
        "type": "object",
        "required": [
          "domain",
          "utm_source"
        ],
        "title": "PassthroughReferrerCreate",
        "description": "Request model for creating a new passthrough referrer."
      },
      "PassthroughReferrerList": {
        "properties": {
          "referrers": {
            "items": {
              "$ref": "#/components/schemas/PassthroughReferrerResponse"
            },
            "type": "array",
            "title": "Referrers",
            "description": "List of referrers"
          },
          "total": {
            "type": "integer",
            "title": "Total",
            "description": "Total number of referrers"
          },
          "active_count": {
            "type": "integer",
            "title": "Active Count",
            "description": "Number of active referrers"
          }
        },
        "type": "object",
        "required": [
          "referrers",
          "total",
          "active_count"
        ],
        "title": "PassthroughReferrerList",
        "description": "Response for listing passthrough referrers."
      },
      "PassthroughReferrerResponse": {
        "properties": {
          "domain": {
            "type": "string",
            "maxLength": 255,
            "minLength": 1,
            "title": "Domain",
            "description": "Domain name (e.g., 'booking.mirai.com')"
          },
          "utm_source": {
            "type": "string",
            "maxLength": 255,
            "minLength": 1,
            "title": "Utm Source",
            "description": "Fallback UTM source when no session exists"
          },
          "utm_medium": {
            "type": "string",
            "maxLength": 100,
            "title": "Utm Medium",
            "description": "Fallback UTM medium (default: passthrough)",
            "default": "passthrough"
          },
          "utm_campaign": {
            "type": "string",
            "maxLength": 255,
            "title": "Utm Campaign",
            "description": "Fallback UTM campaign",
            "default": ""
          },
          "utm_term": {
            "type": "string",
            "maxLength": 255,
            "title": "Utm Term",
            "description": "Fallback UTM term",
            "default": ""
          },
          "service_name": {
            "type": "string",
            "maxLength": 100,
            "title": "Service Name",
            "description": "Descriptive name of the service (e.g., 'Mirai Booking Engine')",
            "default": ""
          },
          "id": {
            "type": "integer",
            "title": "Id",
            "description": "Referrer ID"
          },
          "account_id": {
            "type": "string",
            "title": "Account Id",
            "description": "Account ID"
          },
          "is_active": {
            "type": "boolean",
            "title": "Is Active",
            "description": "Whether this referrer is active"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "title": "Updated At",
            "description": "Last update timestamp"
          }
        },
        "type": "object",
        "required": [
          "domain",
          "utm_source",
          "id",
          "account_id",
          "is_active",
          "created_at",
          "updated_at"
        ],
        "title": "PassthroughReferrerResponse",
        "description": "Response model for passthrough referrer."
      },
      "PassthroughReferrerUpdate": {
        "properties": {
          "domain": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 255,
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Domain",
            "description": "Domain name"
          },
          "utm_source": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 255,
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Utm Source",
            "description": "Fallback UTM source"
          },
          "utm_medium": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 100
              },
              {
                "type": "null"
              }
            ],
            "title": "Utm Medium",
            "description": "Fallback UTM medium"
          },
          "utm_campaign": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 255
              },
              {
                "type": "null"
              }
            ],
            "title": "Utm Campaign",
            "description": "Fallback UTM campaign"
          },
          "utm_term": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 255
              },
              {
                "type": "null"
              }
            ],
            "title": "Utm Term",
            "description": "Fallback UTM term"
          },
          "service_name": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 100
              },
              {
                "type": "null"
              }
            ],
            "title": "Service Name",
            "description": "Descriptive name of the service"
          },
          "is_active": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Is Active",
            "description": "Whether this referrer is active"
          }
        },
        "type": "object",
        "title": "PassthroughReferrerUpdate",
        "description": "Request model for updating a passthrough referrer."
      },
      "PasswordChange": {
        "properties": {
          "current_password": {
            "type": "string",
            "title": "Current Password"
          },
          "new_password": {
            "type": "string",
            "maxLength": 128,
            "minLength": 12,
            "title": "New Password"
          }
        },
        "type": "object",
        "required": [
          "current_password",
          "new_password"
        ],
        "title": "PasswordChange",
        "description": "Request to change password."
      },
      "PasswordReset": {
        "properties": {
          "token": {
            "type": "string",
            "title": "Token"
          },
          "new_password": {
            "type": "string",
            "maxLength": 128,
            "minLength": 12,
            "title": "New Password"
          }
        },
        "type": "object",
        "required": [
          "token",
          "new_password"
        ],
        "title": "PasswordReset",
        "description": "Request to reset password with token."
      },
      "PasswordResetRequest": {
        "properties": {
          "email": {
            "type": "string",
            "format": "email",
            "title": "Email"
          }
        },
        "type": "object",
        "required": [
          "email"
        ],
        "title": "PasswordResetRequest",
        "description": "Request to initiate password reset."
      },
      "PatternType": {
        "type": "string",
        "enum": [
          "ip",
          "cidr",
          "regex"
        ],
        "title": "PatternType",
        "description": "Type of IP pattern for allowlist matching."
      },
      "PixelCode": {
        "properties": {
          "account_id": {
            "type": "string",
            "title": "Account Id"
          },
          "script_tag": {
            "type": "string",
            "title": "Script Tag",
            "description": "HTML script tag to embed"
          },
          "tracker_url": {
            "type": "string",
            "title": "Tracker Url",
            "description": "Direct URL to tracker.js"
          },
          "instructions": {
            "type": "string",
            "title": "Instructions",
            "description": "Installation instructions"
          },
          "site_id": {
            "type": "string",
            "title": "Site Id",
            "description": "Alias for account_id for external API consumers.",
            "readOnly": true
          }
        },
        "type": "object",
        "required": [
          "account_id",
          "script_tag",
          "tracker_url",
          "instructions",
          "site_id"
        ],
        "title": "PixelCode",
        "description": "Pixel installation code."
      },
      "PixelStatus": {
        "properties": {
          "account_id": {
            "type": "string",
            "title": "Account Id"
          },
          "installed": {
            "type": "boolean",
            "title": "Installed",
            "description": "Whether the pixel has received any hits"
          },
          "first_hit_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "First Hit At",
            "description": "Timestamp of the first hit received"
          },
          "last_hit_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Hit At",
            "description": "Timestamp of the most recent hit"
          },
          "total_hits": {
            "type": "integer",
            "title": "Total Hits",
            "description": "Total hits in the last 14 days",
            "default": 0
          },
          "site_id": {
            "type": "string",
            "title": "Site Id",
            "description": "Alias for account_id for external API consumers.",
            "readOnly": true
          }
        },
        "type": "object",
        "required": [
          "account_id",
          "installed",
          "site_id"
        ],
        "title": "PixelStatus",
        "description": "Pixel installation status information."
      },
      "PixelType": {
        "type": "string",
        "enum": [
          "pageview",
          "conversion",
          "microconversion"
        ],
        "title": "PixelType",
        "description": "Type of tracking pixel."
      },
      "PixelValue": {
        "properties": {
          "type": {
            "$ref": "#/components/schemas/ValueType",
            "description": "Type of value (literal, gtm, js)",
            "default": "literal"
          },
          "value": {
            "type": "string",
            "title": "Value",
            "description": "The actual value or variable name"
          }
        },
        "type": "object",
        "required": [
          "value"
        ],
        "title": "PixelValue",
        "description": "A value in pixel configuration with type information.\n\nExamples:\n    {\"type\": \"literal\", \"value\": \"EUR\"}\n    {\"type\": \"gtm\", \"value\": \"{{order_total}}\"}\n    {\"type\": \"js\", \"value\": \"window.productBrand\"}"
      },
      "ProfileUpdate": {
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 255,
            "minLength": 1,
            "title": "Name"
          }
        },
        "type": "object",
        "required": [
          "name"
        ],
        "title": "ProfileUpdate",
        "description": "Request model for updating own profile."
      },
      "ProgressDetail": {
        "properties": {
          "total": {
            "type": "integer",
            "minimum": 0,
            "title": "Total",
            "description": "Total records to migrate",
            "default": 0
          },
          "migrated": {
            "type": "integer",
            "minimum": 0,
            "title": "Migrated",
            "description": "Records migrated so far",
            "default": 0
          },
          "percent": {
            "type": "number",
            "maximum": 100,
            "minimum": 0,
            "title": "Percent",
            "description": "Completion percentage",
            "default": 0
          }
        },
        "type": "object",
        "title": "ProgressDetail",
        "description": "Progress detail for a specific data type."
      },
      "QueryComparisonMeta": {
        "properties": {
          "date_from": {
            "type": "string",
            "format": "date",
            "title": "Date From",
            "description": "Comparison period start date"
          },
          "date_to": {
            "type": "string",
            "format": "date",
            "title": "Date To",
            "description": "Comparison period end date"
          },
          "mode": {
            "type": "string",
            "title": "Mode",
            "description": "Comparison mode used: 'previous' or 'yoy'"
          },
          "total_rows": {
            "type": "integer",
            "minimum": 0,
            "title": "Total Rows",
            "description": "Total rows in comparison",
            "default": 0
          }
        },
        "type": "object",
        "required": [
          "date_from",
          "date_to",
          "mode"
        ],
        "title": "QueryComparisonMeta",
        "description": "Metadata for comparison query."
      },
      "QueryFilters": {
        "properties": {
          "utm_source": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Utm Source"
          },
          "utm_source_not": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Utm Source Not"
          },
          "utm_medium": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Utm Medium"
          },
          "utm_medium_not": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Utm Medium Not"
          },
          "utm_campaign": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Utm Campaign"
          },
          "utm_campaign_not": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Utm Campaign Not"
          },
          "utm_term": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Utm Term"
          },
          "utm_term_not": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Utm Term Not"
          },
          "utm_content": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Utm Content"
          },
          "utm_content_not": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Utm Content Not"
          },
          "country": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Country"
          },
          "country_not": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Country Not"
          },
          "device_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Device Type"
          },
          "device_type_not": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Device Type Not"
          },
          "browser": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Browser"
          },
          "browser_not": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Browser Not"
          },
          "os": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Os"
          },
          "os_not": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Os Not"
          },
          "channel_group": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Channel Group"
          },
          "channel_group_not": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Channel Group Not"
          },
          "hour": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "items": {
                  "type": "integer"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Hour"
          },
          "day_of_week": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "items": {
                  "type": "integer"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Day Of Week"
          }
        },
        "type": "object",
        "title": "QueryFilters",
        "description": "Flexible filters for query endpoint.\n\nSupports both positive filters (field: value) and negative filters (field_not: value).\nValues can be single strings or arrays for IN/NOT IN operations."
      },
      "QueryGranularity": {
        "type": "string",
        "enum": [
          "total",
          "daily",
          "hourly"
        ],
        "title": "QueryGranularity",
        "description": "Granularity for query results."
      },
      "QueryOrderBy": {
        "properties": {
          "field": {
            "type": "string",
            "title": "Field",
            "description": "Field to order by"
          },
          "direction": {
            "type": "string",
            "pattern": "^(asc|desc)$",
            "title": "Direction",
            "description": "Sort direction",
            "default": "desc"
          }
        },
        "type": "object",
        "required": [
          "field"
        ],
        "title": "QueryOrderBy",
        "description": "Order by specification."
      },
      "QueryRequest": {
        "properties": {
          "date_from": {
            "type": "string",
            "format": "date",
            "title": "Date From",
            "description": "Start date (inclusive)"
          },
          "date_to": {
            "type": "string",
            "format": "date",
            "title": "Date To",
            "description": "End date (inclusive)"
          },
          "granularity": {
            "$ref": "#/components/schemas/QueryGranularity",
            "description": "total: aggregate only by dimensions. daily: auto-adds 'date' dimension. hourly: auto-adds 'date' + 'hour' dimensions (uses hourly table).",
            "default": "total"
          },
          "dimensions": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "maxItems": 10,
            "title": "Dimensions",
            "description": "Dimensions to group by (max 10). Valid: date, hour, day_of_week, country, utm_source, utm_medium, utm_campaign, utm_term, utm_content, device_type, browser, os, channel_group"
          },
          "metrics": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Metrics",
            "description": "Metrics to return. Valid: entrances, engaged_entrances, page_views, microconversions, conversions, revenue"
          },
          "filters": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/QueryFilters"
              },
              {
                "type": "null"
              }
            ],
            "description": "Filter conditions"
          },
          "order_by": {
            "items": {
              "$ref": "#/components/schemas/QueryOrderBy"
            },
            "type": "array",
            "title": "Order By",
            "description": "Order by specifications"
          },
          "limit": {
            "type": "integer",
            "maximum": 10000,
            "minimum": 1,
            "title": "Limit",
            "description": "Max rows to return",
            "default": 100
          },
          "offset": {
            "type": "integer",
            "minimum": 0,
            "title": "Offset",
            "description": "Rows to skip",
            "default": 0
          },
          "compare": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Compare",
            "description": "Comparison mode: 'previous' (same duration before) or 'yoy' (year-over-year). Returns comparison_data with the same query executed against the comparison period."
          }
        },
        "type": "object",
        "required": [
          "date_from",
          "date_to"
        ],
        "title": "QueryRequest",
        "description": "Request body for POST /stats/query endpoint.\n\nAllows flexible multi-dimensional queries on report_global tables."
      },
      "QueryResponse": {
        "properties": {
          "data": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "type": "array",
            "title": "Data",
            "description": "Array of result rows with dimension and metric values"
          },
          "meta": {
            "$ref": "#/components/schemas/QueryResponseMeta"
          },
          "comparison_data": {
            "anyOf": [
              {
                "items": {
                  "additionalProperties": true,
                  "type": "object"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Comparison Data",
            "description": "Comparison period data (same structure as data). Only present when compare parameter is set."
          },
          "comparison_meta": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/QueryComparisonMeta"
              },
              {
                "type": "null"
              }
            ],
            "description": "Metadata about the comparison period. Only present when compare is set."
          }
        },
        "type": "object",
        "required": [
          "data",
          "meta"
        ],
        "title": "QueryResponse",
        "description": "Response for POST /stats/query endpoint.\n\nReturns data as array of objects with requested dimensions and metrics.\nOptionally includes comparison_data when compare mode is requested."
      },
      "QueryResponseMeta": {
        "properties": {
          "total_rows": {
            "type": "integer",
            "minimum": 0,
            "title": "Total Rows",
            "description": "Total rows matching query (before limit)"
          },
          "has_more": {
            "type": "boolean",
            "title": "Has More",
            "description": "Whether there are more rows beyond limit"
          },
          "granularity": {
            "$ref": "#/components/schemas/QueryGranularity"
          },
          "dimensions": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Dimensions"
          },
          "metrics": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Metrics"
          }
        },
        "type": "object",
        "required": [
          "total_rows",
          "has_more",
          "granularity",
          "dimensions",
          "metrics"
        ],
        "title": "QueryResponseMeta",
        "description": "Metadata for query response."
      },
      "QueryResult": {
        "properties": {
          "status": {
            "$ref": "#/components/schemas/BatchQueryStatus",
            "description": "Query execution status"
          },
          "data": {
            "anyOf": [
              {},
              {
                "type": "null"
              }
            ],
            "title": "Data",
            "description": "Query response data"
          },
          "error": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error",
            "description": "Error details if query failed"
          },
          "timing_ms": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Timing Ms",
            "description": "Execution time in milliseconds"
          }
        },
        "type": "object",
        "required": [
          "status"
        ],
        "title": "QueryResult",
        "description": "Result of a single query in the batch."
      },
      "ReferrerMappingCreate": {
        "properties": {
          "referrer_pattern": {
            "type": "string",
            "maxLength": 255,
            "minLength": 1,
            "title": "Referrer Pattern",
            "description": "Pattern to match against referrer domain (e.g., 'partner-site.com')"
          },
          "match_type": {
            "$ref": "#/components/schemas/MatchType",
            "description": "How to match: exact, contains, starts_with, ends_with, regex",
            "default": "exact"
          },
          "utm_source": {
            "type": "string",
            "maxLength": 255,
            "minLength": 1,
            "title": "Utm Source",
            "description": "UTM source to apply (required)"
          },
          "utm_medium": {
            "type": "string",
            "maxLength": 100,
            "title": "Utm Medium",
            "description": "UTM medium to apply",
            "default": "referral"
          },
          "utm_campaign": {
            "type": "string",
            "maxLength": 255,
            "title": "Utm Campaign",
            "description": "UTM campaign to apply",
            "default": ""
          },
          "utm_term": {
            "type": "string",
            "maxLength": 255,
            "title": "Utm Term",
            "description": "UTM term to apply",
            "default": ""
          },
          "utm_content": {
            "type": "string",
            "maxLength": 255,
            "title": "Utm Content",
            "description": "UTM content to apply",
            "default": ""
          },
          "label": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 100
              },
              {
                "type": "null"
              }
            ],
            "title": "Label",
            "description": "Human-readable label (e.g., 'Partner Site Traffic')"
          },
          "description": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 500
              },
              {
                "type": "null"
              }
            ],
            "title": "Description",
            "description": "Optional description"
          },
          "priority": {
            "type": "integer",
            "maximum": 1000,
            "minimum": 0,
            "title": "Priority",
            "description": "Higher priority mappings are checked first (0-1000)",
            "default": 0
          },
          "is_active": {
            "type": "boolean",
            "title": "Is Active",
            "description": "Whether this mapping is active",
            "default": true
          }
        },
        "type": "object",
        "required": [
          "referrer_pattern",
          "utm_source"
        ],
        "title": "ReferrerMappingCreate",
        "description": "Request model for creating a referrer mapping."
      },
      "ReferrerMappingList": {
        "properties": {
          "mappings": {
            "items": {
              "$ref": "#/components/schemas/ReferrerMappingResponse"
            },
            "type": "array",
            "title": "Mappings",
            "description": "List of mappings"
          },
          "total": {
            "type": "integer",
            "title": "Total",
            "description": "Total number of mappings"
          },
          "active_count": {
            "type": "integer",
            "title": "Active Count",
            "description": "Number of active mappings"
          }
        },
        "type": "object",
        "required": [
          "mappings",
          "total",
          "active_count"
        ],
        "title": "ReferrerMappingList",
        "description": "Response for listing referrer mappings."
      },
      "ReferrerMappingResponse": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id",
            "description": "Mapping ID"
          },
          "account_id": {
            "type": "string",
            "title": "Account Id",
            "description": "Account ID"
          },
          "referrer_pattern": {
            "type": "string",
            "title": "Referrer Pattern",
            "description": "Pattern to match"
          },
          "match_type": {
            "$ref": "#/components/schemas/MatchType",
            "description": "Match type"
          },
          "utm_source": {
            "type": "string",
            "title": "Utm Source",
            "description": "UTM source"
          },
          "utm_medium": {
            "type": "string",
            "title": "Utm Medium",
            "description": "UTM medium"
          },
          "utm_campaign": {
            "type": "string",
            "title": "Utm Campaign",
            "description": "UTM campaign"
          },
          "utm_term": {
            "type": "string",
            "title": "Utm Term",
            "description": "UTM term"
          },
          "utm_content": {
            "type": "string",
            "title": "Utm Content",
            "description": "UTM content"
          },
          "label": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Label",
            "description": "Label"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description",
            "description": "Description"
          },
          "priority": {
            "type": "integer",
            "title": "Priority",
            "description": "Priority"
          },
          "is_active": {
            "type": "boolean",
            "title": "Is Active",
            "description": "Whether active"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Creation timestamp"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "title": "Updated At",
            "description": "Last update timestamp"
          }
        },
        "type": "object",
        "required": [
          "id",
          "account_id",
          "referrer_pattern",
          "match_type",
          "utm_source",
          "utm_medium",
          "utm_campaign",
          "utm_term",
          "utm_content",
          "priority",
          "is_active",
          "created_at",
          "updated_at"
        ],
        "title": "ReferrerMappingResponse",
        "description": "Response model for referrer mapping."
      },
      "ReferrerMappingUpdate": {
        "properties": {
          "referrer_pattern": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 255,
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Referrer Pattern",
            "description": "Pattern to match against referrer domain"
          },
          "match_type": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/MatchType"
              },
              {
                "type": "null"
              }
            ],
            "description": "How to match the pattern"
          },
          "utm_source": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 255,
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Utm Source",
            "description": "UTM source to apply"
          },
          "utm_medium": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 100
              },
              {
                "type": "null"
              }
            ],
            "title": "Utm Medium",
            "description": "UTM medium to apply"
          },
          "utm_campaign": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 255
              },
              {
                "type": "null"
              }
            ],
            "title": "Utm Campaign",
            "description": "UTM campaign to apply"
          },
          "utm_term": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 255
              },
              {
                "type": "null"
              }
            ],
            "title": "Utm Term",
            "description": "UTM term to apply"
          },
          "utm_content": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 255
              },
              {
                "type": "null"
              }
            ],
            "title": "Utm Content",
            "description": "UTM content to apply"
          },
          "label": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 100
              },
              {
                "type": "null"
              }
            ],
            "title": "Label",
            "description": "Human-readable label"
          },
          "description": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 500
              },
              {
                "type": "null"
              }
            ],
            "title": "Description",
            "description": "Optional description"
          },
          "priority": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 1000,
                "minimum": 0
              },
              {
                "type": "null"
              }
            ],
            "title": "Priority",
            "description": "Priority (0-1000)"
          },
          "is_active": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Is Active",
            "description": "Whether this mapping is active"
          }
        },
        "type": "object",
        "title": "ReferrerMappingUpdate",
        "description": "Request model for updating a referrer mapping."
      },
      "RegisterRequest": {
        "properties": {
          "email": {
            "type": "string",
            "format": "email",
            "title": "Email"
          },
          "name": {
            "type": "string",
            "maxLength": 255,
            "minLength": 1,
            "title": "Name"
          },
          "password": {
            "type": "string",
            "maxLength": 128,
            "minLength": 12,
            "title": "Password"
          },
          "accept_terms": {
            "type": "boolean",
            "title": "Accept Terms",
            "description": "User must accept terms of service"
          }
        },
        "type": "object",
        "required": [
          "email",
          "name",
          "password",
          "accept_terms"
        ],
        "title": "RegisterRequest",
        "description": "Request model for public user registration."
      },
      "RegisterResponse": {
        "properties": {
          "user_id": {
            "type": "integer",
            "title": "User Id"
          },
          "email": {
            "type": "string",
            "title": "Email"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "access_token": {
            "type": "string",
            "title": "Access Token",
            "default": ""
          },
          "token_type": {
            "type": "string",
            "title": "Token Type",
            "default": "bearer"
          },
          "expires_in": {
            "type": "integer",
            "title": "Expires In",
            "description": "Token validity in seconds",
            "default": 0
          },
          "requires_email_verification": {
            "type": "boolean",
            "title": "Requires Email Verification",
            "default": true
          },
          "requires_subscription": {
            "type": "boolean",
            "title": "Requires Subscription",
            "default": true
          },
          "email_sent": {
            "type": "boolean",
            "title": "Email Sent",
            "default": true
          },
          "message": {
            "type": "string",
            "title": "Message",
            "description": "User-facing message",
            "default": ""
          }
        },
        "type": "object",
        "required": [
          "user_id",
          "email",
          "name"
        ],
        "title": "RegisterResponse",
        "description": "Response after successful registration."
      },
      "ReportFrequency": {
        "type": "string",
        "enum": [
          "daily",
          "weekly",
          "monthly"
        ],
        "title": "ReportFrequency",
        "description": "Frequency of email reports."
      },
      "ReportHistoryInfo": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "report_id": {
            "type": "integer",
            "title": "Report Id"
          },
          "report_period_start": {
            "type": "string",
            "format": "date",
            "title": "Report Period Start"
          },
          "report_period_end": {
            "type": "string",
            "format": "date",
            "title": "Report Period End"
          },
          "recipients_sent_to": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Recipients Sent To"
          },
          "recipient_count": {
            "type": "integer",
            "title": "Recipient Count"
          },
          "status": {
            "$ref": "#/components/schemas/ReportStatus"
          },
          "error_message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error Message"
          },
          "report_stats": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Report Stats"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "completed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Completed At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "report_id",
          "report_period_start",
          "report_period_end",
          "recipients_sent_to",
          "recipient_count",
          "status",
          "error_message",
          "report_stats",
          "created_at",
          "completed_at"
        ],
        "title": "ReportHistoryInfo",
        "description": "Report history entry information."
      },
      "ReportHistoryListResponse": {
        "properties": {
          "history": {
            "items": {
              "$ref": "#/components/schemas/ReportHistoryInfo"
            },
            "type": "array",
            "title": "History"
          },
          "total": {
            "type": "integer",
            "title": "Total"
          }
        },
        "type": "object",
        "required": [
          "history",
          "total"
        ],
        "title": "ReportHistoryListResponse",
        "description": "Response for report history list endpoint."
      },
      "ReportListItemResponse": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "report_type": {
            "type": "string",
            "title": "Report Type"
          },
          "period_start": {
            "type": "string",
            "title": "Period Start"
          },
          "period_end": {
            "type": "string",
            "title": "Period End"
          },
          "period_label": {
            "type": "string",
            "title": "Period Label"
          },
          "status": {
            "type": "string",
            "title": "Status"
          },
          "created_at": {
            "type": "string",
            "title": "Created At"
          },
          "view_count": {
            "type": "integer",
            "title": "View Count",
            "default": 0
          },
          "revenue": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Revenue"
          },
          "revenue_change": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Revenue Change"
          },
          "conversions": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Conversions"
          },
          "insight_count": {
            "type": "integer",
            "title": "Insight Count",
            "default": 0
          }
        },
        "type": "object",
        "required": [
          "id",
          "report_type",
          "period_start",
          "period_end",
          "period_label",
          "status",
          "created_at"
        ],
        "title": "ReportListItemResponse",
        "description": "Report list item."
      },
      "ReportListResponse": {
        "properties": {
          "reports": {
            "items": {
              "$ref": "#/components/schemas/ReportListItemResponse"
            },
            "type": "array",
            "title": "Reports"
          },
          "total": {
            "type": "integer",
            "title": "Total"
          },
          "page": {
            "type": "integer",
            "title": "Page",
            "default": 1
          },
          "page_size": {
            "type": "integer",
            "title": "Page Size",
            "default": 12
          }
        },
        "type": "object",
        "required": [
          "reports",
          "total"
        ],
        "title": "ReportListResponse",
        "description": "Paginated report list."
      },
      "ReportResponse": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "account_id": {
            "type": "string",
            "title": "Account Id"
          },
          "report_type": {
            "type": "string",
            "title": "Report Type"
          },
          "period_start": {
            "type": "string",
            "title": "Period Start"
          },
          "period_end": {
            "type": "string",
            "title": "Period End"
          },
          "period_label": {
            "type": "string",
            "title": "Period Label"
          },
          "status": {
            "type": "string",
            "title": "Status"
          },
          "generation_started_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Generation Started At"
          },
          "generation_completed_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Generation Completed At"
          },
          "error_message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error Message"
          },
          "executive_summary": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Executive Summary"
          },
          "key_takeaways": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Key Takeaways"
          },
          "key_metrics": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/KeyMetricsResponse"
              },
              {
                "type": "null"
              }
            ]
          },
          "channel_performance": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ChannelPerformanceResponse"
              },
              {
                "type": "null"
              }
            ]
          },
          "funnel_health": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/FunnelHealthResponse"
              },
              {
                "type": "null"
              }
            ]
          },
          "audience_insights": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AudienceInsightsResponse"
              },
              {
                "type": "null"
              }
            ]
          },
          "top_insights": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TopInsightsResponse"
              },
              {
                "type": "null"
              }
            ]
          },
          "action_items": {
            "items": {
              "$ref": "#/components/schemas/ActionItemResponse"
            },
            "type": "array",
            "title": "Action Items"
          },
          "created_at": {
            "type": "string",
            "title": "Created At"
          },
          "updated_at": {
            "type": "string",
            "title": "Updated At"
          },
          "view_count": {
            "type": "integer",
            "title": "View Count",
            "default": 0
          }
        },
        "type": "object",
        "required": [
          "id",
          "account_id",
          "report_type",
          "period_start",
          "period_end",
          "period_label",
          "status",
          "created_at",
          "updated_at"
        ],
        "title": "ReportResponse",
        "description": "Complete report response."
      },
      "ReportStatus": {
        "type": "string",
        "enum": [
          "pending",
          "generating",
          "sending",
          "sent",
          "failed",
          "partial"
        ],
        "title": "ReportStatus",
        "description": "Status of a report send."
      },
      "ReportType": {
        "type": "string",
        "enum": [
          "summary",
          "detailed",
          "custom"
        ],
        "title": "ReportType",
        "description": "Type of email report."
      },
      "ResendVerificationRequest": {
        "properties": {
          "email": {
            "anyOf": [
              {
                "type": "string",
                "format": "email"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email",
            "description": "Email address (optional if authenticated)"
          }
        },
        "type": "object",
        "title": "ResendVerificationRequest",
        "description": "Request to resend verification email."
      },
      "SavedPixel": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id",
            "description": "Unique pixel ID (pix_xxx)"
          },
          "account_id": {
            "type": "string",
            "title": "Account Id",
            "description": "Account this pixel belongs to"
          },
          "name": {
            "type": "string",
            "title": "Name",
            "description": "Name for the saved pixel"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "config": {
            "$ref": "#/components/schemas/PixelConfigOutput",
            "description": "Pixel configuration"
          },
          "target_platform": {
            "$ref": "#/components/schemas/TargetPlatform",
            "description": "Target platform"
          },
          "created_by": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created By",
            "description": "User ID who created this"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "title": "Updated At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "account_id",
          "name",
          "config",
          "target_platform"
        ],
        "title": "SavedPixel",
        "description": "Full saved pixel model with all fields."
      },
      "SavedPixelCreate": {
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 100,
            "minLength": 1,
            "title": "Name",
            "description": "Name for the saved pixel",
            "examples": [
              "Purchase Tracking",
              "Newsletter Signup"
            ]
          },
          "description": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 500
              },
              {
                "type": "null"
              }
            ],
            "title": "Description",
            "description": "Optional description"
          },
          "config": {
            "$ref": "#/components/schemas/PixelConfigInput",
            "description": "Pixel configuration"
          },
          "target_platform": {
            "$ref": "#/components/schemas/TargetPlatform",
            "description": "Target platform for code generation",
            "default": "javascript"
          }
        },
        "type": "object",
        "required": [
          "name",
          "config"
        ],
        "title": "SavedPixelCreate",
        "description": "Request model for creating a saved pixel."
      },
      "SavedPixelSummary": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "pixel_type": {
            "$ref": "#/components/schemas/PixelType",
            "description": "Type of pixel"
          },
          "conversion_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Conversion Type",
            "description": "Conversion type if applicable"
          },
          "target_platform": {
            "$ref": "#/components/schemas/TargetPlatform"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "pixel_type",
          "target_platform",
          "created_at"
        ],
        "title": "SavedPixelSummary",
        "description": "Lightweight saved pixel model for listings."
      },
      "SavedPixelUpdate": {
        "properties": {
          "name": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 100,
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "description": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 500
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "config": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PixelConfigInput"
              },
              {
                "type": "null"
              }
            ]
          },
          "target_platform": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TargetPlatform"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "title": "SavedPixelUpdate",
        "description": "Request model for updating a saved pixel."
      },
      "ScoreDistribution": {
        "properties": {
          "score_0": {
            "type": "integer",
            "title": "Score 0",
            "description": "Hits with score 0 (clean)"
          },
          "score_1_30": {
            "type": "integer",
            "title": "Score 1 30",
            "description": "Hits with score 1-30 (low suspicion)"
          },
          "score_31_60": {
            "type": "integer",
            "title": "Score 31 60",
            "description": "Hits with score 31-60 (medium suspicion)"
          },
          "score_61_80": {
            "type": "integer",
            "title": "Score 61 80",
            "description": "Hits with score 61-80 (high suspicion)"
          },
          "score_81_100": {
            "type": "integer",
            "title": "Score 81 100",
            "description": "Hits with score 81-100 (very high suspicion)"
          },
          "total_hits": {
            "type": "integer",
            "title": "Total Hits",
            "description": "Total hits analyzed"
          },
          "avg_score": {
            "type": "number",
            "title": "Avg Score",
            "description": "Average score"
          },
          "suspicious_percentage": {
            "type": "number",
            "title": "Suspicious Percentage",
            "description": "Percentage of hits with score > 30"
          }
        },
        "type": "object",
        "required": [
          "score_0",
          "score_1_30",
          "score_31_60",
          "score_61_80",
          "score_81_100",
          "total_hits",
          "avg_score",
          "suspicious_percentage"
        ],
        "title": "ScoreDistribution",
        "description": "Distribution of headers fingerprint scores."
      },
      "Segment": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id",
            "description": "Unique segment ID (seg_xxx)"
          },
          "account_id": {
            "type": "string",
            "title": "Account Id",
            "description": "Account this segment belongs to"
          },
          "name": {
            "type": "string",
            "title": "Name",
            "description": "Unique slug identifier"
          },
          "display_name": {
            "type": "string",
            "title": "Display Name",
            "description": "Human-readable name"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "filters": {
            "$ref": "#/components/schemas/SegmentFiltersOutput",
            "description": "Filter conditions"
          },
          "color": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Color"
          },
          "is_system": {
            "type": "boolean",
            "title": "Is System",
            "description": "True for built-in segments (All Traffic, Direct, etc.)",
            "default": false
          },
          "created_by": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created By",
            "description": "User ID who created this"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "title": "Updated At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "account_id",
          "name",
          "display_name",
          "filters"
        ],
        "title": "Segment",
        "description": "Full segment model with all fields."
      },
      "SegmentCreate": {
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 50,
            "minLength": 1,
            "pattern": "^[a-z0-9-]+$",
            "title": "Name",
            "description": "Unique slug identifier (lowercase, alphanumeric, hyphens)",
            "examples": [
              "paid-spain",
              "organic-blog",
              "mobile-users"
            ]
          },
          "display_name": {
            "type": "string",
            "maxLength": 100,
            "minLength": 1,
            "title": "Display Name",
            "description": "Human-readable name",
            "examples": [
              "Paid Traffic Spain",
              "Organic Blog Visitors"
            ]
          },
          "description": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 500
              },
              {
                "type": "null"
              }
            ],
            "title": "Description",
            "description": "Optional description of what this segment represents"
          },
          "filters": {
            "$ref": "#/components/schemas/SegmentFiltersInput",
            "description": "Filter conditions for this segment"
          },
          "color": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^#[0-9A-Fa-f]{6}$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Color",
            "description": "Optional hex color for UI display",
            "examples": [
              "#3B82F6",
              "#10B981"
            ]
          }
        },
        "type": "object",
        "required": [
          "name",
          "display_name",
          "filters"
        ],
        "title": "SegmentCreate",
        "description": "Request model for creating a segment."
      },
      "SegmentSummary": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "display_name": {
            "type": "string",
            "title": "Display Name"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "color": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Color"
          },
          "is_system": {
            "type": "boolean",
            "title": "Is System",
            "default": false
          },
          "filter_count": {
            "type": "integer",
            "title": "Filter Count",
            "description": "Number of filter conditions"
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "display_name",
          "filter_count"
        ],
        "title": "SegmentSummary",
        "description": "Lightweight segment model for listings."
      },
      "SegmentUpdate": {
        "properties": {
          "display_name": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 100,
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Display Name"
          },
          "description": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 500
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "filters": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SegmentFiltersInput"
              },
              {
                "type": "null"
              }
            ]
          },
          "color": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^#[0-9A-Fa-f]{6}$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Color"
          }
        },
        "type": "object",
        "title": "SegmentUpdate",
        "description": "Request model for updating a segment."
      },
      "SendReportNowRequest": {
        "properties": {
          "period": {
            "type": "string",
            "pattern": "^(7d|30d|month|custom)$",
            "title": "Period",
            "description": "Period to report on",
            "default": "7d"
          },
          "custom_start": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "title": "Custom Start",
            "description": "Custom period start (if period=custom)"
          },
          "custom_end": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "title": "Custom End",
            "description": "Custom period end (if period=custom)"
          },
          "recipient_override": {
            "anyOf": [
              {
                "items": {
                  "type": "string",
                  "format": "email"
                },
                "type": "array",
                "maxItems": 20
              },
              {
                "type": "null"
              }
            ],
            "title": "Recipient Override",
            "description": "Override recipients for this send"
          }
        },
        "type": "object",
        "title": "SendReportNowRequest",
        "description": "Request to send a report immediately."
      },
      "SendReportResponse": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success"
          },
          "history_id": {
            "type": "integer",
            "title": "History Id"
          },
          "recipients_count": {
            "type": "integer",
            "title": "Recipients Count"
          },
          "message": {
            "type": "string",
            "title": "Message"
          }
        },
        "type": "object",
        "required": [
          "success",
          "history_id",
          "recipients_count",
          "message"
        ],
        "title": "SendReportResponse",
        "description": "Response after sending a report."
      },
      "SessionInfo": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "user_agent": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "User Agent"
          },
          "ip_address": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ip Address"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "last_used_at": {
            "type": "string",
            "format": "date-time",
            "title": "Last Used At"
          },
          "is_current": {
            "type": "boolean",
            "title": "Is Current",
            "default": false
          }
        },
        "type": "object",
        "required": [
          "id",
          "created_at",
          "last_used_at"
        ],
        "title": "SessionInfo",
        "description": "Information about a user session."
      },
      "SessionListResponse": {
        "properties": {
          "sessions": {
            "items": {
              "$ref": "#/components/schemas/SessionInfo"
            },
            "type": "array",
            "title": "Sessions"
          },
          "total": {
            "type": "integer",
            "title": "Total"
          }
        },
        "type": "object",
        "required": [
          "sessions",
          "total"
        ],
        "title": "SessionListResponse",
        "description": "List of user sessions."
      },
      "SessionSummary": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "title": {
            "type": "string",
            "title": "Title"
          },
          "message_count": {
            "type": "integer",
            "title": "Message Count"
          },
          "created_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          },
          "updated_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          },
          "is_active": {
            "type": "boolean",
            "title": "Is Active"
          }
        },
        "type": "object",
        "required": [
          "id",
          "title",
          "message_count",
          "created_at",
          "updated_at",
          "is_active"
        ],
        "title": "SessionSummary",
        "description": "Summary of a chat session."
      },
      "SessionsListResponse": {
        "properties": {
          "sessions": {
            "items": {
              "$ref": "#/components/schemas/SessionSummary"
            },
            "type": "array",
            "title": "Sessions"
          },
          "total": {
            "type": "integer",
            "title": "Total"
          }
        },
        "type": "object",
        "required": [
          "sessions",
          "total"
        ],
        "title": "SessionsListResponse",
        "description": "List of recent sessions."
      },
      "SharedDashboardAccessRequest": {
        "properties": {
          "password": {
            "type": "string",
            "maxLength": 100,
            "minLength": 1,
            "title": "Password"
          }
        },
        "type": "object",
        "required": [
          "password"
        ],
        "title": "SharedDashboardAccessRequest",
        "description": "Request to access a password-protected dashboard."
      },
      "SharedDashboardCreate": {
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 255,
            "minLength": 1,
            "title": "Name",
            "description": "Dashboard name"
          },
          "slug": {
            "type": "string",
            "maxLength": 100,
            "minLength": 1,
            "pattern": "^[a-z0-9][a-z0-9-]*[a-z0-9]$",
            "title": "Slug",
            "description": "URL-friendly slug"
          },
          "dashboard_type": {
            "$ref": "#/components/schemas/DashboardType",
            "description": "Type of dashboard",
            "default": "overview"
          },
          "is_public": {
            "type": "boolean",
            "title": "Is Public",
            "description": "Whether the dashboard is publicly accessible",
            "default": false
          },
          "password": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 100,
                "minLength": 4
              },
              {
                "type": "null"
              }
            ],
            "title": "Password",
            "description": "Optional password protection"
          },
          "fixed_date_range": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^(7d|30d|90d|month|year|custom)$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Fixed Date Range",
            "description": "Fixed date range for the dashboard"
          },
          "config": {
            "additionalProperties": true,
            "type": "object",
            "title": "Config",
            "description": "Custom dashboard configuration"
          },
          "show_branding": {
            "type": "boolean",
            "title": "Show Branding",
            "description": "Show Sealmetrics branding",
            "default": true
          },
          "custom_logo_url": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 500
              },
              {
                "type": "null"
              }
            ],
            "title": "Custom Logo Url",
            "description": "Custom logo URL"
          },
          "expires_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires At",
            "description": "Optional expiration date"
          }
        },
        "type": "object",
        "required": [
          "name",
          "slug"
        ],
        "title": "SharedDashboardCreate",
        "description": "Request model for creating a shared dashboard."
      },
      "SharedDashboardInfo": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "account_id": {
            "type": "string",
            "title": "Account Id"
          },
          "share_token": {
            "type": "string",
            "title": "Share Token"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "slug": {
            "type": "string",
            "title": "Slug"
          },
          "dashboard_type": {
            "$ref": "#/components/schemas/DashboardType"
          },
          "is_public": {
            "type": "boolean",
            "title": "Is Public"
          },
          "has_password": {
            "type": "boolean",
            "title": "Has Password"
          },
          "fixed_date_range": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Fixed Date Range"
          },
          "config": {
            "additionalProperties": true,
            "type": "object",
            "title": "Config"
          },
          "show_branding": {
            "type": "boolean",
            "title": "Show Branding"
          },
          "custom_logo_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Custom Logo Url"
          },
          "view_count": {
            "type": "integer",
            "title": "View Count"
          },
          "last_viewed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Viewed At"
          },
          "share_url": {
            "type": "string",
            "title": "Share Url"
          },
          "embed_url": {
            "type": "string",
            "title": "Embed Url"
          },
          "is_active": {
            "type": "boolean",
            "title": "Is Active"
          },
          "expires_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires At"
          },
          "created_by": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "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"
          }
        },
        "type": "object",
        "required": [
          "id",
          "account_id",
          "share_token",
          "name",
          "slug",
          "dashboard_type",
          "is_public",
          "has_password",
          "fixed_date_range",
          "config",
          "show_branding",
          "custom_logo_url",
          "view_count",
          "last_viewed_at",
          "share_url",
          "embed_url",
          "is_active",
          "expires_at",
          "created_by",
          "created_at",
          "updated_at"
        ],
        "title": "SharedDashboardInfo",
        "description": "Shared dashboard information returned by API."
      },
      "SharedDashboardListResponse": {
        "properties": {
          "dashboards": {
            "items": {
              "$ref": "#/components/schemas/SharedDashboardInfo"
            },
            "type": "array",
            "title": "Dashboards"
          },
          "total": {
            "type": "integer",
            "title": "Total"
          }
        },
        "type": "object",
        "required": [
          "dashboards",
          "total"
        ],
        "title": "SharedDashboardListResponse",
        "description": "Response for shared dashboard list endpoint."
      },
      "SharedDashboardPublicInfo": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "dashboard_type": {
            "$ref": "#/components/schemas/DashboardType"
          },
          "show_branding": {
            "type": "boolean",
            "title": "Show Branding"
          },
          "custom_logo_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Custom Logo Url"
          },
          "requires_password": {
            "type": "boolean",
            "title": "Requires Password"
          },
          "fixed_date_range": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Fixed Date Range"
          },
          "account_name": {
            "type": "string",
            "title": "Account Name"
          }
        },
        "type": "object",
        "required": [
          "name",
          "dashboard_type",
          "show_branding",
          "custom_logo_url",
          "requires_password",
          "fixed_date_range",
          "account_name"
        ],
        "title": "SharedDashboardPublicInfo",
        "description": "Public information about a shared dashboard (for viewing)."
      },
      "SharedDashboardUpdate": {
        "properties": {
          "name": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 255,
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "slug": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 100,
                "minLength": 1,
                "pattern": "^[a-z0-9][a-z0-9-]*[a-z0-9]$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Slug"
          },
          "dashboard_type": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/DashboardType"
              },
              {
                "type": "null"
              }
            ]
          },
          "is_public": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Is Public"
          },
          "password": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 100,
                "minLength": 4
              },
              {
                "type": "null"
              }
            ],
            "title": "Password"
          },
          "remove_password": {
            "type": "boolean",
            "title": "Remove Password",
            "description": "Remove password protection",
            "default": false
          },
          "fixed_date_range": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Fixed Date Range"
          },
          "config": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Config"
          },
          "show_branding": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Show Branding"
          },
          "custom_logo_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Custom Logo Url"
          },
          "expires_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires At"
          },
          "is_active": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Is Active"
          }
        },
        "type": "object",
        "title": "SharedDashboardUpdate",
        "description": "Request model for updating a shared dashboard."
      },
      "SiteAccessResponse": {
        "properties": {
          "added": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Added"
          },
          "already_assigned": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Already Assigned"
          },
          "invalid": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Invalid"
          }
        },
        "type": "object",
        "title": "SiteAccessResponse",
        "description": "Response after updating site access."
      },
      "SiteAccessUpdate": {
        "properties": {
          "site_ids": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "minItems": 1,
            "title": "Site Ids"
          }
        },
        "type": "object",
        "required": [
          "site_ids"
        ],
        "title": "SiteAccessUpdate",
        "description": "Request to add site access for a member."
      },
      "SourceConversion": {
        "properties": {
          "utm_source": {
            "type": "string",
            "title": "Utm Source"
          },
          "utm_medium": {
            "type": "string",
            "title": "Utm Medium"
          },
          "utm_campaign": {
            "type": "string",
            "title": "Utm Campaign",
            "default": ""
          },
          "utm_term": {
            "type": "string",
            "title": "Utm Term",
            "default": ""
          },
          "utm_content": {
            "type": "string",
            "title": "Utm Content",
            "default": ""
          },
          "conversions": {
            "type": "integer",
            "title": "Conversions"
          },
          "revenue": {
            "type": "string",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Revenue"
          },
          "percentage": {
            "type": "number",
            "title": "Percentage"
          }
        },
        "type": "object",
        "required": [
          "utm_source",
          "utm_medium",
          "conversions",
          "revenue",
          "percentage"
        ],
        "title": "SourceConversion",
        "description": "Conversions attributed to a source."
      },
      "StatsOverview": {
        "properties": {
          "date_range": {
            "$ref": "#/components/schemas/DateRange"
          },
          "traffic": {
            "$ref": "#/components/schemas/TrafficMetrics"
          },
          "conversions": {
            "$ref": "#/components/schemas/ConversionMetrics"
          },
          "traffic_change": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TrafficMetrics"
              },
              {
                "type": "null"
              }
            ],
            "description": "Change from previous period"
          },
          "conversions_change": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ConversionMetrics"
              },
              {
                "type": "null"
              }
            ]
          },
          "entrances_series": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TimeSeries"
              },
              {
                "type": "null"
              }
            ]
          },
          "engaged_entrances_series": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TimeSeries"
              },
              {
                "type": "null"
              }
            ]
          },
          "page_views_series": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TimeSeries"
              },
              {
                "type": "null"
              }
            ]
          },
          "conversions_series": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TimeSeries"
              },
              {
                "type": "null"
              }
            ]
          },
          "microconversions_series": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TimeSeries"
              },
              {
                "type": "null"
              }
            ]
          },
          "revenue_series": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TimeSeries"
              },
              {
                "type": "null"
              }
            ]
          },
          "entrances_series_compare": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TimeSeries"
              },
              {
                "type": "null"
              }
            ]
          },
          "page_views_series_compare": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TimeSeries"
              },
              {
                "type": "null"
              }
            ]
          },
          "conversions_series_compare": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TimeSeries"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "date_range",
          "traffic",
          "conversions"
        ],
        "title": "StatsOverview",
        "description": "Complete stats overview for dashboard.\n\nCombines traffic and conversion metrics."
      },
      "SyncFrequency": {
        "type": "string",
        "enum": [
          "hourly",
          "daily",
          "manual"
        ],
        "title": "SyncFrequency",
        "description": "Sync frequency options."
      },
      "SyncStatus": {
        "type": "string",
        "enum": [
          "running",
          "success",
          "failed",
          "partial",
          "cancelled"
        ],
        "title": "SyncStatus",
        "description": "Sync operation status."
      },
      "TableData": {
        "properties": {
          "title": {
            "type": "string",
            "title": "Title"
          },
          "columns": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Columns"
          },
          "rows": {
            "items": {
              "items": {},
              "type": "array"
            },
            "type": "array",
            "title": "Rows"
          }
        },
        "type": "object",
        "required": [
          "title",
          "columns",
          "rows"
        ],
        "title": "TableData",
        "description": "Structured table data for frontend rendering."
      },
      "TargetPlatform": {
        "type": "string",
        "enum": [
          "javascript",
          "gtm",
          "tealium"
        ],
        "title": "TargetPlatform",
        "description": "Target platform for code generation."
      },
      "TestAlertRequest": {
        "properties": {
          "send_notification": {
            "type": "boolean",
            "title": "Send Notification",
            "description": "Whether to send a test notification",
            "default": true
          }
        },
        "type": "object",
        "title": "TestAlertRequest",
        "description": "Request to test an alert."
      },
      "TestAlertResponse": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success"
          },
          "current_value": {
            "type": "string",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Current Value"
          },
          "baseline_value": {
            "type": "string",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Baseline Value"
          },
          "would_trigger": {
            "type": "boolean",
            "title": "Would Trigger"
          },
          "change_percentage": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Change Percentage"
          },
          "notification_sent": {
            "type": "boolean",
            "title": "Notification Sent"
          },
          "message": {
            "type": "string",
            "title": "Message"
          }
        },
        "type": "object",
        "required": [
          "success",
          "current_value",
          "baseline_value",
          "would_trigger",
          "change_percentage",
          "notification_sent",
          "message"
        ],
        "title": "TestAlertResponse",
        "description": "Response from testing an alert."
      },
      "ThresholdDirection": {
        "type": "string",
        "enum": [
          "increase",
          "decrease",
          "both"
        ],
        "title": "ThresholdDirection",
        "description": "Direction of change to alert on."
      },
      "TimeSeries": {
        "properties": {
          "metric": {
            "type": "string",
            "title": "Metric",
            "description": "Metric name"
          },
          "points": {
            "items": {
              "$ref": "#/components/schemas/TimeSeriesPoint"
            },
            "type": "array",
            "title": "Points"
          },
          "total": {
            "type": "number",
            "title": "Total",
            "description": "Sum of all values.",
            "readOnly": true
          },
          "average": {
            "type": "number",
            "title": "Average",
            "description": "Average value.",
            "readOnly": true
          }
        },
        "type": "object",
        "required": [
          "metric",
          "total",
          "average"
        ],
        "title": "TimeSeries",
        "description": "Time series data for charts."
      },
      "TimeSeriesPoint": {
        "properties": {
          "date": {
            "type": "string",
            "format": "date",
            "title": "Date",
            "description": "Date for this data point"
          },
          "hour": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Hour",
            "description": "Hour (0-23) for hourly granularity"
          },
          "day_of_week": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Day Of Week",
            "description": "Day of week (ISO 8601: 1=Monday, 7=Sunday). Used for hourly charts."
          },
          "value": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              }
            ],
            "title": "Value",
            "description": "Metric value"
          }
        },
        "type": "object",
        "required": [
          "date",
          "value"
        ],
        "title": "TimeSeriesPoint",
        "description": "Single point in a time series."
      },
      "TimezoneInfo": {
        "properties": {
          "timezone": {
            "type": "string",
            "title": "Timezone"
          },
          "country_code": {
            "type": "string",
            "title": "Country Code"
          },
          "country_name": {
            "type": "string",
            "title": "Country Name"
          }
        },
        "type": "object",
        "required": [
          "timezone",
          "country_code",
          "country_name"
        ],
        "title": "TimezoneInfo",
        "description": "Timezone information."
      },
      "TimezoneListResponse": {
        "properties": {
          "timezones": {
            "items": {
              "$ref": "#/components/schemas/TimezoneInfo"
            },
            "type": "array",
            "title": "Timezones"
          },
          "total": {
            "type": "integer",
            "title": "Total"
          }
        },
        "type": "object",
        "required": [
          "timezones",
          "total"
        ],
        "title": "TimezoneListResponse",
        "description": "Response for timezone list endpoint."
      },
      "TokenResponse": {
        "properties": {
          "access_token": {
            "type": "string",
            "title": "Access Token"
          },
          "token_type": {
            "type": "string",
            "title": "Token Type",
            "default": "bearer"
          },
          "expires_in": {
            "type": "integer",
            "title": "Expires In",
            "description": "Token validity in seconds"
          },
          "user": {
            "$ref": "#/components/schemas/UserInfo"
          }
        },
        "type": "object",
        "required": [
          "access_token",
          "expires_in",
          "user"
        ],
        "title": "TokenResponse",
        "description": "Token response after successful login."
      },
      "TokenScope": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id",
            "description": "Scope identifier"
          },
          "name": {
            "type": "string",
            "title": "Name",
            "description": "Human-readable scope name"
          },
          "description": {
            "type": "string",
            "title": "Description",
            "description": "Scope description"
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "description"
        ],
        "title": "TokenScope",
        "description": "Scope definition for API tokens."
      },
      "ToolUsage": {
        "properties": {
          "tool_name": {
            "type": "string",
            "title": "Tool Name"
          },
          "success": {
            "type": "boolean",
            "title": "Success"
          },
          "duration_ms": {
            "type": "integer",
            "title": "Duration Ms",
            "default": 0
          }
        },
        "type": "object",
        "required": [
          "tool_name",
          "success"
        ],
        "title": "ToolUsage",
        "description": "Information about a tool used during the response."
      },
      "ToolsListResponse": {
        "properties": {
          "tools": {
            "items": {
              "$ref": "#/components/schemas/AvailableTool"
            },
            "type": "array",
            "title": "Tools"
          },
          "total": {
            "type": "integer",
            "title": "Total"
          }
        },
        "type": "object",
        "required": [
          "tools",
          "total"
        ],
        "title": "ToolsListResponse",
        "description": "List of available tools."
      },
      "TopInsightsResponse": {
        "properties": {
          "red": {
            "items": {
              "$ref": "#/components/schemas/sealmetrics_api__routers__lens_reports__InsightSummaryResponse"
            },
            "type": "array",
            "title": "Red"
          },
          "yellow": {
            "items": {
              "$ref": "#/components/schemas/sealmetrics_api__routers__lens_reports__InsightSummaryResponse"
            },
            "type": "array",
            "title": "Yellow"
          },
          "green": {
            "items": {
              "$ref": "#/components/schemas/sealmetrics_api__routers__lens_reports__InsightSummaryResponse"
            },
            "type": "array",
            "title": "Green"
          },
          "total_economic_impact": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Total Economic Impact"
          },
          "insight_count": {
            "type": "integer",
            "title": "Insight Count",
            "default": 0
          }
        },
        "type": "object",
        "title": "TopInsightsResponse",
        "description": "Top insights section."
      },
      "TopLandingPage": {
        "properties": {
          "landing_page": {
            "type": "string",
            "title": "Landing Page",
            "description": "Landing page path"
          },
          "content_grouping": {
            "type": "string",
            "title": "Content Grouping",
            "description": "Content group",
            "default": ""
          },
          "entrances": {
            "type": "integer",
            "minimum": 0,
            "title": "Entrances",
            "default": 0
          },
          "engaged_entrances": {
            "type": "integer",
            "minimum": 0,
            "title": "Engaged Entrances",
            "default": 0
          },
          "bounce_rate": {
            "type": "number",
            "maximum": 100,
            "minimum": 0,
            "title": "Bounce Rate",
            "default": 0
          },
          "microconversions": {
            "type": "integer",
            "minimum": 0,
            "title": "Microconversions",
            "default": 0
          },
          "conversions": {
            "type": "integer",
            "minimum": 0,
            "title": "Conversions",
            "default": 0
          },
          "conversion_rate": {
            "type": "number",
            "maximum": 100,
            "minimum": 0,
            "title": "Conversion Rate",
            "default": 0
          },
          "revenue": {
            "type": "string",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Revenue",
            "default": "0"
          }
        },
        "type": "object",
        "required": [
          "landing_page"
        ],
        "title": "TopLandingPage",
        "description": "Top landing page summary."
      },
      "TrafficMetrics": {
        "properties": {
          "entrances": {
            "type": "integer",
            "minimum": 0,
            "title": "Entrances",
            "description": "Session starts (entrances)",
            "default": 0
          },
          "engaged_entrances": {
            "type": "integer",
            "minimum": 0,
            "title": "Engaged Entrances",
            "description": "Engaged sessions",
            "default": 0
          },
          "page_views": {
            "type": "integer",
            "minimum": 0,
            "title": "Page Views",
            "description": "Total page views",
            "default": 0
          },
          "microconversions": {
            "type": "integer",
            "minimum": 0,
            "title": "Microconversions",
            "description": "Total microconversions",
            "default": 0
          },
          "conversions": {
            "type": "integer",
            "minimum": 0,
            "title": "Conversions",
            "description": "Total conversions",
            "default": 0
          },
          "revenue": {
            "type": "string",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Revenue",
            "description": "Total revenue",
            "default": "0"
          },
          "bounce_rate": {
            "type": "number",
            "title": "Bounce Rate",
            "description": "Bounce rate as percentage.",
            "readOnly": true
          },
          "pages_per_session": {
            "type": "number",
            "title": "Pages Per Session",
            "description": "Average pages per session.",
            "readOnly": true
          }
        },
        "type": "object",
        "required": [
          "bounce_rate",
          "pages_per_session"
        ],
        "title": "TrafficMetrics",
        "description": "Core traffic metrics."
      },
      "TwoFactorDisableRequest": {
        "properties": {
          "password": {
            "type": "string",
            "minLength": 1,
            "title": "Password",
            "description": "Current password for verification"
          },
          "code": {
            "type": "string",
            "maxLength": 9,
            "minLength": 6,
            "title": "Code",
            "description": "TOTP or backup code"
          }
        },
        "type": "object",
        "required": [
          "password",
          "code"
        ],
        "title": "TwoFactorDisableRequest",
        "description": "Request to disable 2FA."
      },
      "TwoFactorLoginVerifyRequest": {
        "properties": {
          "user_id": {
            "type": "integer",
            "title": "User Id",
            "description": "User ID from initial login response"
          },
          "code": {
            "type": "string",
            "maxLength": 9,
            "minLength": 6,
            "title": "Code",
            "description": "TOTP or backup code"
          },
          "is_backup_code": {
            "type": "boolean",
            "title": "Is Backup Code",
            "description": "Whether this is a backup code",
            "default": false
          }
        },
        "type": "object",
        "required": [
          "user_id",
          "code"
        ],
        "title": "TwoFactorLoginVerifyRequest",
        "description": "Request to verify 2FA during login."
      },
      "TwoFactorRequiredResponse": {
        "properties": {
          "requires_2fa": {
            "type": "boolean",
            "title": "Requires 2Fa",
            "default": true
          },
          "user_id": {
            "type": "integer",
            "title": "User Id"
          },
          "message": {
            "type": "string",
            "title": "Message",
            "default": "Two-factor authentication required"
          }
        },
        "type": "object",
        "required": [
          "user_id"
        ],
        "title": "TwoFactorRequiredResponse",
        "description": "Response when 2FA verification is required to complete login."
      },
      "TwoFactorSetupRequest": {
        "properties": {
          "password": {
            "type": "string",
            "minLength": 1,
            "title": "Password",
            "description": "Current password for verification"
          }
        },
        "type": "object",
        "required": [
          "password"
        ],
        "title": "TwoFactorSetupRequest",
        "description": "Request to start 2FA setup."
      },
      "TwoFactorSetupResponse": {
        "properties": {
          "secret": {
            "type": "string",
            "title": "Secret",
            "description": "TOTP secret (show once, for manual entry)"
          },
          "qr_code_data_url": {
            "type": "string",
            "title": "Qr Code Data Url",
            "description": "Data URL for QR code image (base64 PNG)"
          },
          "backup_codes": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Backup Codes",
            "description": "Backup recovery codes (show once)"
          },
          "provisioning_uri": {
            "type": "string",
            "title": "Provisioning Uri",
            "description": "URI for manual authenticator entry"
          },
          "expires_in_minutes": {
            "type": "integer",
            "title": "Expires In Minutes",
            "description": "Minutes until setup expires"
          }
        },
        "type": "object",
        "required": [
          "secret",
          "qr_code_data_url",
          "backup_codes",
          "provisioning_uri",
          "expires_in_minutes"
        ],
        "title": "TwoFactorSetupResponse",
        "description": "Response with 2FA setup information."
      },
      "TwoFactorStatusResponse": {
        "properties": {
          "enabled": {
            "type": "boolean",
            "title": "Enabled"
          },
          "enabled_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Enabled At"
          },
          "backup_codes_remaining": {
            "type": "integer",
            "title": "Backup Codes Remaining",
            "default": 0
          }
        },
        "type": "object",
        "required": [
          "enabled"
        ],
        "title": "TwoFactorStatusResponse",
        "description": "2FA status for a user."
      },
      "TwoFactorVerifyRequest": {
        "properties": {
          "code": {
            "type": "string",
            "maxLength": 6,
            "minLength": 6,
            "pattern": "^\\d{6}$",
            "title": "Code",
            "description": "6-digit TOTP code"
          }
        },
        "type": "object",
        "required": [
          "code"
        ],
        "title": "TwoFactorVerifyRequest",
        "description": "Request to verify TOTP code and complete setup."
      },
      "UTMField": {
        "type": "string",
        "enum": [
          "utm_source",
          "utm_medium",
          "utm_campaign",
          "utm_term",
          "utm_content"
        ],
        "title": "UTMField",
        "description": "Standard UTM fields for mapping."
      },
      "UTMMappingCreate": {
        "properties": {
          "custom_param": {
            "type": "string",
            "maxLength": 100,
            "minLength": 1,
            "title": "Custom Param",
            "description": "Custom URL parameter name (e.g., campaign_id)"
          },
          "maps_to": {
            "$ref": "#/components/schemas/UTMField",
            "description": "Standard UTM field this maps to"
          }
        },
        "type": "object",
        "required": [
          "custom_param",
          "maps_to"
        ],
        "title": "UTMMappingCreate",
        "description": "Request to create a UTM mapping."
      },
      "UTMMappingInfo": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "custom_param": {
            "type": "string",
            "title": "Custom Param"
          },
          "maps_to": {
            "type": "string",
            "title": "Maps To"
          },
          "is_active": {
            "type": "boolean",
            "title": "Is Active",
            "default": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "custom_param",
          "maps_to",
          "created_at"
        ],
        "title": "UTMMappingInfo",
        "description": "UTM mapping information."
      },
      "UTMMappingListResponse": {
        "properties": {
          "mappings": {
            "items": {
              "$ref": "#/components/schemas/UTMMappingInfo"
            },
            "type": "array",
            "title": "Mappings"
          },
          "total": {
            "type": "integer",
            "title": "Total"
          }
        },
        "type": "object",
        "required": [
          "mappings",
          "total"
        ],
        "title": "UTMMappingListResponse",
        "description": "Response for UTM mapping list endpoint."
      },
      "UTMMappingUpdate": {
        "properties": {
          "maps_to": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/UTMField"
              },
              {
                "type": "null"
              }
            ],
            "description": "Standard UTM field this maps to"
          },
          "is_active": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Is Active",
            "description": "Whether this mapping is active"
          }
        },
        "type": "object",
        "title": "UTMMappingUpdate",
        "description": "Request to update a UTM mapping."
      },
      "UpdateMemberRoleRequest": {
        "properties": {
          "role": {
            "$ref": "#/components/schemas/OrgRole"
          }
        },
        "type": "object",
        "required": [
          "role"
        ],
        "title": "UpdateMemberRoleRequest",
        "description": "Request to change a member's role."
      },
      "UserCreate": {
        "properties": {
          "email": {
            "type": "string",
            "format": "email",
            "title": "Email"
          },
          "name": {
            "type": "string",
            "maxLength": 255,
            "minLength": 1,
            "title": "Name"
          },
          "role": {
            "$ref": "#/components/schemas/UserRole",
            "default": "user"
          },
          "password": {
            "type": "string",
            "maxLength": 128,
            "minLength": 12,
            "title": "Password"
          },
          "account_ids": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Account Ids"
          }
        },
        "type": "object",
        "required": [
          "email",
          "name",
          "password"
        ],
        "title": "UserCreate",
        "description": "Request model for creating a user."
      },
      "UserInfo": {
        "properties": {
          "email": {
            "type": "string",
            "format": "email",
            "title": "Email"
          },
          "name": {
            "type": "string",
            "maxLength": 255,
            "minLength": 1,
            "title": "Name"
          },
          "role": {
            "$ref": "#/components/schemas/UserRole",
            "default": "user"
          },
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "is_active": {
            "type": "boolean",
            "title": "Is Active",
            "default": true
          },
          "email_verified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email Verified At"
          },
          "last_login_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Login At"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "account_ids": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Account Ids"
          },
          "two_factor_enabled": {
            "type": "boolean",
            "title": "Two Factor Enabled",
            "default": false
          },
          "two_factor_enabled_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Two Factor Enabled At"
          }
        },
        "type": "object",
        "required": [
          "email",
          "name",
          "id",
          "created_at"
        ],
        "title": "UserInfo",
        "description": "User information returned by API."
      },
      "UserRole": {
        "type": "string",
        "enum": [
          "superadmin",
          "user"
        ],
        "title": "UserRole",
        "description": "User roles. Only superadmin is meaningful as a global role.\nAll other authorization is org-based (owner/admin/member)."
      },
      "UserUpdate": {
        "properties": {
          "name": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 255,
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "role": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/UserRole"
              },
              {
                "type": "null"
              }
            ]
          },
          "is_active": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Is Active"
          }
        },
        "type": "object",
        "title": "UserUpdate",
        "description": "Request model for updating a user (superadmin)."
      },
      "V1ConnectionTest": {
        "properties": {
          "valid": {
            "type": "boolean",
            "title": "Valid",
            "description": "Whether the connection is valid"
          },
          "account_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Account Name",
            "description": "Account name from v1"
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error",
            "description": "Error message if invalid"
          }
        },
        "type": "object",
        "required": [
          "valid"
        ],
        "title": "V1ConnectionTest",
        "description": "Result of v1 connection test."
      },
      "V1Credentials": {
        "properties": {
          "email": {
            "type": "string",
            "maxLength": 255,
            "minLength": 5,
            "title": "Email",
            "description": "Email de la cuenta v1"
          },
          "password": {
            "type": "string",
            "minLength": 1,
            "title": "Password",
            "description": "Password de la cuenta v1"
          },
          "account_id": {
            "type": "string",
            "maxLength": 64,
            "minLength": 1,
            "pattern": "^[a-zA-Z0-9_-]+$",
            "title": "Account Id",
            "description": "Account ID en v1"
          }
        },
        "type": "object",
        "required": [
          "email",
          "password",
          "account_id"
        ],
        "title": "V1Credentials",
        "description": "Credentials for Sealmetrics v1 API."
      },
      "ValidationError": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "type": "array",
            "title": "Location"
          },
          "msg": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          },
          "input": {
            "title": "Input"
          },
          "ctx": {
            "type": "object",
            "title": "Context"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      },
      "ValueType": {
        "type": "string",
        "enum": [
          "literal",
          "gtm",
          "js"
        ],
        "title": "ValueType",
        "description": "Type of value in pixel configuration."
      },
      "VerifyEmailRequest": {
        "properties": {
          "token": {
            "type": "string",
            "minLength": 20,
            "title": "Token",
            "description": "Verification token from email"
          }
        },
        "type": "object",
        "required": [
          "token"
        ],
        "title": "VerifyEmailRequest",
        "description": "Request to verify email with token."
      },
      "WebhookBulkReplayRequest": {
        "properties": {
          "delivery_ids": {
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "type": "array",
            "maxItems": 100,
            "minItems": 1,
            "title": "Delivery Ids",
            "description": "Delivery IDs to replay"
          },
          "force": {
            "type": "boolean",
            "title": "Force",
            "description": "Force replay succeeded deliveries",
            "default": false
          }
        },
        "type": "object",
        "required": [
          "delivery_ids"
        ],
        "title": "WebhookBulkReplayRequest",
        "description": "Request to replay multiple deliveries."
      },
      "WebhookBulkReplayResponse": {
        "properties": {
          "replayed": {
            "type": "integer",
            "title": "Replayed"
          },
          "skipped": {
            "type": "integer",
            "title": "Skipped"
          },
          "errors": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Errors"
          }
        },
        "type": "object",
        "required": [
          "replayed",
          "skipped",
          "errors"
        ],
        "title": "WebhookBulkReplayResponse",
        "description": "Response from bulk replay."
      },
      "WebhookDeliveryDetail": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "delivery_id": {
            "type": "string",
            "format": "uuid",
            "title": "Delivery Id"
          },
          "endpoint_id": {
            "type": "string",
            "format": "uuid",
            "title": "Endpoint Id"
          },
          "account_id": {
            "type": "string",
            "title": "Account Id"
          },
          "event_type": {
            "type": "string",
            "title": "Event Type"
          },
          "event_id": {
            "type": "string",
            "format": "uuid",
            "title": "Event Id"
          },
          "idempotency_key": {
            "type": "string",
            "title": "Idempotency Key"
          },
          "payload_size_bytes": {
            "type": "integer",
            "title": "Payload Size Bytes"
          },
          "status": {
            "$ref": "#/components/schemas/WebhookDeliveryStatus"
          },
          "attempt_number": {
            "type": "integer",
            "title": "Attempt Number"
          },
          "max_attempts": {
            "type": "integer",
            "title": "Max Attempts"
          },
          "next_retry_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Retry At"
          },
          "response_status_code": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Response Status Code"
          },
          "response_time_ms": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Response Time Ms"
          },
          "error_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error Type"
          },
          "error_message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error Message"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "processing_started_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Processing Started At"
          },
          "completed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Completed At"
          },
          "payload": {
            "additionalProperties": true,
            "type": "object",
            "title": "Payload"
          },
          "response_body": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Response Body"
          },
          "response_headers": {
            "anyOf": [
              {
                "additionalProperties": {
                  "type": "string"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Response Headers"
          }
        },
        "type": "object",
        "required": [
          "id",
          "delivery_id",
          "endpoint_id",
          "account_id",
          "event_type",
          "event_id",
          "idempotency_key",
          "payload_size_bytes",
          "status",
          "attempt_number",
          "max_attempts",
          "next_retry_at",
          "response_status_code",
          "response_time_ms",
          "error_type",
          "error_message",
          "created_at",
          "processing_started_at",
          "completed_at",
          "payload",
          "response_body",
          "response_headers"
        ],
        "title": "WebhookDeliveryDetail",
        "description": "Detailed webhook delivery with payload and response."
      },
      "WebhookDeliveryInfo": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "delivery_id": {
            "type": "string",
            "format": "uuid",
            "title": "Delivery Id"
          },
          "endpoint_id": {
            "type": "string",
            "format": "uuid",
            "title": "Endpoint Id"
          },
          "account_id": {
            "type": "string",
            "title": "Account Id"
          },
          "event_type": {
            "type": "string",
            "title": "Event Type"
          },
          "event_id": {
            "type": "string",
            "format": "uuid",
            "title": "Event Id"
          },
          "idempotency_key": {
            "type": "string",
            "title": "Idempotency Key"
          },
          "payload_size_bytes": {
            "type": "integer",
            "title": "Payload Size Bytes"
          },
          "status": {
            "$ref": "#/components/schemas/WebhookDeliveryStatus"
          },
          "attempt_number": {
            "type": "integer",
            "title": "Attempt Number"
          },
          "max_attempts": {
            "type": "integer",
            "title": "Max Attempts"
          },
          "next_retry_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Retry At"
          },
          "response_status_code": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Response Status Code"
          },
          "response_time_ms": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Response Time Ms"
          },
          "error_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error Type"
          },
          "error_message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error Message"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "processing_started_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Processing Started At"
          },
          "completed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Completed At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "delivery_id",
          "endpoint_id",
          "account_id",
          "event_type",
          "event_id",
          "idempotency_key",
          "payload_size_bytes",
          "status",
          "attempt_number",
          "max_attempts",
          "next_retry_at",
          "response_status_code",
          "response_time_ms",
          "error_type",
          "error_message",
          "created_at",
          "processing_started_at",
          "completed_at"
        ],
        "title": "WebhookDeliveryInfo",
        "description": "Webhook delivery information."
      },
      "WebhookDeliveryListResponse": {
        "properties": {
          "deliveries": {
            "items": {
              "$ref": "#/components/schemas/WebhookDeliveryInfo"
            },
            "type": "array",
            "title": "Deliveries"
          },
          "total": {
            "type": "integer",
            "title": "Total"
          }
        },
        "type": "object",
        "required": [
          "deliveries",
          "total"
        ],
        "title": "WebhookDeliveryListResponse",
        "description": "Response for webhook delivery list."
      },
      "WebhookDeliveryLogInfo": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "delivery_id": {
            "type": "string",
            "format": "uuid",
            "title": "Delivery Id"
          },
          "attempt_number": {
            "type": "integer",
            "title": "Attempt Number"
          },
          "attempted_at": {
            "type": "string",
            "format": "date-time",
            "title": "Attempted At"
          },
          "request_method": {
            "type": "string",
            "title": "Request Method"
          },
          "request_url": {
            "type": "string",
            "title": "Request Url"
          },
          "response_status_code": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Response Status Code"
          },
          "response_time_ms": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Response Time Ms"
          },
          "error_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error Type"
          },
          "error_message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error Message"
          },
          "success": {
            "type": "boolean",
            "title": "Success"
          }
        },
        "type": "object",
        "required": [
          "id",
          "delivery_id",
          "attempt_number",
          "attempted_at",
          "request_method",
          "request_url",
          "response_status_code",
          "response_time_ms",
          "error_type",
          "error_message",
          "success"
        ],
        "title": "WebhookDeliveryLogInfo",
        "description": "Delivery attempt log entry."
      },
      "WebhookDeliveryStatus": {
        "type": "string",
        "enum": [
          "pending",
          "processing",
          "success",
          "failed",
          "retrying",
          "dead_letter"
        ],
        "title": "WebhookDeliveryStatus",
        "description": "Status of a webhook delivery."
      },
      "WebhookEndpointCreate": {
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 255,
            "minLength": 1,
            "title": "Name",
            "description": "Endpoint name"
          },
          "description": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 1000
              },
              {
                "type": "null"
              }
            ],
            "title": "Description",
            "description": "Description"
          },
          "url": {
            "type": "string",
            "maxLength": 2000,
            "title": "Url",
            "description": "Webhook URL"
          },
          "event_types": {
            "items": {
              "$ref": "#/components/schemas/WebhookEventType"
            },
            "type": "array",
            "maxItems": 10,
            "minItems": 1,
            "title": "Event Types",
            "description": "Event types to subscribe to"
          },
          "filters": {
            "$ref": "#/components/schemas/WebhookFilters",
            "description": "Event filters"
          },
          "custom_headers": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object",
            "title": "Custom Headers",
            "description": "Custom HTTP headers"
          },
          "payload_format": {
            "$ref": "#/components/schemas/WebhookPayloadFormat",
            "description": "Payload format",
            "default": "json"
          },
          "include_context": {
            "type": "boolean",
            "title": "Include Context",
            "description": "Include enriched context in payload",
            "default": true
          },
          "batching_enabled": {
            "type": "boolean",
            "title": "Batching Enabled",
            "description": "Enable event batching",
            "default": false
          },
          "batch_size": {
            "type": "integer",
            "maximum": 1000,
            "minimum": 1,
            "title": "Batch Size",
            "description": "Max events per batch",
            "default": 100
          },
          "batch_window_seconds": {
            "type": "integer",
            "maximum": 3600,
            "minimum": 10,
            "title": "Batch Window Seconds",
            "description": "Batch window in seconds",
            "default": 60
          },
          "max_retries": {
            "type": "integer",
            "maximum": 10,
            "minimum": 0,
            "title": "Max Retries",
            "description": "Max retry attempts",
            "default": 3
          },
          "timeout_seconds": {
            "type": "integer",
            "maximum": 120,
            "minimum": 5,
            "title": "Timeout Seconds",
            "description": "Request timeout",
            "default": 30
          }
        },
        "type": "object",
        "required": [
          "name",
          "url",
          "event_types"
        ],
        "title": "WebhookEndpointCreate",
        "description": "Request model for creating a webhook endpoint."
      },
      "WebhookEndpointInfo": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "endpoint_id": {
            "type": "string",
            "format": "uuid",
            "title": "Endpoint Id"
          },
          "account_id": {
            "type": "string",
            "title": "Account Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "url": {
            "type": "string",
            "title": "Url"
          },
          "event_types": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Event Types"
          },
          "filters": {
            "additionalProperties": true,
            "type": "object",
            "title": "Filters"
          },
          "custom_headers": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object",
            "title": "Custom Headers"
          },
          "payload_version": {
            "type": "string",
            "title": "Payload Version"
          },
          "payload_format": {
            "$ref": "#/components/schemas/WebhookPayloadFormat"
          },
          "include_context": {
            "type": "boolean",
            "title": "Include Context"
          },
          "batching_enabled": {
            "type": "boolean",
            "title": "Batching Enabled"
          },
          "batch_size": {
            "type": "integer",
            "title": "Batch Size"
          },
          "batch_window_seconds": {
            "type": "integer",
            "title": "Batch Window Seconds"
          },
          "max_retries": {
            "type": "integer",
            "title": "Max Retries"
          },
          "timeout_seconds": {
            "type": "integer",
            "title": "Timeout Seconds"
          },
          "is_active": {
            "type": "boolean",
            "title": "Is Active"
          },
          "is_verified": {
            "type": "boolean",
            "title": "Is Verified"
          },
          "delivery_count": {
            "type": "integer",
            "title": "Delivery Count"
          },
          "success_count": {
            "type": "integer",
            "title": "Success Count"
          },
          "failure_count": {
            "type": "integer",
            "title": "Failure Count"
          },
          "last_delivery_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Delivery At"
          },
          "last_success_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Success At"
          },
          "last_failure_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Failure At"
          },
          "last_failure_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Failure Reason"
          },
          "created_by": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "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"
          }
        },
        "type": "object",
        "required": [
          "id",
          "endpoint_id",
          "account_id",
          "name",
          "description",
          "url",
          "event_types",
          "filters",
          "custom_headers",
          "payload_version",
          "payload_format",
          "include_context",
          "batching_enabled",
          "batch_size",
          "batch_window_seconds",
          "max_retries",
          "timeout_seconds",
          "is_active",
          "is_verified",
          "delivery_count",
          "success_count",
          "failure_count",
          "last_delivery_at",
          "last_success_at",
          "last_failure_at",
          "last_failure_reason",
          "created_by",
          "created_at",
          "updated_at"
        ],
        "title": "WebhookEndpointInfo",
        "description": "Webhook endpoint information returned by API."
      },
      "WebhookEndpointListResponse": {
        "properties": {
          "endpoints": {
            "items": {
              "$ref": "#/components/schemas/WebhookEndpointInfo"
            },
            "type": "array",
            "title": "Endpoints"
          },
          "total": {
            "type": "integer",
            "title": "Total"
          }
        },
        "type": "object",
        "required": [
          "endpoints",
          "total"
        ],
        "title": "WebhookEndpointListResponse",
        "description": "Response for webhook endpoint list."
      },
      "WebhookEndpointUpdate": {
        "properties": {
          "name": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 255,
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "description": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 1000
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "url": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2000
              },
              {
                "type": "null"
              }
            ],
            "title": "Url"
          },
          "event_types": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/WebhookEventType"
                },
                "type": "array",
                "maxItems": 10,
                "minItems": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Event Types"
          },
          "filters": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/WebhookFilters"
              },
              {
                "type": "null"
              }
            ]
          },
          "custom_headers": {
            "anyOf": [
              {
                "additionalProperties": {
                  "type": "string"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Custom Headers"
          },
          "payload_format": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/WebhookPayloadFormat"
              },
              {
                "type": "null"
              }
            ]
          },
          "include_context": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Include Context"
          },
          "batching_enabled": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Batching Enabled"
          },
          "batch_size": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 1000,
                "minimum": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Batch Size"
          },
          "batch_window_seconds": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 3600,
                "minimum": 10
              },
              {
                "type": "null"
              }
            ],
            "title": "Batch Window Seconds"
          },
          "max_retries": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 10,
                "minimum": 0
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Retries"
          },
          "timeout_seconds": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 120,
                "minimum": 5
              },
              {
                "type": "null"
              }
            ],
            "title": "Timeout Seconds"
          },
          "is_active": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Is Active"
          }
        },
        "type": "object",
        "title": "WebhookEndpointUpdate",
        "description": "Request model for updating a webhook endpoint."
      },
      "WebhookEventType": {
        "type": "string",
        "enum": [
          "alert.triggered",
          "alert.resolved",
          "export.completed",
          "export.failed",
          "goal.reached"
        ],
        "title": "WebhookEventType",
        "description": "Types of events that can trigger webhooks."
      },
      "WebhookEventTypeInfo": {
        "properties": {
          "type": {
            "$ref": "#/components/schemas/WebhookEventType"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "description": {
            "type": "string",
            "title": "Description"
          },
          "schema_url": {
            "type": "string",
            "title": "Schema Url"
          }
        },
        "type": "object",
        "required": [
          "type",
          "name",
          "description",
          "schema_url"
        ],
        "title": "WebhookEventTypeInfo",
        "description": "Information about an event type."
      },
      "WebhookEventTypesResponse": {
        "properties": {
          "event_types": {
            "items": {
              "$ref": "#/components/schemas/WebhookEventTypeInfo"
            },
            "type": "array",
            "title": "Event Types"
          }
        },
        "type": "object",
        "required": [
          "event_types"
        ],
        "title": "WebhookEventTypesResponse",
        "description": "Response listing available event types."
      },
      "WebhookFilters": {
        "properties": {
          "alert_types": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Alert Types",
            "description": "Filter by alert types (traffic_spike, conversion_change, etc.)"
          },
          "metrics": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Metrics",
            "description": "Filter by metrics (pageviews, conversions, etc.)"
          },
          "min_change_percentage": {
            "anyOf": [
              {
                "type": "number",
                "maximum": 1000,
                "minimum": 0
              },
              {
                "type": "string",
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Min Change Percentage",
            "description": "Minimum change percentage to trigger"
          },
          "severity": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Severity",
            "description": "Filter by severity (info, warning, critical)"
          },
          "tags": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tags",
            "description": "Filter by custom tags"
          }
        },
        "type": "object",
        "title": "WebhookFilters",
        "description": "Filters to apply to webhook events."
      },
      "WebhookPayloadFormat": {
        "type": "string",
        "enum": [
          "json",
          "json_lines"
        ],
        "title": "WebhookPayloadFormat",
        "description": "Webhook payload format."
      },
      "WebhookReplayRequest": {
        "properties": {
          "force": {
            "type": "boolean",
            "title": "Force",
            "description": "Force replay even if already succeeded",
            "default": false
          }
        },
        "type": "object",
        "title": "WebhookReplayRequest",
        "description": "Request to replay a failed delivery."
      },
      "WebhookReplayResponse": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success"
          },
          "new_delivery_id": {
            "type": "string",
            "format": "uuid",
            "title": "New Delivery Id"
          },
          "message": {
            "type": "string",
            "title": "Message"
          }
        },
        "type": "object",
        "required": [
          "success",
          "new_delivery_id",
          "message"
        ],
        "title": "WebhookReplayResponse",
        "description": "Response from webhook replay."
      },
      "WebhookRotateSecretResponse": {
        "properties": {
          "new_secret": {
            "type": "string",
            "title": "New Secret",
            "description": "New webhook secret (show only once)"
          },
          "previous_secret_expires_at": {
            "type": "string",
            "format": "date-time",
            "title": "Previous Secret Expires At",
            "description": "When the old secret stops working"
          },
          "secret_version": {
            "type": "integer",
            "title": "Secret Version"
          }
        },
        "type": "object",
        "required": [
          "new_secret",
          "previous_secret_expires_at",
          "secret_version"
        ],
        "title": "WebhookRotateSecretResponse",
        "description": "Response from secret rotation."
      },
      "WebhookStats": {
        "properties": {
          "endpoint_id": {
            "type": "string",
            "format": "uuid",
            "title": "Endpoint Id"
          },
          "period_start": {
            "type": "string",
            "format": "date-time",
            "title": "Period Start"
          },
          "period_end": {
            "type": "string",
            "format": "date-time",
            "title": "Period End"
          },
          "delivery_count": {
            "type": "integer",
            "title": "Delivery Count"
          },
          "success_count": {
            "type": "integer",
            "title": "Success Count"
          },
          "failure_count": {
            "type": "integer",
            "title": "Failure Count"
          },
          "retry_count": {
            "type": "integer",
            "title": "Retry Count"
          },
          "success_rate": {
            "type": "number",
            "title": "Success Rate"
          },
          "avg_response_time_ms": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Avg Response Time Ms"
          },
          "p95_response_time_ms": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "P95 Response Time Ms"
          },
          "total_payload_bytes": {
            "type": "integer",
            "title": "Total Payload Bytes"
          }
        },
        "type": "object",
        "required": [
          "endpoint_id",
          "period_start",
          "period_end",
          "delivery_count",
          "success_count",
          "failure_count",
          "retry_count",
          "success_rate",
          "avg_response_time_ms",
          "p95_response_time_ms",
          "total_payload_bytes"
        ],
        "title": "WebhookStats",
        "description": "Statistics for a webhook endpoint."
      },
      "WebhookStatsResponse": {
        "properties": {
          "endpoint": {
            "$ref": "#/components/schemas/WebhookEndpointInfo"
          },
          "stats": {
            "$ref": "#/components/schemas/WebhookStats"
          },
          "recent_failures": {
            "items": {
              "$ref": "#/components/schemas/WebhookDeliveryInfo"
            },
            "type": "array",
            "title": "Recent Failures"
          }
        },
        "type": "object",
        "required": [
          "endpoint",
          "stats",
          "recent_failures"
        ],
        "title": "WebhookStatsResponse",
        "description": "Response for webhook statistics."
      },
      "WebhookTestRequest": {
        "properties": {
          "event_type": {
            "$ref": "#/components/schemas/WebhookEventType",
            "description": "Event type to simulate",
            "default": "alert.triggered"
          },
          "include_sample_context": {
            "type": "boolean",
            "title": "Include Sample Context",
            "description": "Include sample context data",
            "default": true
          }
        },
        "type": "object",
        "title": "WebhookTestRequest",
        "description": "Request to send a test webhook."
      },
      "WebhookTestResponse": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success"
          },
          "delivery_id": {
            "type": "string",
            "format": "uuid",
            "title": "Delivery Id"
          },
          "response_status_code": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Response Status Code"
          },
          "response_time_ms": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Response Time Ms"
          },
          "response_body": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Response Body"
          },
          "error_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error Type"
          },
          "error_message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error Message"
          },
          "signature_header": {
            "type": "string",
            "title": "Signature Header"
          },
          "timestamp_header": {
            "type": "string",
            "title": "Timestamp Header"
          }
        },
        "type": "object",
        "required": [
          "success",
          "delivery_id",
          "response_status_code",
          "response_time_ms",
          "response_body",
          "error_type",
          "error_message",
          "signature_header",
          "timestamp_header"
        ],
        "title": "WebhookTestResponse",
        "description": "Response from webhook test."
      },
      "sealmetrics_api__models__accounts__AccountListResponse": {
        "properties": {
          "total": {
            "type": "integer",
            "title": "Total"
          },
          "sites": {
            "items": {
              "$ref": "#/components/schemas/AccountInfo"
            },
            "type": "array",
            "title": "Sites",
            "description": "Expose 'sites' as the public JSON field (replaces 'accounts').",
            "readOnly": true
          }
        },
        "type": "object",
        "required": [
          "total",
          "sites"
        ],
        "title": "AccountListResponse",
        "description": "Response for account list endpoint."
      },
      "sealmetrics_api__models__users__UserListResponse": {
        "properties": {
          "users": {
            "items": {
              "$ref": "#/components/schemas/UserInfo"
            },
            "type": "array",
            "title": "Users"
          },
          "total": {
            "type": "integer",
            "title": "Total"
          }
        },
        "type": "object",
        "required": [
          "users",
          "total"
        ],
        "title": "UserListResponse",
        "description": "Response for user list endpoint."
      },
      "sealmetrics_api__routers__lens__InsightSummaryResponse": {
        "properties": {
          "total_count": {
            "type": "integer",
            "title": "Total Count",
            "default": 0
          },
          "unread_count": {
            "type": "integer",
            "title": "Unread Count",
            "default": 0
          },
          "red_count": {
            "type": "integer",
            "title": "Red Count",
            "default": 0
          },
          "yellow_count": {
            "type": "integer",
            "title": "Yellow Count",
            "default": 0
          },
          "green_count": {
            "type": "integer",
            "title": "Green Count",
            "default": 0
          },
          "has_critical": {
            "type": "boolean",
            "title": "Has Critical",
            "default": false
          }
        },
        "type": "object",
        "title": "InsightSummaryResponse",
        "description": "Insight summary for badges/notifications."
      },
      "sealmetrics_api__routers__lens_reports__InsightSummaryResponse": {
        "properties": {
          "title": {
            "type": "string",
            "title": "Title"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "severity": {
            "type": "string",
            "title": "Severity"
          },
          "economic_impact": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Economic Impact"
          },
          "category": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Category"
          }
        },
        "type": "object",
        "required": [
          "title",
          "severity"
        ],
        "title": "InsightSummaryResponse",
        "description": "Insight summary item."
      },
      "ErrorDetail": {
        "type": "object",
        "description": "Machine-readable error body. `code` is stable — branch on it, not on `message`.",
        "properties": {
          "code": {
            "type": "string",
            "description": "Stable error code. See https://docs.sealmetrics.com/api/errors",
            "examples": [
              "unauthorized",
              "rate_limit_exceeded",
              "not_found"
            ]
          },
          "message": {
            "type": "string",
            "description": "Human-readable description. May change; do not parse."
          },
          "detail": {
            "description": "Optional structured context (field-level validation errors, quota info, …)."
          }
        },
        "required": [
          "code",
          "message"
        ]
      },
      "ErrorResponse": {
        "type": "object",
        "description": "Every non-2xx response from the API uses this envelope.",
        "properties": {
          "error": {
            "$ref": "#/components/schemas/ErrorDetail"
          },
          "request_id": {
            "type": "string",
            "description": "Correlation id, also returned in the `X-Request-ID` response header. Quote it in support requests."
          }
        },
        "required": [
          "error"
        ]
      },
      "ConditionGroupInput": {
        "properties": {
          "conditions": {
            "items": {
              "$ref": "#/components/schemas/FilterCondition"
            },
            "type": "array",
            "maxItems": 10,
            "title": "Conditions",
            "description": "List of filter conditions (combined with AND within group)"
          }
        },
        "type": "object",
        "title": "ConditionGroup",
        "description": "A group of filter conditions combined with AND logic.\n\nUsed within SegmentFilters to create OR logic between groups.\n\nExample:\n    {\"conditions\": [\n        {\"field\": \"country\", \"operator\": \"eq\", \"value\": \"ES\"},\n        {\"field\": \"device_type\", \"operator\": \"eq\", \"value\": \"mobile\"}\n    ]}\n\nThis generates: (country = 'ES' AND device_type = 'mobile')"
      },
      "ConditionGroupOutput": {
        "properties": {
          "conditions": {
            "items": {
              "$ref": "#/components/schemas/FilterCondition"
            },
            "type": "array",
            "maxItems": 10,
            "title": "Conditions",
            "description": "List of filter conditions (combined with AND within group)"
          }
        },
        "type": "object",
        "title": "ConditionGroup",
        "description": "A group of filter conditions combined with AND logic.\n\nUsed within SegmentFilters to create OR logic between groups.\n\nExample:\n    {\"conditions\": [\n        {\"field\": \"country\", \"operator\": \"eq\", \"value\": \"ES\"},\n        {\"field\": \"device_type\", \"operator\": \"eq\", \"value\": \"mobile\"}\n    ]}\n\nThis generates: (country = 'ES' AND device_type = 'mobile')"
      },
      "PixelConfigInput": {
        "properties": {
          "type": {
            "$ref": "#/components/schemas/PixelType",
            "description": "Type of pixel (pageview, conversion, microconversion)"
          },
          "conversion_type": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 50
              },
              {
                "type": "null"
              }
            ],
            "title": "Conversion Type",
            "description": "Conversion type (e.g., purchase, signup)"
          },
          "revenue": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PixelValue"
              },
              {
                "type": "null"
              }
            ],
            "description": "Revenue value for conversions"
          },
          "currency": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PixelValue"
              },
              {
                "type": "null"
              }
            ],
            "description": "Currency code (e.g., EUR, USD)"
          },
          "properties": {
            "items": {
              "$ref": "#/components/schemas/PixelPropertyInput"
            },
            "type": "array",
            "maxItems": 20,
            "title": "Properties",
            "description": "Custom properties for the event"
          }
        },
        "type": "object",
        "required": [
          "type"
        ],
        "title": "PixelConfig",
        "description": "Configuration for a saved pixel.\n\nThis is stored as JSONB in the database."
      },
      "PixelConfigOutput": {
        "properties": {
          "type": {
            "$ref": "#/components/schemas/PixelType",
            "description": "Type of pixel (pageview, conversion, microconversion)"
          },
          "conversion_type": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 50
              },
              {
                "type": "null"
              }
            ],
            "title": "Conversion Type",
            "description": "Conversion type (e.g., purchase, signup)"
          },
          "revenue": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PixelValue"
              },
              {
                "type": "null"
              }
            ],
            "description": "Revenue value for conversions"
          },
          "currency": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PixelValue"
              },
              {
                "type": "null"
              }
            ],
            "description": "Currency code (e.g., EUR, USD)"
          },
          "properties": {
            "items": {
              "$ref": "#/components/schemas/PixelPropertyOutput"
            },
            "type": "array",
            "maxItems": 20,
            "title": "Properties",
            "description": "Custom properties for the event"
          }
        },
        "type": "object",
        "required": [
          "type"
        ],
        "title": "PixelConfig",
        "description": "Configuration for a saved pixel.\n\nThis is stored as JSONB in the database."
      },
      "PixelPropertyInput": {
        "properties": {
          "key": {
            "type": "string",
            "maxLength": 50,
            "minLength": 1,
            "title": "Key",
            "description": "Property key"
          },
          "value": {
            "$ref": "#/components/schemas/PixelValue",
            "description": "Property value with type"
          }
        },
        "type": "object",
        "required": [
          "key",
          "value"
        ],
        "title": "PixelProperty",
        "description": "A custom property for the pixel.\n\nExample:\n    {\"key\": \"brand\", \"value\": {\"type\": \"gtm\", \"value\": \"{{product_brand}}\"}}"
      },
      "PixelPropertyOutput": {
        "properties": {
          "key": {
            "type": "string",
            "maxLength": 50,
            "minLength": 1,
            "title": "Key",
            "description": "Property key"
          },
          "value": {
            "$ref": "#/components/schemas/PixelValue",
            "description": "Property value with type"
          }
        },
        "type": "object",
        "required": [
          "key",
          "value"
        ],
        "title": "PixelProperty",
        "description": "A custom property for the pixel.\n\nExample:\n    {\"key\": \"brand\", \"value\": {\"type\": \"gtm\", \"value\": \"{{product_brand}}\"}}"
      },
      "SegmentFiltersInput": {
        "properties": {
          "conditions": {
            "items": {
              "$ref": "#/components/schemas/FilterCondition"
            },
            "type": "array",
            "maxItems": 20,
            "title": "Conditions",
            "description": "List of filter conditions (combined with AND). Use for simple segments."
          },
          "groups": {
            "items": {
              "$ref": "#/components/schemas/ConditionGroupInput"
            },
            "type": "array",
            "maxItems": 10,
            "title": "Groups",
            "description": "List of condition groups (combined with OR between groups, AND within each group)"
          },
          "not_groups": {
            "items": {
              "$ref": "#/components/schemas/ConditionGroupInput"
            },
            "type": "array",
            "maxItems": 10,
            "title": "Not Groups",
            "description": "List of condition groups to exclude (each group is negated with NOT)"
          }
        },
        "type": "object",
        "title": "SegmentFilters",
        "description": "Collection of filter conditions for a segment.\n\nSupports three modes:\n1. Simple mode (backwards compatible): Use 'conditions' field directly.\n   All conditions are combined with AND logic.\n\n2. Advanced mode: Use 'groups' field with multiple condition groups.\n   Conditions within each group are combined with AND.\n   Groups are combined with OR logic.\n\n3. Exclusion mode: Use 'not_groups' to exclude matching records.\n   Each not_group is negated with NOT and combined with AND.\n\nExamples:\n    Simple (AND only):\n    {\"conditions\": [\n        {\"field\": \"country\", \"operator\": \"eq\", \"value\": \"ES\"},\n        {\"field\": \"device_type\", \"operator\": \"eq\", \"value\": \"mobile\"}\n    ]}\n    -> (country = 'ES' AND device_type = 'mobile')\n\n    Advanced (OR between groups):\n    {\"groups\": [\n        {\"conditions\": [{\"field\": \"country\", \"operator\": \"eq\", \"value\": \"ES\"}]},\n        {\"conditions\": [{\"field\": \"country\", \"operator\": \"eq\", \"value\": \"FR\"}]}\n    ]}\n    -> (country = 'ES') OR (country = 'FR')\n\n    Complex (AND within groups, OR between):\n    {\"groups\": [\n        {\"conditions\": [\n            {\"field\": \"country\", \"operator\": \"eq\", \"value\": \"ES\"},\n            {\"field\": \"device_type\", \"operator\": \"eq\", \"value\": \"mobile\"}\n        ]},\n        {\"conditions\": [\n            {\"field\": \"country\", \"operator\": \"eq\", \"value\": \"FR\"},\n            {\"field\": \"device_type\", \"operator\": \"eq\", \"value\": \"desktop\"}\n        ]}\n    ]}\n    -> (country = 'ES' AND device_type = 'mobile') OR (country = 'FR' AND device_type = 'desktop')\n\n    With NOT groups (exclusions):\n    {\"conditions\": [\n        {\"field\": \"country\", \"operator\": \"eq\", \"value\": \"ES\"}\n    ],\n    \"not_groups\": [\n        {\"conditions\": [{\"field\": \"utm_source\", \"operator\": \"eq\", \"value\": \"spam\"}]},\n        {\"conditions\": [{\"field\": \"utm_source\", \"operator\": \"eq\", \"value\": \"bot\"}]}\n    ]}\n    -> country = 'ES' AND NOT (utm_source = 'spam') AND NOT (utm_source = 'bot')\n\n    Combined OR and NOT:\n    {\"groups\": [\n        {\"conditions\": [{\"field\": \"country\", \"operator\": \"eq\", \"value\": \"ES\"}]},\n        {\"conditions\": [{\"field\": \"country\", \"operator\": \"eq\", \"value\": \"FR\"}]}\n    ],\n    \"not_groups\": [\n        {\"conditions\": [{\"field\": \"device_type\", \"operator\": \"eq\", \"value\": \"tablet\"}]}\n    ]}\n    -> ((country = 'ES') OR (country = 'FR')) AND NOT (device_type = 'tablet')"
      },
      "SegmentFiltersOutput": {
        "properties": {
          "conditions": {
            "items": {
              "$ref": "#/components/schemas/FilterCondition"
            },
            "type": "array",
            "maxItems": 20,
            "title": "Conditions",
            "description": "List of filter conditions (combined with AND). Use for simple segments."
          },
          "groups": {
            "items": {
              "$ref": "#/components/schemas/ConditionGroupOutput"
            },
            "type": "array",
            "maxItems": 10,
            "title": "Groups",
            "description": "List of condition groups (combined with OR between groups, AND within each group)"
          },
          "not_groups": {
            "items": {
              "$ref": "#/components/schemas/ConditionGroupOutput"
            },
            "type": "array",
            "maxItems": 10,
            "title": "Not Groups",
            "description": "List of condition groups to exclude (each group is negated with NOT)"
          }
        },
        "type": "object",
        "title": "SegmentFilters",
        "description": "Collection of filter conditions for a segment.\n\nSupports three modes:\n1. Simple mode (backwards compatible): Use 'conditions' field directly.\n   All conditions are combined with AND logic.\n\n2. Advanced mode: Use 'groups' field with multiple condition groups.\n   Conditions within each group are combined with AND.\n   Groups are combined with OR logic.\n\n3. Exclusion mode: Use 'not_groups' to exclude matching records.\n   Each not_group is negated with NOT and combined with AND.\n\nExamples:\n    Simple (AND only):\n    {\"conditions\": [\n        {\"field\": \"country\", \"operator\": \"eq\", \"value\": \"ES\"},\n        {\"field\": \"device_type\", \"operator\": \"eq\", \"value\": \"mobile\"}\n    ]}\n    -> (country = 'ES' AND device_type = 'mobile')\n\n    Advanced (OR between groups):\n    {\"groups\": [\n        {\"conditions\": [{\"field\": \"country\", \"operator\": \"eq\", \"value\": \"ES\"}]},\n        {\"conditions\": [{\"field\": \"country\", \"operator\": \"eq\", \"value\": \"FR\"}]}\n    ]}\n    -> (country = 'ES') OR (country = 'FR')\n\n    Complex (AND within groups, OR between):\n    {\"groups\": [\n        {\"conditions\": [\n            {\"field\": \"country\", \"operator\": \"eq\", \"value\": \"ES\"},\n            {\"field\": \"device_type\", \"operator\": \"eq\", \"value\": \"mobile\"}\n        ]},\n        {\"conditions\": [\n            {\"field\": \"country\", \"operator\": \"eq\", \"value\": \"FR\"},\n            {\"field\": \"device_type\", \"operator\": \"eq\", \"value\": \"desktop\"}\n        ]}\n    ]}\n    -> (country = 'ES' AND device_type = 'mobile') OR (country = 'FR' AND device_type = 'desktop')\n\n    With NOT groups (exclusions):\n    {\"conditions\": [\n        {\"field\": \"country\", \"operator\": \"eq\", \"value\": \"ES\"}\n    ],\n    \"not_groups\": [\n        {\"conditions\": [{\"field\": \"utm_source\", \"operator\": \"eq\", \"value\": \"spam\"}]},\n        {\"conditions\": [{\"field\": \"utm_source\", \"operator\": \"eq\", \"value\": \"bot\"}]}\n    ]}\n    -> country = 'ES' AND NOT (utm_source = 'spam') AND NOT (utm_source = 'bot')\n\n    Combined OR and NOT:\n    {\"groups\": [\n        {\"conditions\": [{\"field\": \"country\", \"operator\": \"eq\", \"value\": \"ES\"}]},\n        {\"conditions\": [{\"field\": \"country\", \"operator\": \"eq\", \"value\": \"FR\"}]}\n    ],\n    \"not_groups\": [\n        {\"conditions\": [{\"field\": \"device_type\", \"operator\": \"eq\", \"value\": \"tablet\"}]}\n    ]}\n    -> ((country = 'ES') OR (country = 'FR')) AND NOT (device_type = 'tablet')"
      }
    },
    "securitySchemes": {
      "HTTPBearer": {
        "type": "http",
        "scheme": "bearer"
      },
      "APIKeyHeader": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-Key"
      }
    },
    "responses": {
      "Unauthorized": {
        "description": "Missing or invalid authentication.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            },
            "example": {
              "error": {
                "code": "unauthorized",
                "message": "Authentication required"
              },
              "request_id": "3f8b1c22-9d0e-4a71-9d2f-1c8a5b6e7f90"
            }
          }
        }
      },
      "Forbidden": {
        "description": "Authenticated, but not allowed to access this resource.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            },
            "example": {
              "error": {
                "code": "forbidden",
                "message": "Insufficient permissions"
              },
              "request_id": "3f8b1c22-9d0e-4a71-9d2f-1c8a5b6e7f90"
            }
          }
        }
      },
      "NotFound": {
        "description": "The resource does not exist.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            },
            "example": {
              "error": {
                "code": "not_found",
                "message": "Resource not found"
              },
              "request_id": "3f8b1c22-9d0e-4a71-9d2f-1c8a5b6e7f90"
            }
          }
        }
      },
      "TooManyRequests": {
        "description": "Rate limit exceeded. Honour `Retry-After` before retrying.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            },
            "example": {
              "error": {
                "code": "rate_limit_exceeded",
                "message": "Too many requests. Please retry after 15 seconds."
              },
              "request_id": "3f8b1c22-9d0e-4a71-9d2f-1c8a5b6e7f90"
            }
          }
        },
        "headers": {
          "Retry-After": {
            "description": "Seconds to wait before retrying.",
            "schema": {
              "type": "integer"
            }
          },
          "X-RateLimit-Limit": {
            "description": "Requests allowed per minute.",
            "schema": {
              "type": "integer"
            }
          },
          "X-RateLimit-Remaining": {
            "description": "Requests left in the current window.",
            "schema": {
              "type": "integer"
            }
          },
          "X-RateLimit-Reset": {
            "description": "Unix timestamp when the window resets.",
            "schema": {
              "type": "integer"
            }
          }
        }
      },
      "InternalError": {
        "description": "Unexpected server error. Safe to retry with backoff.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            },
            "example": {
              "error": {
                "code": "internal_error",
                "message": "An internal error occurred"
              },
              "request_id": "3f8b1c22-9d0e-4a71-9d2f-1c8a5b6e7f90"
            }
          }
        }
      },
      "ServiceUnavailable": {
        "description": "A dependency is temporarily unavailable. Honour `Retry-After`.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            },
            "example": {
              "error": {
                "code": "database_unavailable",
                "message": "Database temporarily unavailable. Please retry later."
              },
              "request_id": "3f8b1c22-9d0e-4a71-9d2f-1c8a5b6e7f90"
            }
          }
        },
        "headers": {
          "Retry-After": {
            "description": "Seconds to wait before retrying.",
            "schema": {
              "type": "integer"
            }
          }
        }
      }
    }
  },
  "servers": [
    {
      "url": "https://my.sealmetrics.com",
      "description": "Production"
    }
  ],
  "externalDocs": {
    "description": "SealMetrics API documentation",
    "url": "https://docs.sealmetrics.com/api"
  },
  "security": [
    {
      "HTTPBearer": []
    },
    {
      "APIKeyHeader": []
    }
  ],
  "tags": [
    {
      "name": "Stats",
      "description": "Analytics reports: traffic, conversions, attribution, audience and content.",
      "externalDocs": {
        "description": "Guide",
        "url": "https://docs.sealmetrics.com/api/stats"
      }
    },
    {
      "name": "Aggregate Stats",
      "description": "Portfolio metrics rolled up across several sites in one call.",
      "externalDocs": {
        "description": "Guide",
        "url": "https://docs.sealmetrics.com/api/stats-aggregate"
      }
    },
    {
      "name": "Sites",
      "description": "Create and manage sites, authorized domains, UTM mappings and the tracking pixel.",
      "externalDocs": {
        "description": "Guide",
        "url": "https://docs.sealmetrics.com/api/sites"
      }
    },
    {
      "name": "Organizations",
      "description": "Organizations, members, roles and invitations.",
      "externalDocs": {
        "description": "Guide",
        "url": "https://docs.sealmetrics.com/api/organizations"
      }
    },
    {
      "name": "Authentication",
      "description": "Login, refresh, sessions, password reset and the current user.",
      "externalDocs": {
        "description": "Guide",
        "url": "https://docs.sealmetrics.com/api/authentication"
      }
    },
    {
      "name": "API Tokens",
      "description": "Read-only personal API tokens with scopes, site restrictions and expiry.",
      "externalDocs": {
        "description": "Guide",
        "url": "https://docs.sealmetrics.com/api/api-tokens"
      }
    },
    {
      "name": "Two-Factor Auth",
      "description": "TOTP second factor: enable, verify, disable and backup codes.",
      "externalDocs": {
        "description": "Guide",
        "url": "https://docs.sealmetrics.com/api/2fa"
      }
    },
    {
      "name": "Email Verification",
      "description": "Post-registration email confirmation flow.",
      "externalDocs": {
        "description": "Guide",
        "url": "https://docs.sealmetrics.com/api/email-verification"
      }
    },
    {
      "name": "Registration",
      "description": "Account registration.",
      "externalDocs": {
        "description": "Guide",
        "url": "https://docs.sealmetrics.com/api/authentication"
      }
    },
    {
      "name": "Invitations",
      "description": "Accept and inspect organization invitations.",
      "externalDocs": {
        "description": "Guide",
        "url": "https://docs.sealmetrics.com/api/invitations"
      }
    },
    {
      "name": "Segments",
      "description": "Saved segments and the filter grammar used across stats endpoints.",
      "externalDocs": {
        "description": "Guide",
        "url": "https://docs.sealmetrics.com/api/segments"
      }
    },
    {
      "name": "Batch",
      "description": "Run up to 50 analytics queries in one request, with dependency ordering.",
      "externalDocs": {
        "description": "Guide",
        "url": "https://docs.sealmetrics.com/api/batch"
      }
    },
    {
      "name": "Exports",
      "description": "Asynchronous bulk export jobs, streaming exports and download tokens.",
      "externalDocs": {
        "description": "Guide",
        "url": "https://docs.sealmetrics.com/api/exports"
      }
    },
    {
      "name": "Webhooks",
      "description": "Webhook endpoints, event types, deliveries, replay and signature rotation.",
      "externalDocs": {
        "description": "Guide",
        "url": "https://docs.sealmetrics.com/api/webhooks"
      }
    },
    {
      "name": "Alerts",
      "description": "Alert rules, history and statistics.",
      "externalDocs": {
        "description": "Guide",
        "url": "https://docs.sealmetrics.com/api/alerts"
      }
    },
    {
      "name": "Email Reports",
      "description": "Scheduled email reports.",
      "externalDocs": {
        "description": "Guide",
        "url": "https://docs.sealmetrics.com/api/email-reports"
      }
    },
    {
      "name": "Shared Dashboards",
      "description": "Public share links and embeds for dashboards.",
      "externalDocs": {
        "description": "Guide",
        "url": "https://docs.sealmetrics.com/api/shared-dashboards"
      }
    },
    {
      "name": "IP Allowlist",
      "description": "Restrict API access to a set of IP patterns.",
      "externalDocs": {
        "description": "Guide",
        "url": "https://docs.sealmetrics.com/api/ip-allowlist"
      }
    },
    {
      "name": "Blocklist IPs",
      "description": "Exclude IPs from being tracked.",
      "externalDocs": {
        "description": "Guide",
        "url": "https://docs.sealmetrics.com/api/blocklist-ips"
      }
    },
    {
      "name": "Channel Groups",
      "description": "Custom channel grouping rules with a drafts/test/publish flow.",
      "externalDocs": {
        "description": "Guide",
        "url": "https://docs.sealmetrics.com/api/channel-groups"
      }
    },
    {
      "name": "Passthrough Referrers",
      "description": "Domains that preserve session attribution instead of creating a referral.",
      "externalDocs": {
        "description": "Guide",
        "url": "https://docs.sealmetrics.com/api/passthrough-referrers"
      }
    },
    {
      "name": "Referrer Mappings",
      "description": "Map referrer domains to friendly source names.",
      "externalDocs": {
        "description": "Guide",
        "url": "https://docs.sealmetrics.com/api/referrer-mappings"
      }
    },
    {
      "name": "Bot Stats",
      "description": "Bot and suspicious-session detection metrics.",
      "externalDocs": {
        "description": "Guide",
        "url": "https://docs.sealmetrics.com/api/bot-stats"
      }
    },
    {
      "name": "BigQuery Integration",
      "description": "Stream your analytics data into Google BigQuery.",
      "externalDocs": {
        "description": "Guide",
        "url": "https://docs.sealmetrics.com/api/bigquery"
      }
    },
    {
      "name": "Saved Pixels",
      "description": "Reusable conversion pixel definitions.",
      "externalDocs": {
        "description": "Guide",
        "url": "https://docs.sealmetrics.com/api/saved-pixels"
      }
    },
    {
      "name": "LENS Insights",
      "description": "LENS AI insights.",
      "externalDocs": {
        "description": "Guide",
        "url": "https://docs.sealmetrics.com/lens/api/lens-endpoints"
      }
    },
    {
      "name": "LENS Reports",
      "description": "LENS weekly and monthly reports.",
      "externalDocs": {
        "description": "Guide",
        "url": "https://docs.sealmetrics.com/lens/api/lens-endpoints"
      }
    },
    {
      "name": "Assistant",
      "description": "Seal AI assistant chat endpoints.",
      "externalDocs": {
        "description": "Guide",
        "url": "https://docs.sealmetrics.com/lens/api/lens-endpoints"
      }
    },
    {
      "name": "Audit",
      "description": "Account audit log.",
      "externalDocs": {
        "description": "Guide",
        "url": "https://docs.sealmetrics.com/api/audit"
      }
    },
    {
      "name": "Migration",
      "description": "Migration jobs from the legacy v1 platform.",
      "externalDocs": {
        "description": "Guide",
        "url": "https://docs.sealmetrics.com/api/migration-from-v1"
      }
    },
    {
      "name": "Users",
      "description": "The current user, preferences and per-user settings.",
      "externalDocs": {
        "description": "Guide",
        "url": "https://docs.sealmetrics.com/api/users"
      }
    },
    {
      "name": "Health",
      "description": "Liveness and readiness probes. Unauthenticated and never rate-limited.",
      "externalDocs": {
        "description": "Guide",
        "url": "https://docs.sealmetrics.com/api/for-agents"
      }
    },
    {
      "name": "Tracker",
      "description": "The tracking script served to browsers.",
      "externalDocs": {
        "description": "Guide",
        "url": "https://docs.sealmetrics.com/implementation/tracker/api-reference"
      }
    },
    {
      "name": "Maintenance",
      "description": "Internal maintenance jobs."
    }
  ]
}
