# Generated by scripts/generate-openapi.mjs. Do not edit this file by hand.
# Routes discovered: 146
openapi: "3.0.3"
info:
  title: "Lead Flow IA API"
  version: "0.1.0"
  description: "Contrato OpenAPI gerado a partir das rotas Next.js em ia-system/app/api. Use como inventario Swagger e valide payloads especificos nos exemplos da documentacao de API."
servers:
  -
    url: "{baseUrl}"
    variables:
      baseUrl:
        default: "https://app.example.com"
        description: "Dominio publico da instalacao Lead Flow IA."
tags:
  -
    name: "admin"
    description: "Superadmin SaaS, clientes, planos, billing, licencas, branding e sistema."
  -
    name: "agent-prompts"
    description: "Prompts reutilizaveis para agentes."
  -
    name: "agents"
    description: "Agentes IA e configuracoes relacionadas."
  -
    name: "audit-logs"
    description: "Auditoria do workspace."
  -
    name: "billing"
    description: "Billing comercial e webhooks do gateway."
  -
    name: "broadcasts"
    description: "Campanhas e disparos WhatsApp."
  -
    name: "checkouts"
    description: "Checkouts publicos de assinatura."
  -
    name: "contacts"
    description: "Contatos, tags, timeline e conversas."
  -
    name: "cron"
    description: "Tarefas internas agendadas."
  -
    name: "custom-fields"
    description: "Campos personalizados de contatos."
  -
    name: "debug"
    description: "Rotas de diagnostico tecnico. Nao expor em producao publica."
  -
    name: "debug-contacts"
    description: "Rotas de diagnostico tecnico. Nao expor em producao publica."
  -
    name: "flows"
    description: "Automacoes, execucoes e webhooks de fluxo."
  -
    name: "fup-rules"
    description: "Regras de follow-up."
  -
    name: "health"
    description: "Saude da aplicacao."
  -
    name: "instances"
    description: "Instancias de WhatsApp."
  -
    name: "intelligence"
    description: "Inteligencia comercial, relatorios e analises."
  -
    name: "internal"
    description: "Callbacks internos entre servicos."
  -
    name: "knowledge"
    description: "Bases de conhecimento e fontes RAG."
  -
    name: "kpis"
    description: "Indicadores do workspace."
  -
    name: "leads"
    description: "Leads, estagios, mensagens e takeover humano."
  -
    name: "learning"
    description: "Rotinas de aprendizado e otimizacao."
  -
    name: "media"
    description: "Upload e entrega de midias."
  -
    name: "messages"
    description: "Mensagens operacionais."
  -
    name: "metrics"
    description: "Metricas agregadas."
  -
    name: "payment-gateways"
    description: "Gateways de pagamento do workspace."
  -
    name: "pipelines"
    description: "Pipelines e estagios."
  -
    name: "products"
    description: "Produtos e ofertas."
  -
    name: "settings"
    description: "Configuracoes e chaves de provedores."
  -
    name: "setup"
    description: "Setup inicial da instalacao."
  -
    name: "sse"
    description: "Eventos server-sent para atualizacao em tempo real."
  -
    name: "tags"
    description: "Tags do CRM."
  -
    name: "templates"
    description: "Templates de mensagem."
  -
    name: "test"
    description: "Rotas auxiliares de teste. Devem ficar bloqueadas em producao."
  -
    name: "tools"
    description: "Ferramentas HTTP usadas por agentes."
  -
    name: "users"
    description: "Usuarios do workspace."
  -
    name: "v1"
    description: "API publica versionada."
  -
    name: "voice"
    description: "Onboarding e operacao de voz."
  -
    name: "voice-calls"
    description: "Chamadas de voz."
  -
    name: "voice-instances"
    description: "Instancias de voz."
  -
    name: "voice-tools"
    description: "Ferramentas chamadas pelo provedor de voz."
  -
    name: "webhook"
    description: "Webhooks de provedores legados."
  -
    name: "webhooks"
    description: "Webhooks de provedores externos."
paths:
  "/api/admin/billing/config":
    get:
      tags:
        - "admin"
      summary: "Consulta configuracao Asaas"
      operationId: "getAdminBillingConfig"
      x-source-file: "ia-system/app/api/admin/billing/config/route.ts"
      security:
        -
          cookieAuth: []
      responses:
        200:
          description: "Configuracao Asaas mascarada."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/BillingConfigResponse"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
    post:
      tags:
        - "admin"
      summary: "Salva configuracao Asaas"
      operationId: "postAdminBillingConfig"
      x-source-file: "ia-system/app/api/admin/billing/config/route.ts"
      security:
        -
          cookieAuth: []
      requestBody:
        required: true
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/BillingConfigRequest"
      responses:
        200:
          description: "Configuracao Asaas salva."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/BillingConfigResponse"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/admin/branding":
    get:
      tags:
        - "admin"
      summary: "Consulta recurso em /api/admin/branding. Fonte: ia-system/app/api/admin/branding/route.ts."
      operationId: "getAdminBranding"
      x-source-file: "ia-system/app/api/admin/branding/route.ts"
      security:
        -
          cookieAuth: []
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
    post:
      tags:
        - "admin"
      summary: "Cria, executa ou enfileira recurso em /api/admin/branding. Fonte: ia-system/app/api/admin/branding/route.ts."
      operationId: "postAdminBranding"
      x-source-file: "ia-system/app/api/admin/branding/route.ts"
      security:
        -
          cookieAuth: []
      requestBody:
        required: false
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/GenericObject"
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/admin/checkouts":
    get:
      tags:
        - "admin"
      summary: "Lista links publicos de checkout"
      operationId: "getAdminCheckouts"
      x-source-file: "ia-system/app/api/admin/checkouts/route.ts"
      security:
        -
          cookieAuth: []
      responses:
        200:
          description: "Links de checkout."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/CheckoutsResponse"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
    post:
      tags:
        - "admin"
      summary: "Cria ou atualiza link publico de checkout"
      operationId: "postAdminCheckouts"
      x-source-file: "ia-system/app/api/admin/checkouts/route.ts"
      security:
        -
          cookieAuth: []
      requestBody:
        required: true
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/CheckoutCreateRequest"
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        201:
          description: "Checkout criado."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/CheckoutResponse"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        409:
          "$ref": "#/components/responses/Conflict"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/admin/customers/{id}":
    get:
      tags:
        - "admin"
      summary: "Consulta recurso em /api/admin/customers/{id}. Fonte: ia-system/app/api/admin/customers/[id]/route.ts."
      operationId: "getAdminCustomersId"
      x-source-file: "ia-system/app/api/admin/customers/[id]/route.ts"
      parameters:
        -
          name: "id"
          in: "path"
          required: true
          schema:
            type: "string"
          description: "Parametro de rota `id`."
      security:
        -
          cookieAuth: []
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
    post:
      tags:
        - "admin"
      summary: "Cria, executa ou enfileira recurso em /api/admin/customers/{id}. Fonte: ia-system/app/api/admin/customers/[id]/route.ts."
      operationId: "postAdminCustomersId"
      x-source-file: "ia-system/app/api/admin/customers/[id]/route.ts"
      parameters:
        -
          name: "id"
          in: "path"
          required: true
          schema:
            type: "string"
          description: "Parametro de rota `id`."
      security:
        -
          cookieAuth: []
      requestBody:
        required: false
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/GenericObject"
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
    patch:
      tags:
        - "admin"
      summary: "Atualiza parcialmente recurso em /api/admin/customers/{id}. Fonte: ia-system/app/api/admin/customers/[id]/route.ts."
      operationId: "patchAdminCustomersId"
      x-source-file: "ia-system/app/api/admin/customers/[id]/route.ts"
      parameters:
        -
          name: "id"
          in: "path"
          required: true
          schema:
            type: "string"
          description: "Parametro de rota `id`."
      security:
        -
          cookieAuth: []
      requestBody:
        required: false
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/GenericObject"
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/admin/customers":
    get:
      tags:
        - "admin"
      summary: "Lista clientes/workspaces assinantes"
      operationId: "getAdminCustomers"
      x-source-file: "ia-system/app/api/admin/customers/route.ts"
      security:
        -
          cookieAuth: []
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
    post:
      tags:
        - "admin"
      summary: "Cria, executa ou enfileira recurso em /api/admin/customers. Fonte: ia-system/app/api/admin/customers/route.ts."
      operationId: "postAdminCustomers"
      x-source-file: "ia-system/app/api/admin/customers/route.ts"
      security:
        -
          cookieAuth: []
      requestBody:
        required: false
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/GenericObject"
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/admin/features":
    get:
      tags:
        - "admin"
      summary: "Lista catalogo de features e limites"
      operationId: "getAdminFeatures"
      x-source-file: "ia-system/app/api/admin/features/route.ts"
      security:
        -
          cookieAuth: []
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/admin/licenses":
    get:
      tags:
        - "admin"
      summary: "Consulta recurso em /api/admin/licenses. Fonte: ia-system/app/api/admin/licenses/route.ts."
      operationId: "getAdminLicenses"
      x-source-file: "ia-system/app/api/admin/licenses/route.ts"
      security:
        -
          cookieAuth: []
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
    post:
      tags:
        - "admin"
      summary: "Cria, executa ou enfileira recurso em /api/admin/licenses. Fonte: ia-system/app/api/admin/licenses/route.ts."
      operationId: "postAdminLicenses"
      x-source-file: "ia-system/app/api/admin/licenses/route.ts"
      security:
        -
          cookieAuth: []
      requestBody:
        required: false
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/GenericObject"
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/admin/overview":
    get:
      tags:
        - "admin"
      summary: "Resumo executivo do superadmin"
      operationId: "getAdminOverview"
      x-source-file: "ia-system/app/api/admin/overview/route.ts"
      security:
        -
          cookieAuth: []
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/admin/plans/{id}":
    patch:
      tags:
        - "admin"
      summary: "Atualiza plano comercial"
      operationId: "patchAdminPlansId"
      x-source-file: "ia-system/app/api/admin/plans/[id]/route.ts"
      parameters:
        -
          name: "id"
          in: "path"
          required: true
          schema:
            type: "string"
          description: "Parametro de rota `id`."
      security:
        -
          cookieAuth: []
      requestBody:
        required: true
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/PlanUpdateRequest"
      responses:
        200:
          description: "Plano atualizado."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/OkResponse"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/admin/plans":
    get:
      tags:
        - "admin"
      summary: "Lista planos comerciais"
      operationId: "getAdminPlans"
      x-source-file: "ia-system/app/api/admin/plans/route.ts"
      security:
        -
          cookieAuth: []
      responses:
        200:
          description: "Planos e catalogo de features."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/PlansResponse"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
    post:
      tags:
        - "admin"
      summary: "Cria plano comercial"
      operationId: "postAdminPlans"
      x-source-file: "ia-system/app/api/admin/plans/route.ts"
      security:
        -
          cookieAuth: []
      requestBody:
        required: true
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/PlanCreateRequest"
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        201:
          description: "Plano criado."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/PlanResponse"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        409:
          "$ref": "#/components/responses/Conflict"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/admin/system":
    get:
      tags:
        - "admin"
      summary: "Consulta recurso em /api/admin/system. Fonte: ia-system/app/api/admin/system/route.ts."
      operationId: "getAdminSystem"
      x-source-file: "ia-system/app/api/admin/system/route.ts"
      security:
        -
          cookieAuth: []
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/admin/workspaces/{id}/impersonate":
    post:
      tags:
        - "admin"
      summary: "Cria, executa ou enfileira recurso em /api/admin/workspaces/{id}/impersonate. Fonte: ia-system/app/api/admin/workspaces/[id]/impersonate/route.ts."
      operationId: "postAdminWorkspacesIdImpersonate"
      x-source-file: "ia-system/app/api/admin/workspaces/[id]/impersonate/route.ts"
      parameters:
        -
          name: "id"
          in: "path"
          required: true
          schema:
            type: "string"
          description: "Parametro de rota `id`."
      security:
        -
          cookieAuth: []
      requestBody:
        required: false
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/GenericObject"
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
    delete:
      tags:
        - "admin"
      summary: "Remove ou cancela recurso em /api/admin/workspaces/{id}/impersonate. Fonte: ia-system/app/api/admin/workspaces/[id]/impersonate/route.ts."
      operationId: "deleteAdminWorkspacesIdImpersonate"
      x-source-file: "ia-system/app/api/admin/workspaces/[id]/impersonate/route.ts"
      parameters:
        -
          name: "id"
          in: "path"
          required: true
          schema:
            type: "string"
          description: "Parametro de rota `id`."
      security:
        -
          cookieAuth: []
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        204:
          description: "Recurso removido ou acao concluida sem corpo."
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/admin/workspaces/{id}":
    get:
      tags:
        - "admin"
      summary: "Consulta recurso em /api/admin/workspaces/{id}. Fonte: ia-system/app/api/admin/workspaces/[id]/route.ts."
      operationId: "getAdminWorkspacesId"
      x-source-file: "ia-system/app/api/admin/workspaces/[id]/route.ts"
      parameters:
        -
          name: "id"
          in: "path"
          required: true
          schema:
            type: "string"
          description: "Parametro de rota `id`."
      security:
        -
          cookieAuth: []
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
    patch:
      tags:
        - "admin"
      summary: "Atualiza parcialmente recurso em /api/admin/workspaces/{id}. Fonte: ia-system/app/api/admin/workspaces/[id]/route.ts."
      operationId: "patchAdminWorkspacesId"
      x-source-file: "ia-system/app/api/admin/workspaces/[id]/route.ts"
      parameters:
        -
          name: "id"
          in: "path"
          required: true
          schema:
            type: "string"
          description: "Parametro de rota `id`."
      security:
        -
          cookieAuth: []
      requestBody:
        required: false
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/GenericObject"
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
    delete:
      tags:
        - "admin"
      summary: "Remove ou cancela recurso em /api/admin/workspaces/{id}. Fonte: ia-system/app/api/admin/workspaces/[id]/route.ts."
      operationId: "deleteAdminWorkspacesId"
      x-source-file: "ia-system/app/api/admin/workspaces/[id]/route.ts"
      parameters:
        -
          name: "id"
          in: "path"
          required: true
          schema:
            type: "string"
          description: "Parametro de rota `id`."
      security:
        -
          cookieAuth: []
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        204:
          description: "Recurso removido ou acao concluida sem corpo."
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/admin/workspaces":
    get:
      tags:
        - "admin"
      summary: "Consulta recurso em /api/admin/workspaces. Fonte: ia-system/app/api/admin/workspaces/route.ts."
      operationId: "getAdminWorkspaces"
      x-source-file: "ia-system/app/api/admin/workspaces/route.ts"
      security:
        -
          cookieAuth: []
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
    post:
      tags:
        - "admin"
      summary: "Cria, executa ou enfileira recurso em /api/admin/workspaces. Fonte: ia-system/app/api/admin/workspaces/route.ts."
      operationId: "postAdminWorkspaces"
      x-source-file: "ia-system/app/api/admin/workspaces/route.ts"
      security:
        -
          cookieAuth: []
      requestBody:
        required: false
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/GenericObject"
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/agent-prompts/{id}":
    put:
      tags:
        - "agent-prompts"
      summary: "Substitui ou atualiza recurso em /api/agent-prompts/{id}. Fonte: ia-system/app/api/agent-prompts/[id]/route.ts."
      operationId: "putAgentPromptsId"
      x-source-file: "ia-system/app/api/agent-prompts/[id]/route.ts"
      parameters:
        -
          name: "id"
          in: "path"
          required: true
          schema:
            type: "string"
          description: "Parametro de rota `id`."
      security:
        -
          cookieAuth: []
      requestBody:
        required: false
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/GenericObject"
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
    delete:
      tags:
        - "agent-prompts"
      summary: "Remove ou cancela recurso em /api/agent-prompts/{id}. Fonte: ia-system/app/api/agent-prompts/[id]/route.ts."
      operationId: "deleteAgentPromptsId"
      x-source-file: "ia-system/app/api/agent-prompts/[id]/route.ts"
      parameters:
        -
          name: "id"
          in: "path"
          required: true
          schema:
            type: "string"
          description: "Parametro de rota `id`."
      security:
        -
          cookieAuth: []
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        204:
          description: "Recurso removido ou acao concluida sem corpo."
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/agent-prompts":
    get:
      tags:
        - "agent-prompts"
      summary: "Consulta recurso em /api/agent-prompts. Fonte: ia-system/app/api/agent-prompts/route.ts."
      operationId: "getAgentPrompts"
      x-source-file: "ia-system/app/api/agent-prompts/route.ts"
      security:
        -
          cookieAuth: []
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
    post:
      tags:
        - "agent-prompts"
      summary: "Cria, executa ou enfileira recurso em /api/agent-prompts. Fonte: ia-system/app/api/agent-prompts/route.ts."
      operationId: "postAgentPrompts"
      x-source-file: "ia-system/app/api/agent-prompts/route.ts"
      security:
        -
          cookieAuth: []
      requestBody:
        required: false
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/GenericObject"
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/agents/{id}/products":
    get:
      tags:
        - "agents"
      summary: "Consulta recurso em /api/agents/{id}/products. Fonte: ia-system/app/api/agents/[id]/products/route.ts."
      operationId: "getAgentsIdProducts"
      x-source-file: "ia-system/app/api/agents/[id]/products/route.ts"
      parameters:
        -
          name: "id"
          in: "path"
          required: true
          schema:
            type: "string"
          description: "Parametro de rota `id`."
      security:
        -
          cookieAuth: []
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
    post:
      tags:
        - "agents"
      summary: "Cria, executa ou enfileira recurso em /api/agents/{id}/products. Fonte: ia-system/app/api/agents/[id]/products/route.ts."
      operationId: "postAgentsIdProducts"
      x-source-file: "ia-system/app/api/agents/[id]/products/route.ts"
      parameters:
        -
          name: "id"
          in: "path"
          required: true
          schema:
            type: "string"
          description: "Parametro de rota `id`."
      security:
        -
          cookieAuth: []
      requestBody:
        required: false
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/GenericObject"
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/agents/{id}/prompt-history":
    get:
      tags:
        - "agents"
      summary: "Consulta recurso em /api/agents/{id}/prompt-history. Fonte: ia-system/app/api/agents/[id]/prompt-history/route.ts."
      operationId: "getAgentsIdPromptHistory"
      x-source-file: "ia-system/app/api/agents/[id]/prompt-history/route.ts"
      parameters:
        -
          name: "id"
          in: "path"
          required: true
          schema:
            type: "string"
          description: "Parametro de rota `id`."
      security:
        -
          cookieAuth: []
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
    post:
      tags:
        - "agents"
      summary: "Cria, executa ou enfileira recurso em /api/agents/{id}/prompt-history. Fonte: ia-system/app/api/agents/[id]/prompt-history/route.ts."
      operationId: "postAgentsIdPromptHistory"
      x-source-file: "ia-system/app/api/agents/[id]/prompt-history/route.ts"
      parameters:
        -
          name: "id"
          in: "path"
          required: true
          schema:
            type: "string"
          description: "Parametro de rota `id`."
      security:
        -
          cookieAuth: []
      requestBody:
        required: false
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/GenericObject"
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/agents/{id}":
    put:
      tags:
        - "agents"
      summary: "Substitui ou atualiza recurso em /api/agents/{id}. Fonte: ia-system/app/api/agents/[id]/route.ts."
      operationId: "putAgentsId"
      x-source-file: "ia-system/app/api/agents/[id]/route.ts"
      parameters:
        -
          name: "id"
          in: "path"
          required: true
          schema:
            type: "string"
          description: "Parametro de rota `id`."
      security:
        -
          cookieAuth: []
      requestBody:
        required: false
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/GenericObject"
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
    delete:
      tags:
        - "agents"
      summary: "Remove ou cancela recurso em /api/agents/{id}. Fonte: ia-system/app/api/agents/[id]/route.ts."
      operationId: "deleteAgentsId"
      x-source-file: "ia-system/app/api/agents/[id]/route.ts"
      parameters:
        -
          name: "id"
          in: "path"
          required: true
          schema:
            type: "string"
          description: "Parametro de rota `id`."
      security:
        -
          cookieAuth: []
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        204:
          description: "Recurso removido ou acao concluida sem corpo."
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/agents/{id}/sync-voice":
    post:
      tags:
        - "agents"
      summary: "Cria, executa ou enfileira recurso em /api/agents/{id}/sync-voice. Fonte: ia-system/app/api/agents/[id]/sync-voice/route.ts."
      operationId: "postAgentsIdSyncVoice"
      x-source-file: "ia-system/app/api/agents/[id]/sync-voice/route.ts"
      parameters:
        -
          name: "id"
          in: "path"
          required: true
          schema:
            type: "string"
          description: "Parametro de rota `id`."
      security:
        -
          cookieAuth: []
      requestBody:
        required: false
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/GenericObject"
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/agents/{id}/voice-prompt-preview":
    get:
      tags:
        - "agents"
      summary: "Consulta recurso em /api/agents/{id}/voice-prompt-preview. Fonte: ia-system/app/api/agents/[id]/voice-prompt-preview/route.ts."
      operationId: "getAgentsIdVoicePromptPreview"
      x-source-file: "ia-system/app/api/agents/[id]/voice-prompt-preview/route.ts"
      parameters:
        -
          name: "id"
          in: "path"
          required: true
          schema:
            type: "string"
          description: "Parametro de rota `id`."
      security:
        -
          cookieAuth: []
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/agents":
    get:
      tags:
        - "agents"
      summary: "Consulta recurso em /api/agents. Fonte: ia-system/app/api/agents/route.ts."
      operationId: "getAgents"
      x-source-file: "ia-system/app/api/agents/route.ts"
      security:
        -
          cookieAuth: []
      responses:
        200:
          description: "Agentes do workspace."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/AgentsResponse"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
    post:
      tags:
        - "agents"
      summary: "Cria, executa ou enfileira recurso em /api/agents. Fonte: ia-system/app/api/agents/route.ts."
      operationId: "postAgents"
      x-source-file: "ia-system/app/api/agents/route.ts"
      security:
        -
          cookieAuth: []
      requestBody:
        required: true
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/AgentCreateRequest"
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        201:
          description: "Agente criado."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/AgentResponse"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/audit-logs":
    get:
      tags:
        - "audit-logs"
      summary: "Consulta recurso em /api/audit-logs. Fonte: ia-system/app/api/audit-logs/route.ts."
      operationId: "getAuditLogs"
      x-source-file: "ia-system/app/api/audit-logs/route.ts"
      security:
        -
          cookieAuth: []
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/billing/asaas/webhook":
    post:
      tags:
        - "billing"
      summary: "Recebe webhook Asaas com validacao de token"
      operationId: "postBillingAsaasWebhook"
      x-source-file: "ia-system/app/api/billing/asaas/webhook/route.ts"
      security:
        -
          asaasWebhookToken: []
      requestBody:
        required: true
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/AsaasWebhookEvent"
      responses:
        200:
          description: "Evento aceito para processamento idempotente."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/OkResponse"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/broadcasts/{id}/cancel":
    post:
      tags:
        - "broadcasts"
      summary: "Cria, executa ou enfileira recurso em /api/broadcasts/{id}/cancel. Fonte: ia-system/app/api/broadcasts/[id]/cancel/route.ts."
      operationId: "postBroadcastsIdCancel"
      x-source-file: "ia-system/app/api/broadcasts/[id]/cancel/route.ts"
      parameters:
        -
          name: "id"
          in: "path"
          required: true
          schema:
            type: "string"
          description: "Parametro de rota `id`."
      security:
        -
          cookieAuth: []
      requestBody:
        required: false
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/GenericObject"
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/broadcasts/{id}/recipients":
    get:
      tags:
        - "broadcasts"
      summary: "Consulta recurso em /api/broadcasts/{id}/recipients. Fonte: ia-system/app/api/broadcasts/[id]/recipients/route.ts."
      operationId: "getBroadcastsIdRecipients"
      x-source-file: "ia-system/app/api/broadcasts/[id]/recipients/route.ts"
      parameters:
        -
          name: "id"
          in: "path"
          required: true
          schema:
            type: "string"
          description: "Parametro de rota `id`."
      security:
        -
          cookieAuth: []
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/broadcasts/{id}":
    get:
      tags:
        - "broadcasts"
      summary: "Consulta recurso em /api/broadcasts/{id}. Fonte: ia-system/app/api/broadcasts/[id]/route.ts."
      operationId: "getBroadcastsId"
      x-source-file: "ia-system/app/api/broadcasts/[id]/route.ts"
      parameters:
        -
          name: "id"
          in: "path"
          required: true
          schema:
            type: "string"
          description: "Parametro de rota `id`."
      security:
        -
          cookieAuth: []
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
    delete:
      tags:
        - "broadcasts"
      summary: "Remove ou cancela recurso em /api/broadcasts/{id}. Fonte: ia-system/app/api/broadcasts/[id]/route.ts."
      operationId: "deleteBroadcastsId"
      x-source-file: "ia-system/app/api/broadcasts/[id]/route.ts"
      parameters:
        -
          name: "id"
          in: "path"
          required: true
          schema:
            type: "string"
          description: "Parametro de rota `id`."
      security:
        -
          cookieAuth: []
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        204:
          description: "Recurso removido ou acao concluida sem corpo."
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/broadcasts/{id}/send":
    post:
      tags:
        - "broadcasts"
      summary: "Enfileira disparo de broadcast"
      operationId: "postBroadcastsIdSend"
      x-source-file: "ia-system/app/api/broadcasts/[id]/send/route.ts"
      parameters:
        -
          name: "id"
          in: "path"
          required: true
          schema:
            type: "string"
          description: "Parametro de rota `id`."
      security:
        -
          cookieAuth: []
      requestBody:
        required: false
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/GenericObject"
      responses:
        200:
          description: "Broadcast enfileirado para envio com throttle."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/OkResponse"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/broadcasts/{id}/stats":
    get:
      tags:
        - "broadcasts"
      summary: "Consulta recurso em /api/broadcasts/{id}/stats. Fonte: ia-system/app/api/broadcasts/[id]/stats/route.ts."
      operationId: "getBroadcastsIdStats"
      x-source-file: "ia-system/app/api/broadcasts/[id]/stats/route.ts"
      parameters:
        -
          name: "id"
          in: "path"
          required: true
          schema:
            type: "string"
          description: "Parametro de rota `id`."
      security:
        -
          cookieAuth: []
      responses:
        200:
          description: "Estatisticas do broadcast."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/BroadcastStatsResponse"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/broadcasts/preview":
    get:
      tags:
        - "broadcasts"
      summary: "Consulta recurso em /api/broadcasts/preview. Fonte: ia-system/app/api/broadcasts/preview/route.ts."
      operationId: "getBroadcastsPreview"
      x-source-file: "ia-system/app/api/broadcasts/preview/route.ts"
      security:
        -
          cookieAuth: []
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/broadcasts":
    get:
      tags:
        - "broadcasts"
      summary: "Consulta recurso em /api/broadcasts. Fonte: ia-system/app/api/broadcasts/route.ts."
      operationId: "getBroadcasts"
      x-source-file: "ia-system/app/api/broadcasts/route.ts"
      security:
        -
          cookieAuth: []
      responses:
        200:
          description: "Campanhas de broadcast."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/BroadcastsResponse"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
    post:
      tags:
        - "broadcasts"
      summary: "Cria, executa ou enfileira recurso em /api/broadcasts. Fonte: ia-system/app/api/broadcasts/route.ts."
      operationId: "postBroadcasts"
      x-source-file: "ia-system/app/api/broadcasts/route.ts"
      security:
        -
          cookieAuth: []
      requestBody:
        required: true
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/BroadcastCreateRequest"
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        201:
          description: "Broadcast criado."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/BroadcastResponse"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/checkouts/{slug}":
    get:
      tags:
        - "checkouts"
      summary: "Consulta checkout publico"
      operationId: "getCheckoutsSlug"
      x-source-file: "ia-system/app/api/checkouts/[slug]/route.ts"
      parameters:
        -
          name: "slug"
          in: "path"
          required: true
          schema:
            type: "string"
          description: "Parametro de rota `slug`."
      security: []
      responses:
        200:
          description: "Checkout publico publicado."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/PublicCheckoutResponse"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/checkouts/{slug}/subscribe":
    post:
      tags:
        - "checkouts"
      summary: "Inicia assinatura publica"
      operationId: "postCheckoutsSlugSubscribe"
      x-source-file: "ia-system/app/api/checkouts/[slug]/subscribe/route.ts"
      parameters:
        -
          name: "slug"
          in: "path"
          required: true
          schema:
            type: "string"
          description: "Parametro de rota `slug`."
      security: []
      requestBody:
        required: true
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/SubscribeRequest"
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        201:
          description: "Assinatura criada e aguardando confirmacao de pagamento."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/SubscribeResponse"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        409:
          "$ref": "#/components/responses/Conflict"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
        503:
          "$ref": "#/components/responses/ServiceUnavailable"
  "/api/contacts/{id}/fields":
    get:
      tags:
        - "contacts"
      summary: "Consulta recurso em /api/contacts/{id}/fields. Fonte: ia-system/app/api/contacts/[id]/fields/route.ts."
      operationId: "getContactsIdFields"
      x-source-file: "ia-system/app/api/contacts/[id]/fields/route.ts"
      parameters:
        -
          name: "id"
          in: "path"
          required: true
          schema:
            type: "string"
          description: "Parametro de rota `id`."
      security:
        -
          cookieAuth: []
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
    put:
      tags:
        - "contacts"
      summary: "Substitui ou atualiza recurso em /api/contacts/{id}/fields. Fonte: ia-system/app/api/contacts/[id]/fields/route.ts."
      operationId: "putContactsIdFields"
      x-source-file: "ia-system/app/api/contacts/[id]/fields/route.ts"
      parameters:
        -
          name: "id"
          in: "path"
          required: true
          schema:
            type: "string"
          description: "Parametro de rota `id`."
      security:
        -
          cookieAuth: []
      requestBody:
        required: false
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/GenericObject"
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/contacts/{id}":
    get:
      tags:
        - "contacts"
      summary: "Consulta recurso em /api/contacts/{id}. Fonte: ia-system/app/api/contacts/[id]/route.ts."
      operationId: "getContactsId"
      x-source-file: "ia-system/app/api/contacts/[id]/route.ts"
      parameters:
        -
          name: "id"
          in: "path"
          required: true
          schema:
            type: "string"
          description: "Parametro de rota `id`."
      security:
        -
          cookieAuth: []
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
    put:
      tags:
        - "contacts"
      summary: "Substitui ou atualiza recurso em /api/contacts/{id}. Fonte: ia-system/app/api/contacts/[id]/route.ts."
      operationId: "putContactsId"
      x-source-file: "ia-system/app/api/contacts/[id]/route.ts"
      parameters:
        -
          name: "id"
          in: "path"
          required: true
          schema:
            type: "string"
          description: "Parametro de rota `id`."
      security:
        -
          cookieAuth: []
      requestBody:
        required: false
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/GenericObject"
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
    delete:
      tags:
        - "contacts"
      summary: "Remove ou cancela recurso em /api/contacts/{id}. Fonte: ia-system/app/api/contacts/[id]/route.ts."
      operationId: "deleteContactsId"
      x-source-file: "ia-system/app/api/contacts/[id]/route.ts"
      parameters:
        -
          name: "id"
          in: "path"
          required: true
          schema:
            type: "string"
          description: "Parametro de rota `id`."
      security:
        -
          cookieAuth: []
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        204:
          description: "Recurso removido ou acao concluida sem corpo."
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/contacts/{id}/start-conversation":
    post:
      tags:
        - "contacts"
      summary: "Cria, executa ou enfileira recurso em /api/contacts/{id}/start-conversation. Fonte: ia-system/app/api/contacts/[id]/start-conversation/route.ts."
      operationId: "postContactsIdStartConversation"
      x-source-file: "ia-system/app/api/contacts/[id]/start-conversation/route.ts"
      parameters:
        -
          name: "id"
          in: "path"
          required: true
          schema:
            type: "string"
          description: "Parametro de rota `id`."
      security:
        -
          cookieAuth: []
      requestBody:
        required: false
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/GenericObject"
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/contacts/{id}/start-voice-call":
    post:
      tags:
        - "contacts"
      summary: "Cria, executa ou enfileira recurso em /api/contacts/{id}/start-voice-call. Fonte: ia-system/app/api/contacts/[id]/start-voice-call/route.ts."
      operationId: "postContactsIdStartVoiceCall"
      x-source-file: "ia-system/app/api/contacts/[id]/start-voice-call/route.ts"
      parameters:
        -
          name: "id"
          in: "path"
          required: true
          schema:
            type: "string"
          description: "Parametro de rota `id`."
      security:
        -
          cookieAuth: []
      requestBody:
        required: false
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/GenericObject"
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/contacts/{id}/tags":
    get:
      tags:
        - "contacts"
      summary: "Consulta recurso em /api/contacts/{id}/tags. Fonte: ia-system/app/api/contacts/[id]/tags/route.ts."
      operationId: "getContactsIdTags"
      x-source-file: "ia-system/app/api/contacts/[id]/tags/route.ts"
      parameters:
        -
          name: "id"
          in: "path"
          required: true
          schema:
            type: "string"
          description: "Parametro de rota `id`."
      security:
        -
          cookieAuth: []
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
    put:
      tags:
        - "contacts"
      summary: "Substitui ou atualiza recurso em /api/contacts/{id}/tags. Fonte: ia-system/app/api/contacts/[id]/tags/route.ts."
      operationId: "putContactsIdTags"
      x-source-file: "ia-system/app/api/contacts/[id]/tags/route.ts"
      parameters:
        -
          name: "id"
          in: "path"
          required: true
          schema:
            type: "string"
          description: "Parametro de rota `id`."
      security:
        -
          cookieAuth: []
      requestBody:
        required: false
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/GenericObject"
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/contacts/{id}/timeline":
    get:
      tags:
        - "contacts"
      summary: "Consulta recurso em /api/contacts/{id}/timeline. Fonte: ia-system/app/api/contacts/[id]/timeline/route.ts."
      operationId: "getContactsIdTimeline"
      x-source-file: "ia-system/app/api/contacts/[id]/timeline/route.ts"
      parameters:
        -
          name: "id"
          in: "path"
          required: true
          schema:
            type: "string"
          description: "Parametro de rota `id`."
      security:
        -
          cookieAuth: []
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/contacts/duplicates":
    get:
      tags:
        - "contacts"
      summary: "Consulta recurso em /api/contacts/duplicates. Fonte: ia-system/app/api/contacts/duplicates/route.ts."
      operationId: "getContactsDuplicates"
      x-source-file: "ia-system/app/api/contacts/duplicates/route.ts"
      security:
        -
          cookieAuth: []
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/contacts/merge":
    post:
      tags:
        - "contacts"
      summary: "Cria, executa ou enfileira recurso em /api/contacts/merge. Fonte: ia-system/app/api/contacts/merge/route.ts."
      operationId: "postContactsMerge"
      x-source-file: "ia-system/app/api/contacts/merge/route.ts"
      security:
        -
          cookieAuth: []
      requestBody:
        required: false
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/GenericObject"
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/contacts":
    get:
      tags:
        - "contacts"
      summary: "Consulta recurso em /api/contacts. Fonte: ia-system/app/api/contacts/route.ts."
      operationId: "getContacts"
      x-source-file: "ia-system/app/api/contacts/route.ts"
      security:
        -
          cookieAuth: []
      responses:
        200:
          description: "Contatos do workspace."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/ContactsResponse"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
    post:
      tags:
        - "contacts"
      summary: "Cria, executa ou enfileira recurso em /api/contacts. Fonte: ia-system/app/api/contacts/route.ts."
      operationId: "postContacts"
      x-source-file: "ia-system/app/api/contacts/route.ts"
      security:
        -
          cookieAuth: []
      requestBody:
        required: true
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/ContactCreateRequest"
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        201:
          description: "Contato criado."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/Contact"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
    delete:
      tags:
        - "contacts"
      summary: "Remove ou cancela recurso em /api/contacts. Fonte: ia-system/app/api/contacts/route.ts."
      operationId: "deleteContacts"
      x-source-file: "ia-system/app/api/contacts/route.ts"
      security:
        -
          cookieAuth: []
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        204:
          description: "Recurso removido ou acao concluida sem corpo."
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/cron/fup":
    post:
      tags:
        - "cron"
      summary: "Cria, executa ou enfileira recurso em /api/cron/fup. Fonte: ia-system/app/api/cron/fup/route.ts."
      operationId: "postCronFup"
      x-source-file: "ia-system/app/api/cron/fup/route.ts"
      security:
        -
          internalSecret: []
      requestBody:
        required: false
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/GenericObject"
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/custom-fields/{id}":
    put:
      tags:
        - "custom-fields"
      summary: "Substitui ou atualiza recurso em /api/custom-fields/{id}. Fonte: ia-system/app/api/custom-fields/[id]/route.ts."
      operationId: "putCustomFieldsId"
      x-source-file: "ia-system/app/api/custom-fields/[id]/route.ts"
      parameters:
        -
          name: "id"
          in: "path"
          required: true
          schema:
            type: "string"
          description: "Parametro de rota `id`."
      security:
        -
          cookieAuth: []
      requestBody:
        required: false
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/GenericObject"
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
    delete:
      tags:
        - "custom-fields"
      summary: "Remove ou cancela recurso em /api/custom-fields/{id}. Fonte: ia-system/app/api/custom-fields/[id]/route.ts."
      operationId: "deleteCustomFieldsId"
      x-source-file: "ia-system/app/api/custom-fields/[id]/route.ts"
      parameters:
        -
          name: "id"
          in: "path"
          required: true
          schema:
            type: "string"
          description: "Parametro de rota `id`."
      security:
        -
          cookieAuth: []
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        204:
          description: "Recurso removido ou acao concluida sem corpo."
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/custom-fields":
    get:
      tags:
        - "custom-fields"
      summary: "Consulta recurso em /api/custom-fields. Fonte: ia-system/app/api/custom-fields/route.ts."
      operationId: "getCustomFields"
      x-source-file: "ia-system/app/api/custom-fields/route.ts"
      security:
        -
          cookieAuth: []
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
    post:
      tags:
        - "custom-fields"
      summary: "Cria, executa ou enfileira recurso em /api/custom-fields. Fonte: ia-system/app/api/custom-fields/route.ts."
      operationId: "postCustomFields"
      x-source-file: "ia-system/app/api/custom-fields/route.ts"
      security:
        -
          cookieAuth: []
      requestBody:
        required: false
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/GenericObject"
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/debug-contacts":
    get:
      tags:
        - "debug-contacts"
      summary: "Consulta recurso em /api/debug-contacts. Fonte: ia-system/app/api/debug-contacts/route.ts."
      operationId: "getDebugContacts"
      x-source-file: "ia-system/app/api/debug-contacts/route.ts"
      security:
        -
          cookieAuth: []
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/debug/batch-approve":
    post:
      tags:
        - "debug"
      summary: "Cria, executa ou enfileira recurso em /api/debug/batch-approve. Fonte: ia-system/app/api/debug/batch-approve/route.ts."
      operationId: "postDebugBatchApprove"
      x-source-file: "ia-system/app/api/debug/batch-approve/route.ts"
      security:
        -
          cookieAuth: []
      requestBody:
        required: false
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/GenericObject"
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/debug/conversations/{id}":
    get:
      tags:
        - "debug"
      summary: "Consulta recurso em /api/debug/conversations/{id}. Fonte: ia-system/app/api/debug/conversations/[id]/route.ts."
      operationId: "getDebugConversationsId"
      x-source-file: "ia-system/app/api/debug/conversations/[id]/route.ts"
      parameters:
        -
          name: "id"
          in: "path"
          required: true
          schema:
            type: "string"
          description: "Parametro de rota `id`."
      security:
        -
          cookieAuth: []
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/debug/conversations":
    get:
      tags:
        - "debug"
      summary: "Consulta recurso em /api/debug/conversations. Fonte: ia-system/app/api/debug/conversations/route.ts."
      operationId: "getDebugConversations"
      x-source-file: "ia-system/app/api/debug/conversations/route.ts"
      security:
        -
          cookieAuth: []
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/debug/diagnose-lead":
    get:
      tags:
        - "debug"
      summary: "Consulta recurso em /api/debug/diagnose-lead. Fonte: ia-system/app/api/debug/diagnose-lead/route.ts."
      operationId: "getDebugDiagnoseLead"
      x-source-file: "ia-system/app/api/debug/diagnose-lead/route.ts"
      security:
        -
          cookieAuth: []
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/debug/review":
    post:
      tags:
        - "debug"
      summary: "Cria, executa ou enfileira recurso em /api/debug/review. Fonte: ia-system/app/api/debug/review/route.ts."
      operationId: "postDebugReview"
      x-source-file: "ia-system/app/api/debug/review/route.ts"
      security:
        -
          cookieAuth: []
      requestBody:
        required: false
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/GenericObject"
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/flows/{id}/activate":
    post:
      tags:
        - "flows"
      summary: "Cria, executa ou enfileira recurso em /api/flows/{id}/activate. Fonte: ia-system/app/api/flows/[id]/activate/route.ts."
      operationId: "postFlowsIdActivate"
      x-source-file: "ia-system/app/api/flows/[id]/activate/route.ts"
      parameters:
        -
          name: "id"
          in: "path"
          required: true
          schema:
            type: "string"
          description: "Parametro de rota `id`."
      security:
        -
          cookieAuth: []
      requestBody:
        required: false
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/GenericObject"
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/flows/{id}/analytics":
    get:
      tags:
        - "flows"
      summary: "Consulta recurso em /api/flows/{id}/analytics. Fonte: ia-system/app/api/flows/[id]/analytics/route.ts."
      operationId: "getFlowsIdAnalytics"
      x-source-file: "ia-system/app/api/flows/[id]/analytics/route.ts"
      parameters:
        -
          name: "id"
          in: "path"
          required: true
          schema:
            type: "string"
          description: "Parametro de rota `id`."
      security:
        -
          cookieAuth: []
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/flows/{id}/duplicate":
    post:
      tags:
        - "flows"
      summary: "Cria, executa ou enfileira recurso em /api/flows/{id}/duplicate. Fonte: ia-system/app/api/flows/[id]/duplicate/route.ts."
      operationId: "postFlowsIdDuplicate"
      x-source-file: "ia-system/app/api/flows/[id]/duplicate/route.ts"
      parameters:
        -
          name: "id"
          in: "path"
          required: true
          schema:
            type: "string"
          description: "Parametro de rota `id`."
      security:
        -
          cookieAuth: []
      requestBody:
        required: false
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/GenericObject"
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/flows/{id}/executions/{execId}/cancel":
    post:
      tags:
        - "flows"
      summary: "Cria, executa ou enfileira recurso em /api/flows/{id}/executions/{execId}/cancel. Fonte: ia-system/app/api/flows/[id]/executions/[execId]/cancel/route.ts."
      operationId: "postFlowsIdExecutionsExecIdCancel"
      x-source-file: "ia-system/app/api/flows/[id]/executions/[execId]/cancel/route.ts"
      parameters:
        -
          name: "id"
          in: "path"
          required: true
          schema:
            type: "string"
          description: "Parametro de rota `id`."
        -
          name: "execId"
          in: "path"
          required: true
          schema:
            type: "string"
          description: "Parametro de rota `execId`."
      security:
        -
          cookieAuth: []
      requestBody:
        required: false
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/GenericObject"
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/flows/{id}/executions/{execId}/retry":
    post:
      tags:
        - "flows"
      summary: "Cria, executa ou enfileira recurso em /api/flows/{id}/executions/{execId}/retry. Fonte: ia-system/app/api/flows/[id]/executions/[execId]/retry/route.ts."
      operationId: "postFlowsIdExecutionsExecIdRetry"
      x-source-file: "ia-system/app/api/flows/[id]/executions/[execId]/retry/route.ts"
      parameters:
        -
          name: "id"
          in: "path"
          required: true
          schema:
            type: "string"
          description: "Parametro de rota `id`."
        -
          name: "execId"
          in: "path"
          required: true
          schema:
            type: "string"
          description: "Parametro de rota `execId`."
      security:
        -
          cookieAuth: []
      requestBody:
        required: false
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/GenericObject"
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/flows/{id}/executions/{execId}/steps":
    get:
      tags:
        - "flows"
      summary: "Consulta recurso em /api/flows/{id}/executions/{execId}/steps. Fonte: ia-system/app/api/flows/[id]/executions/[execId]/steps/route.ts."
      operationId: "getFlowsIdExecutionsExecIdSteps"
      x-source-file: "ia-system/app/api/flows/[id]/executions/[execId]/steps/route.ts"
      parameters:
        -
          name: "id"
          in: "path"
          required: true
          schema:
            type: "string"
          description: "Parametro de rota `id`."
        -
          name: "execId"
          in: "path"
          required: true
          schema:
            type: "string"
          description: "Parametro de rota `execId`."
      security:
        -
          cookieAuth: []
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/flows/{id}/executions":
    get:
      tags:
        - "flows"
      summary: "Consulta recurso em /api/flows/{id}/executions. Fonte: ia-system/app/api/flows/[id]/executions/route.ts."
      operationId: "getFlowsIdExecutions"
      x-source-file: "ia-system/app/api/flows/[id]/executions/route.ts"
      parameters:
        -
          name: "id"
          in: "path"
          required: true
          schema:
            type: "string"
          description: "Parametro de rota `id`."
      security:
        -
          cookieAuth: []
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/flows/{id}/pause":
    post:
      tags:
        - "flows"
      summary: "Cria, executa ou enfileira recurso em /api/flows/{id}/pause. Fonte: ia-system/app/api/flows/[id]/pause/route.ts."
      operationId: "postFlowsIdPause"
      x-source-file: "ia-system/app/api/flows/[id]/pause/route.ts"
      parameters:
        -
          name: "id"
          in: "path"
          required: true
          schema:
            type: "string"
          description: "Parametro de rota `id`."
      security:
        -
          cookieAuth: []
      requestBody:
        required: false
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/GenericObject"
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/flows/{id}":
    get:
      tags:
        - "flows"
      summary: "Consulta recurso em /api/flows/{id}. Fonte: ia-system/app/api/flows/[id]/route.ts."
      operationId: "getFlowsId"
      x-source-file: "ia-system/app/api/flows/[id]/route.ts"
      parameters:
        -
          name: "id"
          in: "path"
          required: true
          schema:
            type: "string"
          description: "Parametro de rota `id`."
      security:
        -
          cookieAuth: []
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
    put:
      tags:
        - "flows"
      summary: "Substitui ou atualiza recurso em /api/flows/{id}. Fonte: ia-system/app/api/flows/[id]/route.ts."
      operationId: "putFlowsId"
      x-source-file: "ia-system/app/api/flows/[id]/route.ts"
      parameters:
        -
          name: "id"
          in: "path"
          required: true
          schema:
            type: "string"
          description: "Parametro de rota `id`."
      security:
        -
          cookieAuth: []
      requestBody:
        required: false
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/GenericObject"
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
    delete:
      tags:
        - "flows"
      summary: "Remove ou cancela recurso em /api/flows/{id}. Fonte: ia-system/app/api/flows/[id]/route.ts."
      operationId: "deleteFlowsId"
      x-source-file: "ia-system/app/api/flows/[id]/route.ts"
      parameters:
        -
          name: "id"
          in: "path"
          required: true
          schema:
            type: "string"
          description: "Parametro de rota `id`."
      security:
        -
          cookieAuth: []
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        204:
          description: "Recurso removido ou acao concluida sem corpo."
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/flows/{id}/trigger":
    post:
      tags:
        - "flows"
      summary: "Dispara fluxo manualmente"
      operationId: "postFlowsIdTrigger"
      x-source-file: "ia-system/app/api/flows/[id]/trigger/route.ts"
      parameters:
        -
          name: "id"
          in: "path"
          required: true
          schema:
            type: "string"
          description: "Parametro de rota `id`."
      security:
        -
          cookieAuth: []
      requestBody:
        required: false
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/GenericObject"
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/flows":
    get:
      tags:
        - "flows"
      summary: "Consulta recurso em /api/flows. Fonte: ia-system/app/api/flows/route.ts."
      operationId: "getFlows"
      x-source-file: "ia-system/app/api/flows/route.ts"
      security:
        -
          cookieAuth: []
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
    post:
      tags:
        - "flows"
      summary: "Cria, executa ou enfileira recurso em /api/flows. Fonte: ia-system/app/api/flows/route.ts."
      operationId: "postFlows"
      x-source-file: "ia-system/app/api/flows/route.ts"
      security:
        -
          cookieAuth: []
      requestBody:
        required: false
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/GenericObject"
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/flows/webhook/{path}":
    post:
      tags:
        - "flows"
      summary: "Cria, executa ou enfileira recurso em /api/flows/webhook/{path}. Fonte: ia-system/app/api/flows/webhook/[path]/route.ts."
      operationId: "postFlowsWebhookPath"
      x-source-file: "ia-system/app/api/flows/webhook/[path]/route.ts"
      parameters:
        -
          name: "path"
          in: "path"
          required: true
          schema:
            type: "string"
          description: "Parametro de rota `path`."
      security:
        -
          cookieAuth: []
      requestBody:
        required: false
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/GenericObject"
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/fup-rules/{id}/duplicate":
    post:
      tags:
        - "fup-rules"
      summary: "Cria, executa ou enfileira recurso em /api/fup-rules/{id}/duplicate. Fonte: ia-system/app/api/fup-rules/[id]/duplicate/route.ts."
      operationId: "postFupRulesIdDuplicate"
      x-source-file: "ia-system/app/api/fup-rules/[id]/duplicate/route.ts"
      parameters:
        -
          name: "id"
          in: "path"
          required: true
          schema:
            type: "string"
          description: "Parametro de rota `id`."
      security:
        -
          cookieAuth: []
      requestBody:
        required: false
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/GenericObject"
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/fup-rules/{id}":
    put:
      tags:
        - "fup-rules"
      summary: "Substitui ou atualiza recurso em /api/fup-rules/{id}. Fonte: ia-system/app/api/fup-rules/[id]/route.ts."
      operationId: "putFupRulesId"
      x-source-file: "ia-system/app/api/fup-rules/[id]/route.ts"
      parameters:
        -
          name: "id"
          in: "path"
          required: true
          schema:
            type: "string"
          description: "Parametro de rota `id`."
      security:
        -
          cookieAuth: []
      requestBody:
        required: false
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/GenericObject"
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
    delete:
      tags:
        - "fup-rules"
      summary: "Remove ou cancela recurso em /api/fup-rules/{id}. Fonte: ia-system/app/api/fup-rules/[id]/route.ts."
      operationId: "deleteFupRulesId"
      x-source-file: "ia-system/app/api/fup-rules/[id]/route.ts"
      parameters:
        -
          name: "id"
          in: "path"
          required: true
          schema:
            type: "string"
          description: "Parametro de rota `id`."
      security:
        -
          cookieAuth: []
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        204:
          description: "Recurso removido ou acao concluida sem corpo."
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/fup-rules":
    get:
      tags:
        - "fup-rules"
      summary: "Consulta recurso em /api/fup-rules. Fonte: ia-system/app/api/fup-rules/route.ts."
      operationId: "getFupRules"
      x-source-file: "ia-system/app/api/fup-rules/route.ts"
      security:
        -
          cookieAuth: []
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
    post:
      tags:
        - "fup-rules"
      summary: "Cria, executa ou enfileira recurso em /api/fup-rules. Fonte: ia-system/app/api/fup-rules/route.ts."
      operationId: "postFupRules"
      x-source-file: "ia-system/app/api/fup-rules/route.ts"
      security:
        -
          cookieAuth: []
      requestBody:
        required: false
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/GenericObject"
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/health":
    get:
      tags:
        - "health"
      summary: "Verifica saude basica da aplicacao"
      operationId: "getHealth"
      x-source-file: "ia-system/app/api/health/route.ts"
      security: []
      responses:
        200:
          description: "Health check da aplicacao."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/HealthResponse"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/instances/{id}":
    put:
      tags:
        - "instances"
      summary: "Substitui ou atualiza recurso em /api/instances/{id}. Fonte: ia-system/app/api/instances/[id]/route.ts."
      operationId: "putInstancesId"
      x-source-file: "ia-system/app/api/instances/[id]/route.ts"
      parameters:
        -
          name: "id"
          in: "path"
          required: true
          schema:
            type: "string"
          description: "Parametro de rota `id`."
      security:
        -
          cookieAuth: []
      requestBody:
        required: false
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/GenericObject"
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
    delete:
      tags:
        - "instances"
      summary: "Remove ou cancela recurso em /api/instances/{id}. Fonte: ia-system/app/api/instances/[id]/route.ts."
      operationId: "deleteInstancesId"
      x-source-file: "ia-system/app/api/instances/[id]/route.ts"
      parameters:
        -
          name: "id"
          in: "path"
          required: true
          schema:
            type: "string"
          description: "Parametro de rota `id`."
      security:
        -
          cookieAuth: []
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        204:
          description: "Recurso removido ou acao concluida sem corpo."
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/instances/{id}/set-webhook":
    post:
      tags:
        - "instances"
      summary: "Cria, executa ou enfileira recurso em /api/instances/{id}/set-webhook. Fonte: ia-system/app/api/instances/[id]/set-webhook/route.ts."
      operationId: "postInstancesIdSetWebhook"
      x-source-file: "ia-system/app/api/instances/[id]/set-webhook/route.ts"
      parameters:
        -
          name: "id"
          in: "path"
          required: true
          schema:
            type: "string"
          description: "Parametro de rota `id`."
      security:
        -
          cookieAuth: []
      requestBody:
        required: false
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/GenericObject"
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/instances":
    get:
      tags:
        - "instances"
      summary: "Consulta recurso em /api/instances. Fonte: ia-system/app/api/instances/route.ts."
      operationId: "getInstances"
      x-source-file: "ia-system/app/api/instances/route.ts"
      security:
        -
          cookieAuth: []
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
    post:
      tags:
        - "instances"
      summary: "Cria, executa ou enfileira recurso em /api/instances. Fonte: ia-system/app/api/instances/route.ts."
      operationId: "postInstances"
      x-source-file: "ia-system/app/api/instances/route.ts"
      security:
        -
          cookieAuth: []
      requestBody:
        required: false
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/GenericObject"
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/intelligence/batch-trigger":
    post:
      tags:
        - "intelligence"
      summary: "Cria, executa ou enfileira recurso em /api/intelligence/batch-trigger. Fonte: ia-system/app/api/intelligence/batch-trigger/route.ts."
      operationId: "postIntelligenceBatchTrigger"
      x-source-file: "ia-system/app/api/intelligence/batch-trigger/route.ts"
      security:
        -
          cookieAuth: []
      requestBody:
        required: false
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/GenericObject"
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/intelligence/conversations/{leadId}":
    get:
      tags:
        - "intelligence"
      summary: "Consulta recurso em /api/intelligence/conversations/{leadId}. Fonte: ia-system/app/api/intelligence/conversations/[leadId]/route.ts."
      operationId: "getIntelligenceConversationsLeadId"
      x-source-file: "ia-system/app/api/intelligence/conversations/[leadId]/route.ts"
      parameters:
        -
          name: "leadId"
          in: "path"
          required: true
          schema:
            type: "string"
          description: "Parametro de rota `leadId`."
      security:
        -
          cookieAuth: []
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/intelligence/conversations":
    get:
      tags:
        - "intelligence"
      summary: "Consulta recurso em /api/intelligence/conversations. Fonte: ia-system/app/api/intelligence/conversations/route.ts."
      operationId: "getIntelligenceConversations"
      x-source-file: "ia-system/app/api/intelligence/conversations/route.ts"
      security:
        -
          cookieAuth: []
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/intelligence/funnel":
    get:
      tags:
        - "intelligence"
      summary: "Consulta recurso em /api/intelligence/funnel. Fonte: ia-system/app/api/intelligence/funnel/route.ts."
      operationId: "getIntelligenceFunnel"
      x-source-file: "ia-system/app/api/intelligence/funnel/route.ts"
      security:
        -
          cookieAuth: []
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/intelligence/generate-report":
    post:
      tags:
        - "intelligence"
      summary: "Cria, executa ou enfileira recurso em /api/intelligence/generate-report. Fonte: ia-system/app/api/intelligence/generate-report/route.ts."
      operationId: "postIntelligenceGenerateReport"
      x-source-file: "ia-system/app/api/intelligence/generate-report/route.ts"
      security:
        -
          cookieAuth: []
      requestBody:
        required: false
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/GenericObject"
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/intelligence/objections":
    get:
      tags:
        - "intelligence"
      summary: "Consulta recurso em /api/intelligence/objections. Fonte: ia-system/app/api/intelligence/objections/route.ts."
      operationId: "getIntelligenceObjections"
      x-source-file: "ia-system/app/api/intelligence/objections/route.ts"
      security:
        -
          cookieAuth: []
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/intelligence/patterns":
    get:
      tags:
        - "intelligence"
      summary: "Consulta recurso em /api/intelligence/patterns. Fonte: ia-system/app/api/intelligence/patterns/route.ts."
      operationId: "getIntelligencePatterns"
      x-source-file: "ia-system/app/api/intelligence/patterns/route.ts"
      security:
        -
          cookieAuth: []
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/intelligence/personas":
    get:
      tags:
        - "intelligence"
      summary: "Consulta recurso em /api/intelligence/personas. Fonte: ia-system/app/api/intelligence/personas/route.ts."
      operationId: "getIntelligencePersonas"
      x-source-file: "ia-system/app/api/intelligence/personas/route.ts"
      security:
        -
          cookieAuth: []
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/intelligence/reports/{reportId}":
    get:
      tags:
        - "intelligence"
      summary: "Consulta recurso em /api/intelligence/reports/{reportId}. Fonte: ia-system/app/api/intelligence/reports/[reportId]/route.ts."
      operationId: "getIntelligenceReportsReportId"
      x-source-file: "ia-system/app/api/intelligence/reports/[reportId]/route.ts"
      parameters:
        -
          name: "reportId"
          in: "path"
          required: true
          schema:
            type: "string"
          description: "Parametro de rota `reportId`."
      security:
        -
          cookieAuth: []
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/intelligence/reports":
    get:
      tags:
        - "intelligence"
      summary: "Consulta recurso em /api/intelligence/reports. Fonte: ia-system/app/api/intelligence/reports/route.ts."
      operationId: "getIntelligenceReports"
      x-source-file: "ia-system/app/api/intelligence/reports/route.ts"
      security:
        -
          cookieAuth: []
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/intelligence/trigger":
    post:
      tags:
        - "intelligence"
      summary: "Cria, executa ou enfileira recurso em /api/intelligence/trigger. Fonte: ia-system/app/api/intelligence/trigger/route.ts."
      operationId: "postIntelligenceTrigger"
      x-source-file: "ia-system/app/api/intelligence/trigger/route.ts"
      security:
        -
          cookieAuth: []
      requestBody:
        required: false
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/GenericObject"
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/internal/notify-message-status":
    post:
      tags:
        - "internal"
      summary: "Cria, executa ou enfileira recurso em /api/internal/notify-message-status. Fonte: ia-system/app/api/internal/notify-message-status/route.ts."
      operationId: "postInternalNotifyMessageStatus"
      x-source-file: "ia-system/app/api/internal/notify-message-status/route.ts"
      security:
        -
          internalSecret: []
      requestBody:
        required: false
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/GenericObject"
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/internal/notify-message":
    post:
      tags:
        - "internal"
      summary: "Cria, executa ou enfileira recurso em /api/internal/notify-message. Fonte: ia-system/app/api/internal/notify-message/route.ts."
      operationId: "postInternalNotifyMessage"
      x-source-file: "ia-system/app/api/internal/notify-message/route.ts"
      security:
        -
          internalSecret: []
      requestBody:
        required: false
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/GenericObject"
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/internal/process-result":
    post:
      tags:
        - "internal"
      summary: "Recebe resultado do motor LangGraph"
      operationId: "postInternalProcessResult"
      x-source-file: "ia-system/app/api/internal/process-result/route.ts"
      security:
        -
          internalSecret: []
      requestBody:
        required: false
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/GenericObject"
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/knowledge/{id}/chunks":
    get:
      tags:
        - "knowledge"
      summary: "Consulta recurso em /api/knowledge/{id}/chunks. Fonte: ia-system/app/api/knowledge/[id]/chunks/route.ts."
      operationId: "getKnowledgeIdChunks"
      x-source-file: "ia-system/app/api/knowledge/[id]/chunks/route.ts"
      parameters:
        -
          name: "id"
          in: "path"
          required: true
          schema:
            type: "string"
          description: "Parametro de rota `id`."
      security:
        -
          cookieAuth: []
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/knowledge/{id}":
    get:
      tags:
        - "knowledge"
      summary: "Consulta recurso em /api/knowledge/{id}. Fonte: ia-system/app/api/knowledge/[id]/route.ts."
      operationId: "getKnowledgeId"
      x-source-file: "ia-system/app/api/knowledge/[id]/route.ts"
      parameters:
        -
          name: "id"
          in: "path"
          required: true
          schema:
            type: "string"
          description: "Parametro de rota `id`."
      security:
        -
          cookieAuth: []
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
    put:
      tags:
        - "knowledge"
      summary: "Substitui ou atualiza recurso em /api/knowledge/{id}. Fonte: ia-system/app/api/knowledge/[id]/route.ts."
      operationId: "putKnowledgeId"
      x-source-file: "ia-system/app/api/knowledge/[id]/route.ts"
      parameters:
        -
          name: "id"
          in: "path"
          required: true
          schema:
            type: "string"
          description: "Parametro de rota `id`."
      security:
        -
          cookieAuth: []
      requestBody:
        required: false
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/GenericObject"
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
    delete:
      tags:
        - "knowledge"
      summary: "Remove ou cancela recurso em /api/knowledge/{id}. Fonte: ia-system/app/api/knowledge/[id]/route.ts."
      operationId: "deleteKnowledgeId"
      x-source-file: "ia-system/app/api/knowledge/[id]/route.ts"
      parameters:
        -
          name: "id"
          in: "path"
          required: true
          schema:
            type: "string"
          description: "Parametro de rota `id`."
      security:
        -
          cookieAuth: []
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        204:
          description: "Recurso removido ou acao concluida sem corpo."
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/knowledge/{id}/sources":
    get:
      tags:
        - "knowledge"
      summary: "Consulta recurso em /api/knowledge/{id}/sources. Fonte: ia-system/app/api/knowledge/[id]/sources/route.ts."
      operationId: "getKnowledgeIdSources"
      x-source-file: "ia-system/app/api/knowledge/[id]/sources/route.ts"
      parameters:
        -
          name: "id"
          in: "path"
          required: true
          schema:
            type: "string"
          description: "Parametro de rota `id`."
      security:
        -
          cookieAuth: []
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
    post:
      tags:
        - "knowledge"
      summary: "Cria, executa ou enfileira recurso em /api/knowledge/{id}/sources. Fonte: ia-system/app/api/knowledge/[id]/sources/route.ts."
      operationId: "postKnowledgeIdSources"
      x-source-file: "ia-system/app/api/knowledge/[id]/sources/route.ts"
      parameters:
        -
          name: "id"
          in: "path"
          required: true
          schema:
            type: "string"
          description: "Parametro de rota `id`."
      security:
        -
          cookieAuth: []
      requestBody:
        required: false
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/GenericObject"
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
    delete:
      tags:
        - "knowledge"
      summary: "Remove ou cancela recurso em /api/knowledge/{id}/sources. Fonte: ia-system/app/api/knowledge/[id]/sources/route.ts."
      operationId: "deleteKnowledgeIdSources"
      x-source-file: "ia-system/app/api/knowledge/[id]/sources/route.ts"
      parameters:
        -
          name: "id"
          in: "path"
          required: true
          schema:
            type: "string"
          description: "Parametro de rota `id`."
      security:
        -
          cookieAuth: []
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        204:
          description: "Recurso removido ou acao concluida sem corpo."
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/knowledge":
    get:
      tags:
        - "knowledge"
      summary: "Consulta recurso em /api/knowledge. Fonte: ia-system/app/api/knowledge/route.ts."
      operationId: "getKnowledge"
      x-source-file: "ia-system/app/api/knowledge/route.ts"
      security:
        -
          cookieAuth: []
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
    post:
      tags:
        - "knowledge"
      summary: "Cria, executa ou enfileira recurso em /api/knowledge. Fonte: ia-system/app/api/knowledge/route.ts."
      operationId: "postKnowledge"
      x-source-file: "ia-system/app/api/knowledge/route.ts"
      security:
        -
          cookieAuth: []
      requestBody:
        required: false
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/GenericObject"
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/kpis":
    get:
      tags:
        - "kpis"
      summary: "Consulta recurso em /api/kpis. Fonte: ia-system/app/api/kpis/route.ts."
      operationId: "getKpis"
      x-source-file: "ia-system/app/api/kpis/route.ts"
      security:
        -
          cookieAuth: []
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/leads/{leadId}/messages":
    get:
      tags:
        - "leads"
      summary: "Consulta recurso em /api/leads/{leadId}/messages. Fonte: ia-system/app/api/leads/[leadId]/messages/route.ts."
      operationId: "getLeadsLeadIdMessages"
      x-source-file: "ia-system/app/api/leads/[leadId]/messages/route.ts"
      parameters:
        -
          name: "leadId"
          in: "path"
          required: true
          schema:
            type: "string"
          description: "Parametro de rota `leadId`."
      security:
        -
          cookieAuth: []
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
    delete:
      tags:
        - "leads"
      summary: "Remove ou cancela recurso em /api/leads/{leadId}/messages. Fonte: ia-system/app/api/leads/[leadId]/messages/route.ts."
      operationId: "deleteLeadsLeadIdMessages"
      x-source-file: "ia-system/app/api/leads/[leadId]/messages/route.ts"
      parameters:
        -
          name: "leadId"
          in: "path"
          required: true
          schema:
            type: "string"
          description: "Parametro de rota `leadId`."
      security:
        -
          cookieAuth: []
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        204:
          description: "Recurso removido ou acao concluida sem corpo."
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/leads/{leadId}/release":
    post:
      tags:
        - "leads"
      summary: "Cria, executa ou enfileira recurso em /api/leads/{leadId}/release. Fonte: ia-system/app/api/leads/[leadId]/release/route.ts."
      operationId: "postLeadsLeadIdRelease"
      x-source-file: "ia-system/app/api/leads/[leadId]/release/route.ts"
      parameters:
        -
          name: "leadId"
          in: "path"
          required: true
          schema:
            type: "string"
          description: "Parametro de rota `leadId`."
      security:
        -
          cookieAuth: []
      requestBody:
        required: false
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/GenericObject"
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/leads/{leadId}/reprocess":
    post:
      tags:
        - "leads"
      summary: "Cria, executa ou enfileira recurso em /api/leads/{leadId}/reprocess. Fonte: ia-system/app/api/leads/[leadId]/reprocess/route.ts."
      operationId: "postLeadsLeadIdReprocess"
      x-source-file: "ia-system/app/api/leads/[leadId]/reprocess/route.ts"
      parameters:
        -
          name: "leadId"
          in: "path"
          required: true
          schema:
            type: "string"
          description: "Parametro de rota `leadId`."
      security:
        -
          cookieAuth: []
      requestBody:
        required: false
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/GenericObject"
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/leads/{leadId}":
    patch:
      tags:
        - "leads"
      summary: "Atualiza parcialmente recurso em /api/leads/{leadId}. Fonte: ia-system/app/api/leads/[leadId]/route.ts."
      operationId: "patchLeadsLeadId"
      x-source-file: "ia-system/app/api/leads/[leadId]/route.ts"
      parameters:
        -
          name: "leadId"
          in: "path"
          required: true
          schema:
            type: "string"
          description: "Parametro de rota `leadId`."
      security:
        -
          cookieAuth: []
      requestBody:
        required: false
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/GenericObject"
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
    delete:
      tags:
        - "leads"
      summary: "Remove ou cancela recurso em /api/leads/{leadId}. Fonte: ia-system/app/api/leads/[leadId]/route.ts."
      operationId: "deleteLeadsLeadId"
      x-source-file: "ia-system/app/api/leads/[leadId]/route.ts"
      parameters:
        -
          name: "leadId"
          in: "path"
          required: true
          schema:
            type: "string"
          description: "Parametro de rota `leadId`."
      security:
        -
          cookieAuth: []
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        204:
          description: "Recurso removido ou acao concluida sem corpo."
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/leads/{leadId}/stage":
    patch:
      tags:
        - "leads"
      summary: "Atualiza parcialmente recurso em /api/leads/{leadId}/stage. Fonte: ia-system/app/api/leads/[leadId]/stage/route.ts."
      operationId: "patchLeadsLeadIdStage"
      x-source-file: "ia-system/app/api/leads/[leadId]/stage/route.ts"
      parameters:
        -
          name: "leadId"
          in: "path"
          required: true
          schema:
            type: "string"
          description: "Parametro de rota `leadId`."
      security:
        -
          cookieAuth: []
      requestBody:
        required: false
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/GenericObject"
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/leads/{leadId}/stage/validate":
    post:
      tags:
        - "leads"
      summary: "Cria, executa ou enfileira recurso em /api/leads/{leadId}/stage/validate. Fonte: ia-system/app/api/leads/[leadId]/stage/validate/route.ts."
      operationId: "postLeadsLeadIdStageValidate"
      x-source-file: "ia-system/app/api/leads/[leadId]/stage/validate/route.ts"
      parameters:
        -
          name: "leadId"
          in: "path"
          required: true
          schema:
            type: "string"
          description: "Parametro de rota `leadId`."
      security:
        -
          cookieAuth: []
      requestBody:
        required: false
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/GenericObject"
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/leads/{leadId}/takeover":
    post:
      tags:
        - "leads"
      summary: "Cria, executa ou enfileira recurso em /api/leads/{leadId}/takeover. Fonte: ia-system/app/api/leads/[leadId]/takeover/route.ts."
      operationId: "postLeadsLeadIdTakeover"
      x-source-file: "ia-system/app/api/leads/[leadId]/takeover/route.ts"
      parameters:
        -
          name: "leadId"
          in: "path"
          required: true
          schema:
            type: "string"
          description: "Parametro de rota `leadId`."
      security:
        -
          cookieAuth: []
      requestBody:
        required: false
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/GenericObject"
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/leads":
    get:
      tags:
        - "leads"
      summary: "Consulta recurso em /api/leads. Fonte: ia-system/app/api/leads/route.ts."
      operationId: "getLeads"
      x-source-file: "ia-system/app/api/leads/route.ts"
      security:
        -
          cookieAuth: []
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/learning/stats":
    get:
      tags:
        - "learning"
      summary: "Consulta recurso em /api/learning/stats. Fonte: ia-system/app/api/learning/stats/route.ts."
      operationId: "getLearningStats"
      x-source-file: "ia-system/app/api/learning/stats/route.ts"
      security:
        -
          cookieAuth: []
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/learning/trigger-dspy":
    post:
      tags:
        - "learning"
      summary: "Cria, executa ou enfileira recurso em /api/learning/trigger-dspy. Fonte: ia-system/app/api/learning/trigger-dspy/route.ts."
      operationId: "postLearningTriggerDspy"
      x-source-file: "ia-system/app/api/learning/trigger-dspy/route.ts"
      security:
        -
          cookieAuth: []
      requestBody:
        required: false
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/GenericObject"
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/learning/trigger-finetune":
    post:
      tags:
        - "learning"
      summary: "Cria, executa ou enfileira recurso em /api/learning/trigger-finetune. Fonte: ia-system/app/api/learning/trigger-finetune/route.ts."
      operationId: "postLearningTriggerFinetune"
      x-source-file: "ia-system/app/api/learning/trigger-finetune/route.ts"
      security:
        -
          cookieAuth: []
      requestBody:
        required: false
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/GenericObject"
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/media/{path}":
    get:
      tags:
        - "media"
      summary: "Consulta recurso em /api/media/{path}. Fonte: ia-system/app/api/media/[...path]/route.ts."
      operationId: "getMediaPath"
      x-source-file: "ia-system/app/api/media/[...path]/route.ts"
      parameters:
        -
          name: "path"
          in: "path"
          required: true
          schema:
            type: "string"
          description: "Parametro de rota `path`."
      security: []
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/media/upload":
    post:
      tags:
        - "media"
      summary: "Cria, executa ou enfileira recurso em /api/media/upload. Fonte: ia-system/app/api/media/upload/route.ts."
      operationId: "postMediaUpload"
      x-source-file: "ia-system/app/api/media/upload/route.ts"
      security: []
      requestBody:
        required: false
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/GenericObject"
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/messages/{id}":
    put:
      tags:
        - "messages"
      summary: "Substitui ou atualiza recurso em /api/messages/{id}. Fonte: ia-system/app/api/messages/[id]/route.ts."
      operationId: "putMessagesId"
      x-source-file: "ia-system/app/api/messages/[id]/route.ts"
      parameters:
        -
          name: "id"
          in: "path"
          required: true
          schema:
            type: "string"
          description: "Parametro de rota `id`."
      security:
        -
          cookieAuth: []
      requestBody:
        required: false
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/GenericObject"
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
    delete:
      tags:
        - "messages"
      summary: "Remove ou cancela recurso em /api/messages/{id}. Fonte: ia-system/app/api/messages/[id]/route.ts."
      operationId: "deleteMessagesId"
      x-source-file: "ia-system/app/api/messages/[id]/route.ts"
      parameters:
        -
          name: "id"
          in: "path"
          required: true
          schema:
            type: "string"
          description: "Parametro de rota `id`."
      security:
        -
          cookieAuth: []
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        204:
          description: "Recurso removido ou acao concluida sem corpo."
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/messages/send":
    post:
      tags:
        - "messages"
      summary: "Envia mensagem por provedor conectado"
      operationId: "postMessagesSend"
      x-source-file: "ia-system/app/api/messages/send/route.ts"
      security:
        -
          cookieAuth: []
      requestBody:
        required: false
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/GenericObject"
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/metrics/conversion":
    get:
      tags:
        - "metrics"
      summary: "Consulta recurso em /api/metrics/conversion. Fonte: ia-system/app/api/metrics/conversion/route.ts."
      operationId: "getMetricsConversion"
      x-source-file: "ia-system/app/api/metrics/conversion/route.ts"
      security:
        -
          cookieAuth: []
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/metrics/snapshot":
    get:
      tags:
        - "metrics"
      summary: "Consulta recurso em /api/metrics/snapshot. Fonte: ia-system/app/api/metrics/snapshot/route.ts."
      operationId: "getMetricsSnapshot"
      x-source-file: "ia-system/app/api/metrics/snapshot/route.ts"
      security:
        -
          cookieAuth: []
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
    post:
      tags:
        - "metrics"
      summary: "Cria, executa ou enfileira recurso em /api/metrics/snapshot. Fonte: ia-system/app/api/metrics/snapshot/route.ts."
      operationId: "postMetricsSnapshot"
      x-source-file: "ia-system/app/api/metrics/snapshot/route.ts"
      security:
        -
          cookieAuth: []
      requestBody:
        required: false
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/GenericObject"
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/payment-gateways/logs":
    get:
      tags:
        - "payment-gateways"
      summary: "Consulta recurso em /api/payment-gateways/logs. Fonte: ia-system/app/api/payment-gateways/logs/route.ts."
      operationId: "getPaymentGatewaysLogs"
      x-source-file: "ia-system/app/api/payment-gateways/logs/route.ts"
      security:
        -
          cookieAuth: []
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/payment-gateways":
    get:
      tags:
        - "payment-gateways"
      summary: "Consulta recurso em /api/payment-gateways. Fonte: ia-system/app/api/payment-gateways/route.ts."
      operationId: "getPaymentGateways"
      x-source-file: "ia-system/app/api/payment-gateways/route.ts"
      security:
        -
          cookieAuth: []
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
    post:
      tags:
        - "payment-gateways"
      summary: "Cria, executa ou enfileira recurso em /api/payment-gateways. Fonte: ia-system/app/api/payment-gateways/route.ts."
      operationId: "postPaymentGateways"
      x-source-file: "ia-system/app/api/payment-gateways/route.ts"
      security:
        -
          cookieAuth: []
      requestBody:
        required: false
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/GenericObject"
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
    delete:
      tags:
        - "payment-gateways"
      summary: "Remove ou cancela recurso em /api/payment-gateways. Fonte: ia-system/app/api/payment-gateways/route.ts."
      operationId: "deletePaymentGateways"
      x-source-file: "ia-system/app/api/payment-gateways/route.ts"
      security:
        -
          cookieAuth: []
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        204:
          description: "Recurso removido ou acao concluida sem corpo."
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/pipelines/{id}":
    put:
      tags:
        - "pipelines"
      summary: "Substitui ou atualiza recurso em /api/pipelines/{id}. Fonte: ia-system/app/api/pipelines/[id]/route.ts."
      operationId: "putPipelinesId"
      x-source-file: "ia-system/app/api/pipelines/[id]/route.ts"
      parameters:
        -
          name: "id"
          in: "path"
          required: true
          schema:
            type: "string"
          description: "Parametro de rota `id`."
      security:
        -
          cookieAuth: []
      requestBody:
        required: false
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/GenericObject"
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
    delete:
      tags:
        - "pipelines"
      summary: "Remove ou cancela recurso em /api/pipelines/{id}. Fonte: ia-system/app/api/pipelines/[id]/route.ts."
      operationId: "deletePipelinesId"
      x-source-file: "ia-system/app/api/pipelines/[id]/route.ts"
      parameters:
        -
          name: "id"
          in: "path"
          required: true
          schema:
            type: "string"
          description: "Parametro de rota `id`."
      security:
        -
          cookieAuth: []
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        204:
          description: "Recurso removido ou acao concluida sem corpo."
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/pipelines":
    get:
      tags:
        - "pipelines"
      summary: "Consulta recurso em /api/pipelines. Fonte: ia-system/app/api/pipelines/route.ts."
      operationId: "getPipelines"
      x-source-file: "ia-system/app/api/pipelines/route.ts"
      security:
        -
          cookieAuth: []
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
    post:
      tags:
        - "pipelines"
      summary: "Cria, executa ou enfileira recurso em /api/pipelines. Fonte: ia-system/app/api/pipelines/route.ts."
      operationId: "postPipelines"
      x-source-file: "ia-system/app/api/pipelines/route.ts"
      security:
        -
          cookieAuth: []
      requestBody:
        required: false
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/GenericObject"
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/products/{id}":
    put:
      tags:
        - "products"
      summary: "Substitui ou atualiza recurso em /api/products/{id}. Fonte: ia-system/app/api/products/[id]/route.ts."
      operationId: "putProductsId"
      x-source-file: "ia-system/app/api/products/[id]/route.ts"
      parameters:
        -
          name: "id"
          in: "path"
          required: true
          schema:
            type: "string"
          description: "Parametro de rota `id`."
      security:
        -
          cookieAuth: []
      requestBody:
        required: false
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/GenericObject"
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
    delete:
      tags:
        - "products"
      summary: "Remove ou cancela recurso em /api/products/{id}. Fonte: ia-system/app/api/products/[id]/route.ts."
      operationId: "deleteProductsId"
      x-source-file: "ia-system/app/api/products/[id]/route.ts"
      parameters:
        -
          name: "id"
          in: "path"
          required: true
          schema:
            type: "string"
          description: "Parametro de rota `id`."
      security:
        -
          cookieAuth: []
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        204:
          description: "Recurso removido ou acao concluida sem corpo."
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/products":
    get:
      tags:
        - "products"
      summary: "Consulta recurso em /api/products. Fonte: ia-system/app/api/products/route.ts."
      operationId: "getProducts"
      x-source-file: "ia-system/app/api/products/route.ts"
      security:
        -
          cookieAuth: []
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
    post:
      tags:
        - "products"
      summary: "Cria, executa ou enfileira recurso em /api/products. Fonte: ia-system/app/api/products/route.ts."
      operationId: "postProducts"
      x-source-file: "ia-system/app/api/products/route.ts"
      security:
        -
          cookieAuth: []
      requestBody:
        required: false
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/GenericObject"
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/settings/keys/{provider}":
    delete:
      tags:
        - "settings"
      summary: "Remove ou cancela recurso em /api/settings/keys/{provider}. Fonte: ia-system/app/api/settings/keys/[provider]/route.ts."
      operationId: "deleteSettingsKeysProvider"
      x-source-file: "ia-system/app/api/settings/keys/[provider]/route.ts"
      parameters:
        -
          name: "provider"
          in: "path"
          required: true
          schema:
            type: "string"
          description: "Parametro de rota `provider`."
      security:
        -
          cookieAuth: []
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        204:
          description: "Recurso removido ou acao concluida sem corpo."
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/settings/keys":
    get:
      tags:
        - "settings"
      summary: "Consulta recurso em /api/settings/keys. Fonte: ia-system/app/api/settings/keys/route.ts."
      operationId: "getSettingsKeys"
      x-source-file: "ia-system/app/api/settings/keys/route.ts"
      security:
        -
          cookieAuth: []
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
    post:
      tags:
        - "settings"
      summary: "Cria, executa ou enfileira recurso em /api/settings/keys. Fonte: ia-system/app/api/settings/keys/route.ts."
      operationId: "postSettingsKeys"
      x-source-file: "ia-system/app/api/settings/keys/route.ts"
      security:
        -
          cookieAuth: []
      requestBody:
        required: false
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/GenericObject"
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/settings/models":
    get:
      tags:
        - "settings"
      summary: "Consulta recurso em /api/settings/models. Fonte: ia-system/app/api/settings/models/route.ts."
      operationId: "getSettingsModels"
      x-source-file: "ia-system/app/api/settings/models/route.ts"
      security:
        -
          cookieAuth: []
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/setup":
    get:
      tags:
        - "setup"
      summary: "Consulta se a instalacao ainda precisa de setup inicial"
      operationId: "getSetup"
      x-source-file: "ia-system/app/api/setup/route.ts"
      security: []
      responses:
        200:
          description: "Status do setup inicial."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/SetupStatusResponse"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
    post:
      tags:
        - "setup"
      summary: "Cria o primeiro superadmin da instalacao"
      operationId: "postSetup"
      x-source-file: "ia-system/app/api/setup/route.ts"
      security: []
      requestBody:
        required: true
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/SetupRequest"
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        201:
          description: "Primeiro superadmin criado."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/SetupResponse"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        409:
          "$ref": "#/components/responses/Conflict"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/sse/{leadId}":
    get:
      tags:
        - "sse"
      summary: "Consulta recurso em /api/sse/{leadId}. Fonte: ia-system/app/api/sse/[leadId]/route.ts."
      operationId: "getSseLeadId"
      x-source-file: "ia-system/app/api/sse/[leadId]/route.ts"
      parameters:
        -
          name: "leadId"
          in: "path"
          required: true
          schema:
            type: "string"
          description: "Parametro de rota `leadId`."
      security:
        -
          cookieAuth: []
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/sse/global":
    get:
      tags:
        - "sse"
      summary: "Consulta recurso em /api/sse/global. Fonte: ia-system/app/api/sse/global/route.ts."
      operationId: "getSseGlobal"
      x-source-file: "ia-system/app/api/sse/global/route.ts"
      security:
        -
          cookieAuth: []
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/tags/{id}":
    put:
      tags:
        - "tags"
      summary: "Substitui ou atualiza recurso em /api/tags/{id}. Fonte: ia-system/app/api/tags/[id]/route.ts."
      operationId: "putTagsId"
      x-source-file: "ia-system/app/api/tags/[id]/route.ts"
      parameters:
        -
          name: "id"
          in: "path"
          required: true
          schema:
            type: "string"
          description: "Parametro de rota `id`."
      security:
        -
          cookieAuth: []
      requestBody:
        required: false
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/GenericObject"
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
    delete:
      tags:
        - "tags"
      summary: "Remove ou cancela recurso em /api/tags/{id}. Fonte: ia-system/app/api/tags/[id]/route.ts."
      operationId: "deleteTagsId"
      x-source-file: "ia-system/app/api/tags/[id]/route.ts"
      parameters:
        -
          name: "id"
          in: "path"
          required: true
          schema:
            type: "string"
          description: "Parametro de rota `id`."
      security:
        -
          cookieAuth: []
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        204:
          description: "Recurso removido ou acao concluida sem corpo."
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/tags":
    get:
      tags:
        - "tags"
      summary: "Consulta recurso em /api/tags. Fonte: ia-system/app/api/tags/route.ts."
      operationId: "getTags"
      x-source-file: "ia-system/app/api/tags/route.ts"
      security:
        -
          cookieAuth: []
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
    post:
      tags:
        - "tags"
      summary: "Cria, executa ou enfileira recurso em /api/tags. Fonte: ia-system/app/api/tags/route.ts."
      operationId: "postTags"
      x-source-file: "ia-system/app/api/tags/route.ts"
      security:
        -
          cookieAuth: []
      requestBody:
        required: false
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/GenericObject"
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/templates/{id}":
    delete:
      tags:
        - "templates"
      summary: "Remove ou cancela recurso em /api/templates/{id}. Fonte: ia-system/app/api/templates/[id]/route.ts."
      operationId: "deleteTemplatesId"
      x-source-file: "ia-system/app/api/templates/[id]/route.ts"
      parameters:
        -
          name: "id"
          in: "path"
          required: true
          schema:
            type: "string"
          description: "Parametro de rota `id`."
      security:
        -
          cookieAuth: []
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        204:
          description: "Recurso removido ou acao concluida sem corpo."
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/templates":
    get:
      tags:
        - "templates"
      summary: "Consulta recurso em /api/templates. Fonte: ia-system/app/api/templates/route.ts."
      operationId: "getTemplates"
      x-source-file: "ia-system/app/api/templates/route.ts"
      security:
        -
          cookieAuth: []
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
    post:
      tags:
        - "templates"
      summary: "Cria, executa ou enfileira recurso em /api/templates. Fonte: ia-system/app/api/templates/route.ts."
      operationId: "postTemplates"
      x-source-file: "ia-system/app/api/templates/route.ts"
      security:
        -
          cookieAuth: []
      requestBody:
        required: false
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/GenericObject"
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/templates/sync":
    post:
      tags:
        - "templates"
      summary: "Cria, executa ou enfileira recurso em /api/templates/sync. Fonte: ia-system/app/api/templates/sync/route.ts."
      operationId: "postTemplatesSync"
      x-source-file: "ia-system/app/api/templates/sync/route.ts"
      security:
        -
          cookieAuth: []
      requestBody:
        required: false
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/GenericObject"
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/test/inject-message":
    post:
      tags:
        - "test"
      summary: "Cria, executa ou enfileira recurso em /api/test/inject-message. Fonte: ia-system/app/api/test/inject-message/route.ts."
      operationId: "postTestInjectMessage"
      x-source-file: "ia-system/app/api/test/inject-message/route.ts"
      security:
        -
          cookieAuth: []
      requestBody:
        required: false
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/GenericObject"
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/test/seed-user":
    post:
      tags:
        - "test"
      summary: "Cria, executa ou enfileira recurso em /api/test/seed-user. Fonte: ia-system/app/api/test/seed-user/route.ts."
      operationId: "postTestSeedUser"
      x-source-file: "ia-system/app/api/test/seed-user/route.ts"
      security:
        -
          cookieAuth: []
      requestBody:
        required: false
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/GenericObject"
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/tools/{id}":
    put:
      tags:
        - "tools"
      summary: "Substitui ou atualiza recurso em /api/tools/{id}. Fonte: ia-system/app/api/tools/[id]/route.ts."
      operationId: "putToolsId"
      x-source-file: "ia-system/app/api/tools/[id]/route.ts"
      parameters:
        -
          name: "id"
          in: "path"
          required: true
          schema:
            type: "string"
          description: "Parametro de rota `id`."
      security:
        -
          cookieAuth: []
      requestBody:
        required: false
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/GenericObject"
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
    delete:
      tags:
        - "tools"
      summary: "Remove ou cancela recurso em /api/tools/{id}. Fonte: ia-system/app/api/tools/[id]/route.ts."
      operationId: "deleteToolsId"
      x-source-file: "ia-system/app/api/tools/[id]/route.ts"
      parameters:
        -
          name: "id"
          in: "path"
          required: true
          schema:
            type: "string"
          description: "Parametro de rota `id`."
      security:
        -
          cookieAuth: []
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        204:
          description: "Recurso removido ou acao concluida sem corpo."
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/tools":
    get:
      tags:
        - "tools"
      summary: "Consulta recurso em /api/tools. Fonte: ia-system/app/api/tools/route.ts."
      operationId: "getTools"
      x-source-file: "ia-system/app/api/tools/route.ts"
      security:
        -
          cookieAuth: []
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
    post:
      tags:
        - "tools"
      summary: "Cria, executa ou enfileira recurso em /api/tools. Fonte: ia-system/app/api/tools/route.ts."
      operationId: "postTools"
      x-source-file: "ia-system/app/api/tools/route.ts"
      security:
        -
          cookieAuth: []
      requestBody:
        required: false
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/GenericObject"
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/users/{id}":
    patch:
      tags:
        - "users"
      summary: "Atualiza parcialmente recurso em /api/users/{id}. Fonte: ia-system/app/api/users/[id]/route.ts."
      operationId: "patchUsersId"
      x-source-file: "ia-system/app/api/users/[id]/route.ts"
      parameters:
        -
          name: "id"
          in: "path"
          required: true
          schema:
            type: "string"
          description: "Parametro de rota `id`."
      security:
        -
          cookieAuth: []
      requestBody:
        required: false
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/GenericObject"
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
    delete:
      tags:
        - "users"
      summary: "Remove ou cancela recurso em /api/users/{id}. Fonte: ia-system/app/api/users/[id]/route.ts."
      operationId: "deleteUsersId"
      x-source-file: "ia-system/app/api/users/[id]/route.ts"
      parameters:
        -
          name: "id"
          in: "path"
          required: true
          schema:
            type: "string"
          description: "Parametro de rota `id`."
      security:
        -
          cookieAuth: []
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        204:
          description: "Recurso removido ou acao concluida sem corpo."
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/users":
    get:
      tags:
        - "users"
      summary: "Consulta recurso em /api/users. Fonte: ia-system/app/api/users/route.ts."
      operationId: "getUsers"
      x-source-file: "ia-system/app/api/users/route.ts"
      security:
        -
          cookieAuth: []
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
    post:
      tags:
        - "users"
      summary: "Cria, executa ou enfileira recurso em /api/users. Fonte: ia-system/app/api/users/route.ts."
      operationId: "postUsers"
      x-source-file: "ia-system/app/api/users/route.ts"
      security:
        -
          cookieAuth: []
      requestBody:
        required: false
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/GenericObject"
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/v1/agent/{agentId}/chat":
    post:
      tags:
        - "v1"
      summary: "Envia mensagem para um agente via API publica"
      operationId: "postV1AgentAgentIdChat"
      x-source-file: "ia-system/app/api/v1/agent/[agentId]/chat/route.ts"
      parameters:
        -
          name: "agentId"
          in: "path"
          required: true
          schema:
            type: "string"
          description: "Parametro de rota `agentId`."
      security:
        -
          apiKeyAuth: []
      requestBody:
        required: true
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/ApiChatRequest"
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        202:
          description: "Mensagem aceita e processamento iniciado."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/ApiChatAcceptedResponse"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        429:
          "$ref": "#/components/responses/TooManyRequests"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/voice-calls/{id}":
    get:
      tags:
        - "voice-calls"
      summary: "Consulta recurso em /api/voice-calls/{id}. Fonte: ia-system/app/api/voice-calls/[id]/route.ts."
      operationId: "getVoiceCallsId"
      x-source-file: "ia-system/app/api/voice-calls/[id]/route.ts"
      parameters:
        -
          name: "id"
          in: "path"
          required: true
          schema:
            type: "string"
          description: "Parametro de rota `id`."
      security:
        -
          cookieAuth: []
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/voice-calls":
    get:
      tags:
        - "voice-calls"
      summary: "Consulta recurso em /api/voice-calls. Fonte: ia-system/app/api/voice-calls/route.ts."
      operationId: "getVoiceCalls"
      x-source-file: "ia-system/app/api/voice-calls/route.ts"
      security:
        -
          cookieAuth: []
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
    post:
      tags:
        - "voice-calls"
      summary: "Cria, executa ou enfileira recurso em /api/voice-calls. Fonte: ia-system/app/api/voice-calls/route.ts."
      operationId: "postVoiceCalls"
      x-source-file: "ia-system/app/api/voice-calls/route.ts"
      security:
        -
          cookieAuth: []
      requestBody:
        required: false
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/GenericObject"
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/voice-instances/{id}":
    get:
      tags:
        - "voice-instances"
      summary: "Consulta recurso em /api/voice-instances/{id}. Fonte: ia-system/app/api/voice-instances/[id]/route.ts."
      operationId: "getVoiceInstancesId"
      x-source-file: "ia-system/app/api/voice-instances/[id]/route.ts"
      parameters:
        -
          name: "id"
          in: "path"
          required: true
          schema:
            type: "string"
          description: "Parametro de rota `id`."
      security:
        -
          cookieAuth: []
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
    patch:
      tags:
        - "voice-instances"
      summary: "Atualiza parcialmente recurso em /api/voice-instances/{id}. Fonte: ia-system/app/api/voice-instances/[id]/route.ts."
      operationId: "patchVoiceInstancesId"
      x-source-file: "ia-system/app/api/voice-instances/[id]/route.ts"
      parameters:
        -
          name: "id"
          in: "path"
          required: true
          schema:
            type: "string"
          description: "Parametro de rota `id`."
      security:
        -
          cookieAuth: []
      requestBody:
        required: false
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/GenericObject"
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
    delete:
      tags:
        - "voice-instances"
      summary: "Remove ou cancela recurso em /api/voice-instances/{id}. Fonte: ia-system/app/api/voice-instances/[id]/route.ts."
      operationId: "deleteVoiceInstancesId"
      x-source-file: "ia-system/app/api/voice-instances/[id]/route.ts"
      parameters:
        -
          name: "id"
          in: "path"
          required: true
          schema:
            type: "string"
          description: "Parametro de rota `id`."
      security:
        -
          cookieAuth: []
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        204:
          description: "Recurso removido ou acao concluida sem corpo."
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/voice-instances":
    get:
      tags:
        - "voice-instances"
      summary: "Consulta recurso em /api/voice-instances. Fonte: ia-system/app/api/voice-instances/route.ts."
      operationId: "getVoiceInstances"
      x-source-file: "ia-system/app/api/voice-instances/route.ts"
      security:
        -
          cookieAuth: []
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
    post:
      tags:
        - "voice-instances"
      summary: "Cria, executa ou enfileira recurso em /api/voice-instances. Fonte: ia-system/app/api/voice-instances/route.ts."
      operationId: "postVoiceInstances"
      x-source-file: "ia-system/app/api/voice-instances/route.ts"
      security:
        -
          cookieAuth: []
      requestBody:
        required: false
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/GenericObject"
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/voice-tools/{toolName}":
    post:
      tags:
        - "voice-tools"
      summary: "Cria, executa ou enfileira recurso em /api/voice-tools/{toolName}. Fonte: ia-system/app/api/voice-tools/[toolName]/route.ts."
      operationId: "postVoiceToolsToolName"
      x-source-file: "ia-system/app/api/voice-tools/[toolName]/route.ts"
      parameters:
        -
          name: "toolName"
          in: "path"
          required: true
          schema:
            type: "string"
          description: "Parametro de rota `toolName`."
      security:
        -
          cookieAuth: []
      requestBody:
        required: false
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/GenericObject"
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/voice/onboarding":
    get:
      tags:
        - "voice"
      summary: "Consulta recurso em /api/voice/onboarding. Fonte: ia-system/app/api/voice/onboarding/route.ts."
      operationId: "getVoiceOnboarding"
      x-source-file: "ia-system/app/api/voice/onboarding/route.ts"
      security:
        -
          cookieAuth: []
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/webhook/chatwoot":
    post:
      tags:
        - "webhook"
      summary: "Cria, executa ou enfileira recurso em /api/webhook/chatwoot. Fonte: ia-system/app/api/webhook/chatwoot/route.ts."
      operationId: "postWebhookChatwoot"
      x-source-file: "ia-system/app/api/webhook/chatwoot/route.ts"
      security: []
      requestBody:
        required: false
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/GenericObject"
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/webhook/evolution":
    post:
      tags:
        - "webhook"
      summary: "Cria, executa ou enfileira recurso em /api/webhook/evolution. Fonte: ia-system/app/api/webhook/evolution/route.ts."
      operationId: "postWebhookEvolution"
      x-source-file: "ia-system/app/api/webhook/evolution/route.ts"
      security: []
      requestBody:
        required: false
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/GenericObject"
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/webhook/gupshup":
    post:
      tags:
        - "webhook"
      summary: "Cria, executa ou enfileira recurso em /api/webhook/gupshup. Fonte: ia-system/app/api/webhook/gupshup/route.ts."
      operationId: "postWebhookGupshup"
      x-source-file: "ia-system/app/api/webhook/gupshup/route.ts"
      security: []
      requestBody:
        required: false
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/GenericObject"
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/webhook/meta":
    get:
      tags:
        - "webhook"
      summary: "Consulta recurso em /api/webhook/meta. Fonte: ia-system/app/api/webhook/meta/route.ts."
      operationId: "getWebhookMeta"
      x-source-file: "ia-system/app/api/webhook/meta/route.ts"
      security: []
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
    post:
      tags:
        - "webhook"
      summary: "Cria, executa ou enfileira recurso em /api/webhook/meta. Fonte: ia-system/app/api/webhook/meta/route.ts."
      operationId: "postWebhookMeta"
      x-source-file: "ia-system/app/api/webhook/meta/route.ts"
      security: []
      requestBody:
        required: false
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/GenericObject"
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/webhooks/{source}":
    post:
      tags:
        - "webhooks"
      summary: "Cria, executa ou enfileira recurso em /api/webhooks/{source}. Fonte: ia-system/app/api/webhooks/[source]/route.ts."
      operationId: "postWebhooksSource"
      x-source-file: "ia-system/app/api/webhooks/[source]/route.ts"
      parameters:
        -
          name: "source"
          in: "path"
          required: true
          schema:
            type: "string"
          description: "Parametro de rota `source`."
      security: []
      requestBody:
        required: false
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/GenericObject"
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/webhooks/voice/elevenlabs":
    post:
      tags:
        - "webhooks"
      summary: "Cria, executa ou enfileira recurso em /api/webhooks/voice/elevenlabs. Fonte: ia-system/app/api/webhooks/voice/elevenlabs/route.ts."
      operationId: "postWebhooksVoiceElevenlabs"
      x-source-file: "ia-system/app/api/webhooks/voice/elevenlabs/route.ts"
      security: []
      requestBody:
        required: false
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/GenericObject"
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
  "/api/webhooks/voice/twilio":
    post:
      tags:
        - "webhooks"
      summary: "Cria, executa ou enfileira recurso em /api/webhooks/voice/twilio. Fonte: ia-system/app/api/webhooks/voice/twilio/route.ts."
      operationId: "postWebhooksVoiceTwilio"
      x-source-file: "ia-system/app/api/webhooks/voice/twilio/route.ts"
      security: []
      requestBody:
        required: false
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/GenericObject"
      responses:
        200:
          description: "Operacao realizada com sucesso."
          content:
            "application/json":
              schema:
                "$ref": "#/components/schemas/GenericObject"
        400:
          "$ref": "#/components/responses/BadRequest"
        401:
          "$ref": "#/components/responses/Unauthorized"
        403:
          "$ref": "#/components/responses/Forbidden"
        404:
          "$ref": "#/components/responses/NotFound"
        422:
          "$ref": "#/components/responses/UnprocessableEntity"
        500:
          "$ref": "#/components/responses/InternalError"
components:
  securitySchemes:
    cookieAuth:
      type: "apiKey"
      in: "cookie"
      name: "better-auth.session_token"
      description: "Sessao web criada pelo login do Lead Flow IA."
    apiKeyAuth:
      type: "http"
      scheme: "bearer"
      description: "Token/API key para endpoints publicos versionados."
    internalSecret:
      type: "apiKey"
      in: "header"
      name: "x-internal-secret"
      description: "Segredo interno entre servicos ou jobs."
    asaasWebhookToken:
      type: "apiKey"
      in: "header"
      name: "asaas-access-token"
      description: "Token configurado no painel Asaas para webhooks."
  schemas:
    GenericObject:
      type: "object"
      additionalProperties: true
      description: "Objeto JSON. Campos detalhados por endpoint em docs/api.md."
    ApiError:
      type: "object"
      required:
        - "error"
      properties:
        error:
          oneOf:
            -
              type: "string"
            -
              type: "object"
              additionalProperties: true
              properties:
                code:
                  type: "string"
                  example: "validation_error"
                message:
                  type: "string"
                  example: "Request validation failed"
                details:
                  type: "array"
                  items:
                    type: "object"
                    additionalProperties: true
    OkResponse:
      type: "object"
      required:
        - "ok"
      properties:
        ok:
          type: "boolean"
          example: true
    HealthResponse:
      type: "object"
      additionalProperties: true
      properties:
        status:
          type: "string"
          enum:
            - "ok"
            - "degraded"
          example: "ok"
        db:
          type: "string"
          example: "connected (16ms)"
        redis:
          type: "string"
          example: "connected (4ms)"
        checkedAt:
          type: "string"
          format: "date-time"
        uptimeSeconds:
          type: "integer"
          example: 3600
        checks:
          type: "array"
          items:
            type: "object"
            additionalProperties: true
            properties:
              key:
                type: "string"
                example: "db"
              label:
                type: "string"
                example: "Postgres"
              state:
                type: "string"
                enum:
                  - "ok"
                  - "degraded"
              detail:
                type: "string"
                example: "Conectado"
              latencyMs:
                type: "integer"
                example: 16
        bootstrap:
          type: "object"
          additionalProperties: true
          properties:
            required:
              type: "boolean"
              example: false
            users:
              type: "integer"
              example: 1
            superAdmins:
              type: "integer"
              example: 1
    SetupStatusResponse:
      type: "object"
      required:
        - "required"
      properties:
        required:
          type: "boolean"
          example: true
    SetupRequest:
      type: "object"
      required:
        - "name"
        - "email"
        - "password"
      properties:
        name:
          type: "string"
          minLength: 2
          maxLength: 100
          example: "Super Admin"
        email:
          type: "string"
          format: "email"
          maxLength: 200
          example: "admin@example.com"
        password:
          type: "string"
          minLength: 10
          maxLength: 200
          format: "password"
          example: "change-this-password"
    SetupResponse:
      type: "object"
      required:
        - "user"
      properties:
        user:
          "$ref": "#/components/schemas/User"
    User:
      type: "object"
      additionalProperties: true
      properties:
        id:
          type: "string"
          format: "uuid"
        name:
          type: "string"
        email:
          type: "string"
          format: "email"
        role:
          type: "string"
          enum:
            - "super_admin"
            - "admin"
            - "manager"
            - "agent"
            - "viewer"
        workspaceId:
          type: "string"
          format: "uuid"
          nullable: true
        createdAt:
          type: "string"
          format: "date-time"
    Plan:
      type: "object"
      additionalProperties: true
      properties:
        id:
          type: "string"
          format: "uuid"
        code:
          type: "string"
          example: "starter"
        name:
          type: "string"
          example: "Starter"
        description:
          type: "string"
          nullable: true
        billingCycle:
          type: "string"
          enum:
            - "monthly"
            - "yearly"
        priceCents:
          type: "integer"
          minimum: 0
          example: 9700
        currency:
          type: "string"
          example: "BRL"
        status:
          type: "string"
          enum:
            - "draft"
            - "published"
            - "archived"
        trialDays:
          type: "integer"
          minimum: 0
          maximum: 90
          example: 7
        provider:
          type: "string"
          example: "asaas"
        features:
          type: "object"
          additionalProperties: true
    PlanCreateRequest:
      type: "object"
      required:
        - "code"
        - "name"
      properties:
        code:
          type: "string"
          pattern: "^[a-z0-9-]+$"
          example: "starter"
        name:
          type: "string"
          example: "Starter"
        description:
          type: "string"
          nullable: true
        billingCycle:
          type: "string"
          enum:
            - "monthly"
            - "yearly"
          default: "monthly"
        priceCents:
          type: "integer"
          minimum: 0
          default: 0
        status:
          type: "string"
          enum:
            - "draft"
            - "published"
            - "archived"
          default: "draft"
        trialDays:
          type: "integer"
          minimum: 0
          maximum: 90
          default: 7
    PlanUpdateRequest:
      type: "object"
      properties:
        name:
          type: "string"
        description:
          type: "string"
          nullable: true
        billingCycle:
          type: "string"
          enum:
            - "monthly"
            - "yearly"
        priceCents:
          type: "integer"
          minimum: 0
        status:
          type: "string"
          enum:
            - "draft"
            - "published"
            - "archived"
        trialDays:
          type: "integer"
          minimum: 0
          maximum: 90
        features:
          type: "object"
          additionalProperties:
            oneOf:
              -
                type: "boolean"
              -
                type: "number"
              -
                type: "string"
    PlansResponse:
      type: "object"
      required:
        - "plans"
        - "features"
      properties:
        plans:
          type: "array"
          items:
            "$ref": "#/components/schemas/Plan"
        features:
          type: "array"
          items:
            "$ref": "#/components/schemas/Feature"
    PlanResponse:
      type: "object"
      required:
        - "plan"
      properties:
        plan:
          "$ref": "#/components/schemas/Plan"
    Feature:
      type: "object"
      additionalProperties: true
      properties:
        key:
          type: "string"
          example: "broadcast"
        name:
          type: "string"
          example: "Broadcast"
        type:
          type: "string"
          enum:
            - "boolean"
            - "limit"
            - "metered"
        defaultValue:
          oneOf:
            -
              type: "boolean"
            -
              type: "number"
            -
              type: "string"
          nullable: true
    BillingConfigRequest:
      type: "object"
      required:
        - "mode"
        - "isActive"
      properties:
        mode:
          type: "string"
          enum:
            - "sandbox"
            - "production"
        apiKey:
          type: "string"
          minLength: 10
          writeOnly: true
          nullable: true
        webhookToken:
          type: "string"
          minLength: 32
          maxLength: 255
          writeOnly: true
          nullable: true
        isActive:
          type: "boolean"
    BillingConfigResponse:
      type: "object"
      properties:
        config:
          type: "object"
          additionalProperties: true
          properties:
            provider:
              type: "string"
              example: "asaas"
            mode:
              type: "string"
              enum:
                - "sandbox"
                - "production"
            apiKeyMasked:
              type: "string"
              example: "asaas_****1234"
              nullable: true
            webhookTokenMasked:
              type: "string"
              example: "****abcd"
              nullable: true
            isActive:
              type: "boolean"
            updatedAt:
              type: "string"
              format: "date-time"
          nullable: true
    CheckoutLink:
      type: "object"
      additionalProperties: true
      properties:
        id:
          type: "string"
          format: "uuid"
        slug:
          type: "string"
          example: "starter"
        title:
          type: "string"
          example: "Assinar Starter"
        description:
          type: "string"
          nullable: true
        planId:
          type: "string"
          format: "uuid"
        isActive:
          type: "boolean"
        successUrl:
          type: "string"
          format: "uri"
          nullable: true
    CheckoutCreateRequest:
      type: "object"
      required:
        - "slug"
        - "title"
        - "planId"
      properties:
        slug:
          type: "string"
          pattern: "^[a-z0-9-]+$"
          example: "starter"
        title:
          type: "string"
          example: "Assinar Starter"
        description:
          type: "string"
          nullable: true
        planId:
          type: "string"
          format: "uuid"
        isActive:
          type: "boolean"
          default: true
        successUrl:
          type: "string"
          format: "uri"
          nullable: true
    CheckoutsResponse:
      type: "object"
      required:
        - "checkouts"
      properties:
        checkouts:
          type: "array"
          items:
            "$ref": "#/components/schemas/CheckoutLink"
    CheckoutResponse:
      type: "object"
      required:
        - "checkout"
      properties:
        checkout:
          "$ref": "#/components/schemas/CheckoutLink"
    PublicCheckoutResponse:
      type: "object"
      required:
        - "checkout"
        - "plan"
      properties:
        checkout:
          "$ref": "#/components/schemas/CheckoutLink"
        plan:
          "$ref": "#/components/schemas/Plan"
    SubscribeRequest:
      type: "object"
      required:
        - "workspaceName"
        - "adminName"
        - "adminEmail"
        - "adminPassword"
      properties:
        workspaceName:
          type: "string"
          minLength: 2
          maxLength: 200
          example: "ACME Vendas"
        adminName:
          type: "string"
          minLength: 2
          maxLength: 100
          example: "Ana Souza"
        adminEmail:
          type: "string"
          format: "email"
          example: "ana@example.com"
        adminPassword:
          type: "string"
          minLength: 10
          format: "password"
        phone:
          type: "string"
          maxLength: 40
          example: "+5511999999999"
          nullable: true
        billingType:
          type: "string"
          enum:
            - "PIX"
            - "BOLETO"
            - "CREDIT_CARD"
            - "UNDEFINED"
          default: "PIX"
    SubscribeResponse:
      type: "object"
      required:
        - "ok"
        - "status"
        - "workspaceId"
        - "asaasSubscriptionId"
        - "message"
      properties:
        ok:
          type: "boolean"
          example: true
        status:
          type: "string"
          enum:
            - "pending"
          example: "pending"
        workspaceId:
          type: "string"
          format: "uuid"
        asaasSubscriptionId:
          type: "string"
        message:
          type: "string"
    AsaasWebhookEvent:
      type: "object"
      additionalProperties: true
      properties:
        id:
          type: "string"
        event:
          type: "string"
          example: "PAYMENT_RECEIVED"
        payment:
          type: "object"
          additionalProperties: true
        subscription:
          type: "object"
          additionalProperties: true
    ApiChatMessage:
      type: "object"
      required:
        - "type"
      properties:
        type:
          type: "string"
          enum:
            - "text"
            - "audio"
            - "image"
        content:
          type: "string"
          example: "Ola, quero saber mais."
        url:
          type: "string"
          format: "uri"
        caption:
          type: "string"
    ApiChatRequest:
      type: "object"
      required:
        - "contact_id"
        - "messages"
      properties:
        contact_id:
          type: "string"
          example: "5511999999999"
        phone:
          type: "string"
          example: "+5511999999999"
        name:
          type: "string"
          example: "Ana Souza"
        thread_id:
          type: "string"
          example: "crm-thread-123"
        context:
          type: "array"
          items:
            type: "object"
            required:
              - "role"
              - "content"
            properties:
              role:
                type: "string"
                enum:
                  - "system"
                  - "user"
                  - "assistant"
              content:
                type: "string"
        messages:
          type: "array"
          minItems: 1
          items:
            "$ref": "#/components/schemas/ApiChatMessage"
        webhook_url:
          type: "string"
          format: "uri"
        webhook_secret:
          type: "string"
          writeOnly: true
        request_id:
          type: "string"
    ApiChatAcceptedResponse:
      type: "object"
      required:
        - "request_id"
        - "thread_id"
        - "lead_id"
        - "status"
      properties:
        request_id:
          type: "string"
        thread_id:
          type: "string"
        lead_id:
          type: "string"
          format: "uuid"
        status:
          type: "string"
          enum:
            - "processing"
    Contact:
      type: "object"
      additionalProperties: true
      properties:
        id:
          type: "string"
          format: "uuid"
        name:
          type: "string"
        phone:
          type: "string"
        email:
          type: "string"
          format: "email"
          nullable: true
        workspaceId:
          type: "string"
          format: "uuid"
        createdAt:
          type: "string"
          format: "date-time"
    ContactCreateRequest:
      type: "object"
      properties:
        name:
          type: "string"
        phone:
          type: "string"
        email:
          type: "string"
          format: "email"
        tags:
          type: "array"
          items:
            type: "string"
        customFields:
          type: "object"
          additionalProperties: true
    ContactsResponse:
      type: "object"
      properties:
        contacts:
          type: "array"
          items:
            "$ref": "#/components/schemas/Contact"
        data:
          type: "array"
          items:
            "$ref": "#/components/schemas/Contact"
        meta:
          type: "object"
          additionalProperties: true
    Agent:
      type: "object"
      additionalProperties: true
      properties:
        id:
          type: "string"
          format: "uuid"
        name:
          type: "string"
        workspaceId:
          type: "string"
          format: "uuid"
        model:
          type: "string"
        active:
          type: "boolean"
        createdAt:
          type: "string"
          format: "date-time"
    AgentCreateRequest:
      type: "object"
      required:
        - "name"
      properties:
        name:
          type: "string"
        model:
          type: "string"
        systemPrompt:
          type: "string"
        temperature:
          type: "number"
          minimum: 0
          maximum: 2
        active:
          type: "boolean"
    AgentsResponse:
      type: "object"
      properties:
        agents:
          type: "array"
          items:
            "$ref": "#/components/schemas/Agent"
        data:
          type: "array"
          items:
            "$ref": "#/components/schemas/Agent"
    AgentResponse:
      type: "object"
      properties:
        agent:
          "$ref": "#/components/schemas/Agent"
        data:
          "$ref": "#/components/schemas/Agent"
    Broadcast:
      type: "object"
      additionalProperties: true
      properties:
        id:
          type: "string"
          format: "uuid"
        name:
          type: "string"
        status:
          type: "string"
          enum:
            - "draft"
            - "scheduled"
            - "sending"
            - "paused"
            - "failed"
            - "done"
            - "canceled"
        scheduledAt:
          type: "string"
          format: "date-time"
          nullable: true
        workspaceId:
          type: "string"
          format: "uuid"
    BroadcastCreateRequest:
      type: "object"
      required:
        - "name"
      properties:
        name:
          type: "string"
        message:
          type: "string"
        templateId:
          type: "string"
        segment:
          type: "object"
          additionalProperties: true
        scheduledAt:
          type: "string"
          format: "date-time"
          nullable: true
    BroadcastsResponse:
      type: "object"
      properties:
        broadcasts:
          type: "array"
          items:
            "$ref": "#/components/schemas/Broadcast"
        data:
          type: "array"
          items:
            "$ref": "#/components/schemas/Broadcast"
    BroadcastResponse:
      type: "object"
      properties:
        broadcast:
          "$ref": "#/components/schemas/Broadcast"
        data:
          "$ref": "#/components/schemas/Broadcast"
    BroadcastStatsResponse:
      type: "object"
      additionalProperties: true
      properties:
        total:
          type: "integer"
        pending:
          type: "integer"
        sent:
          type: "integer"
        failed:
          type: "integer"
        delivered:
          type: "integer"
        read:
          type: "integer"
  responses:
    BadRequest:
      description: "Requisicao invalida."
      content:
        "application/json":
          schema:
            "$ref": "#/components/schemas/ApiError"
    Unauthorized:
      description: "Autenticacao ausente ou invalida."
      content:
        "application/json":
          schema:
            "$ref": "#/components/schemas/ApiError"
    Forbidden:
      description: "Usuario autenticado sem permissao ou feature bloqueada pelo plano."
      content:
        "application/json":
          schema:
            "$ref": "#/components/schemas/ApiError"
    NotFound:
      description: "Recurso nao encontrado."
      content:
        "application/json":
          schema:
            "$ref": "#/components/schemas/ApiError"
    UnprocessableEntity:
      description: "JSON valido, mas regra de negocio ou validacao falhou."
      content:
        "application/json":
          schema:
            "$ref": "#/components/schemas/ApiError"
    Conflict:
      description: "Conflito de estado ou duplicidade."
      content:
        "application/json":
          schema:
            "$ref": "#/components/schemas/ApiError"
    TooManyRequests:
      description: "Rate limit excedido."
      content:
        "application/json":
          schema:
            "$ref": "#/components/schemas/ApiError"
    ServiceUnavailable:
      description: "Dependencia temporariamente indisponivel ou nao configurada."
      content:
        "application/json":
          schema:
            "$ref": "#/components/schemas/ApiError"
    InternalError:
      description: "Erro inesperado do servidor."
      content:
        "application/json":
          schema:
            "$ref": "#/components/schemas/ApiError"
