{
  "openapi": "3.1.0",
  "info": {
    "title": "Rabbits Web Design & Development Public REST API & Agent Interfaces",
    "version": "1.0.0",
    "x-api-version": "1.0.0",
    "x-versioning-policy": "URL path versioning via /api/v1 prefix.",
    "x-deprecation-policy": "All deprecated endpoints will issue standard Deprecation and Sunset (RFC 8594) HTTP headers at least 180 days before removal.",
    "description": "API REST pública v1, ferramentas MCP (Model Context Protocol) e interfaces para agentes autônomos da Rabbits (@rabbits.oi). Suporta negociação de conteúdo Markdown (acceptmarkdown.com), modelo tipado de erro RFC 9457 (application/problem+json) e cabeçalhos padronizados de rate limiting RFC.",
    "contact": {
      "name": "Suporte Técnico Rabbits",
      "email": "contato@byrabbits.com.br",
      "url": "https://byrabbits.com.br/contact"
    },
    "license": {
      "name": "Proprietary",
      "url": "https://byrabbits.com.br/privacy"
    }
  },
  "servers": [
    {
      "url": "https://byrabbits.com.br",
      "description": "Servidor Oficial de Produção"
    },
    {
      "url": "https://byrabbits.vercel.app",
      "description": "Servidor de Fallback (Vercel)"
    }
  ],
  "paths": {
    "/api/v1/agency": {
      "get": {
        "operationId": "getAgencyInfo",
        "summary": "Obter informações institucionais da agência Rabbits",
        "description": "Retorna o posicionamento de mercado, proposta de valor, fundadores, diferenciais técnicos e canais de atendimento direto da Rabbits (@rabbits.oi).",
        "responses": {
          "200": {
            "description": "Informações completas da agência retornadas com sucesso.",
            "headers": {
              "RateLimit-Limit": { "$ref": "#/components/headers/RateLimit-Limit" },
              "RateLimit-Remaining": { "$ref": "#/components/headers/RateLimit-Remaining" },
              "RateLimit-Reset": { "$ref": "#/components/headers/RateLimit-Reset" }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgencyResponse"
                }
              }
            }
          },
          "429": {
            "description": "Taxa limite de requisições excedida.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Erro interno no servidor.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/services": {
      "get": {
        "operationId": "listServices",
        "summary": "Listar serviços e soluções digitais",
        "description": "Retorna o catálogo de serviços prestados pela Rabbits com prazos médios, categoria e entregáveis detalhados.",
        "parameters": [
          {
            "name": "category",
            "in": "query",
            "required": false,
            "description": "Filtro opcional por categoria de serviço.",
            "schema": {
              "type": "string",
              "enum": ["landing-page", "web-design", "portal", "design-system", "all"],
              "default": "all"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Lista de serviços retornada com sucesso.",
            "headers": {
              "RateLimit-Limit": { "$ref": "#/components/headers/RateLimit-Limit" },
              "RateLimit-Remaining": { "$ref": "#/components/headers/RateLimit-Remaining" },
              "RateLimit-Reset": { "$ref": "#/components/headers/RateLimit-Reset" }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServicesListResponse"
                }
              }
            }
          },
          "404": {
            "description": "Categoria informada não encontrada.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Taxa limite excedida.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/quote": {
      "post": {
        "operationId": "requestQuote",
        "summary": "Solicitar proposta comercial ou reunião de alinhamento",
        "description": "Valida dados de um briefing de projeto e retorna mensagem estruturada com link direto de WhatsApp para conversa imediata com os sócios.",
        "requestBody": {
          "required": true,
          "description": "Dados do briefing do projeto.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QuoteRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Proposta estruturada com sucesso.",
            "headers": {
              "RateLimit-Limit": { "$ref": "#/components/headers/RateLimit-Limit" },
              "RateLimit-Remaining": { "$ref": "#/components/headers/RateLimit-Remaining" },
              "RateLimit-Reset": { "$ref": "#/components/headers/RateLimit-Reset" }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuoteResponse"
                }
              }
            }
          },
          "400": {
            "description": "Corpo da requisição JSON inválido.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "422": {
            "description": "Campos obrigatórios ausentes ou inválidos.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Taxa limite de envio de propostas excedida.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/health": {
      "get": {
        "operationId": "getHealthCheck",
        "summary": "Verificar status operacional e saúde da API",
        "description": "Retorna o status de integridade da API, tempo de atividade e mapa de protocolos.",
        "responses": {
          "200": {
            "description": "API operando normalmente.",
            "headers": {
              "RateLimit-Limit": { "$ref": "#/components/headers/RateLimit-Limit" },
              "RateLimit-Remaining": { "$ref": "#/components/headers/RateLimit-Remaining" },
              "RateLimit-Reset": { "$ref": "#/components/headers/RateLimit-Reset" }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HealthResponse"
                }
              }
            }
          }
        }
      }
    },
    "/.well-known/mcp": {
      "get": {
        "operationId": "getMcpManifest",
        "summary": "MCP Protocol Handshake & Manifest",
        "description": "Retorna o manifesto e capacidades do servidor Model Context Protocol (MCP) da Rabbits.",
        "responses": {
          "200": {
            "description": "Manifesto MCP e informações de transporte.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpManifest"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "postMcpJsonRpc",
        "summary": "MCP Streamable HTTP JSON-RPC 2.0 Endpoint",
        "description": "Processa requisições JSON-RPC 2.0 para initialize, tools/list, tools/call e ping.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/JsonRpcRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Resposta JSON-RPC 2.0.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JsonRpcResponse"
                }
              }
            }
          },
          "400": {
            "description": "Formato de requisição JSON-RPC inválido.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/llms.txt": {
      "get": {
        "operationId": "getLlmsTxt",
        "summary": "Manifesto de orientações para LLMs e Agentes",
        "description": "Retorna arquivo de diretrizes segundo a especificação llmstxt.org.",
        "responses": {
          "200": {
            "description": "Conteúdo em texto/markdown puro.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "headers": {
      "RateLimit-Limit": {
        "description": "Número máximo de requisições permitidas na janela temporal.",
        "schema": { "type": "integer", "example": 100 }
      },
      "RateLimit-Remaining": {
        "description": "Número de requisições restantes na janela atual.",
        "schema": { "type": "integer", "example": 99 }
      },
      "RateLimit-Reset": {
        "description": "Segundos restantes até a renovação da cota de requisições.",
        "schema": { "type": "integer", "example": 60 }
      },
      "Retry-After": {
        "description": "Segundos que o cliente deve aguardar antes de tentar novamente após erro 429.",
        "schema": { "type": "integer", "example": 60 }
      }
    },
    "schemas": {
      "ProblemDetails": {
        "type": "object",
        "description": "Modelo tipado de erro padronizado conforme a RFC 9457 (Problem Details for HTTP APIs).",
        "required": ["type", "title", "status", "code", "detail"],
        "properties": {
          "type": {
            "type": "string",
            "format": "uri",
            "description": "URI de referência identificando o tipo de problema.",
            "example": "https://byrabbits.com.br/docs/errors#resource_not_found"
          },
          "title": {
            "type": "string",
            "description": "Resumo legível do erro.",
            "example": "Resource Not Found"
          },
          "status": {
            "type": "integer",
            "description": "Código de status HTTP associado.",
            "example": 404
          },
          "code": {
            "type": "string",
            "description": "Código determinístico de máquina para tratamento por agentes.",
            "example": "RESOURCE_NOT_FOUND"
          },
          "detail": {
            "type": "string",
            "description": "Explicação detalhada da falha ocorrida.",
            "example": "O endpoint solicitado não foi encontrado."
          },
          "instance": {
            "type": "string",
            "description": "URI do recurso ou rota específica que originou o erro.",
            "example": "/api/v1/invalid-route"
          },
          "resolution_hint": {
            "type": "string",
            "description": "Dica de resolução orientada para agentes autônomos ou desenvolvedores.",
            "example": "Consulte /openapi.json ou /docs para endpoints válidos."
          },
          "docs_url": {
            "type": "string",
            "format": "uri",
            "description": "Link para documentação de auxílio.",
            "example": "https://byrabbits.com.br/docs"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "description": "Momento UTC em que o erro foi registrado.",
            "example": "2026-10-30T21:00:00Z"
          }
        }
      },
      "AgencyResponse": {
        "type": "object",
        "required": ["api_version", "agency", "interfaces"],
        "properties": {
          "api_version": { "type": "string", "example": "1.0.0" },
          "agency": {
            "type": "object",
            "required": ["name", "brand", "website", "contact", "specialties"],
            "properties": {
              "name": { "type": "string", "example": "Rabbits" },
              "legal_name": { "type": "string", "example": "Rabbits Estúdio Criativo & Digital Ltda" },
              "brand": { "type": "string", "example": "Rabbits Web Design" },
              "tagline": { "type": "Criatividade que se move. Ideias que ganham vida.", "example": "Criatividade que se move. Ideias que ganham vida." },
              "website": { "type": "string", "format": "uri", "example": "https://byrabbits.com.br" },
              "instagram": { "type": "string", "example": "@rabbits.oi" },
              "founders": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "name": { "type": "string", "example": "Sarah Firmino" },
                    "role": { "type": "string", "example": "Cofundadora & Diretora Criativa" }
                  }
                }
              },
              "contact": {
                "type": "object",
                "properties": {
                  "whatsapp": { "type": "string", "example": "+55 11 96246-2481" },
                  "whatsapp_url": { "type": "string", "format": "uri", "example": "https://wa.me/5511962462481" },
                  "email": { "type": "string", "format": "email", "example": "contato@byrabbits.com.br" },
                  "address": { "type": "string", "example": "Av. Paulista, 1000 - Bela Vista, São Paulo - SP, Brasil" }
                }
              },
              "specialties": {
                "type": "array",
                "items": { "type": "string" }
              }
            }
          },
          "interfaces": {
            "type": "object",
            "properties": {
              "openapi": { "type": "string" },
              "mcp": { "type": "string" },
              "llms_txt": { "type": "string" },
              "docs": { "type": "string" }
            }
          }
        }
      },
      "ServicesListResponse": {
        "type": "object",
        "required": ["api_version", "total", "services"],
        "properties": {
          "api_version": { "type": "string", "example": "1.0.0" },
          "total": { "type": "integer", "example": 4 },
          "services": {
            "type": "array",
            "items": { "$ref": "#/components/schemas/ServiceItem" }
          }
        }
      },
      "ServiceItem": {
        "type": "object",
        "required": ["id", "name", "category", "description", "deliverables", "timeline"],
        "properties": {
          "id": { "type": "string", "example": "landing-page" },
          "name": { "type": "string", "example": "Landing Pages de Alta Conversão" },
          "category": { "type": "string", "example": "conversion" },
          "description": { "type": "string", "example": "Páginas persuasivas com carregamento instantâneo." },
          "deliverables": {
            "type": "array",
            "items": { "type": "string" }
          },
          "timeline": { "type": "string", "example": "7 a 15 dias úteis" }
        }
      },
      "QuoteRequest": {
        "type": "object",
        "required": ["client_name", "project_type"],
        "properties": {
          "client_name": { "type": "string", "description": "Nome completo ou nome da empresa solicitante.", "example": "Ana Silva" },
          "project_type": { "type": "string", "description": "Tipo de serviço desejado.", "example": "Landing Page de Alta Conversão" },
          "contact": { "type": "string", "description": "E-mail ou WhatsApp para contato.", "example": "+55 11 99999-9999" },
          "budget_range": { "type": "string", "description": "Faixa estimada de investimento.", "example": "R$ 3.000 a R$ 6.000" },
          "details": { "type": "string", "description": "Descrição do desafio ou escopo almejado.", "example": "Preciso de uma landing page para lançamento de curso online." }
        }
      },
      "QuoteResponse": {
        "type": "object",
        "required": ["api_version", "status", "message", "direct_actions", "quote_data"],
        "properties": {
          "api_version": { "type": "string", "example": "1.0.0" },
          "status": { "type": "string", "example": "quote_prepared" },
          "message": { "type": "string", "example": "Solicitação de orçamento estruturada com sucesso." },
          "direct_actions": {
            "type": "object",
            "properties": {
              "whatsapp_url": { "type": "string", "format": "uri" },
              "email": { "type": "string", "format": "email" },
              "phone": { "type": "string" }
            }
          },
          "quote_data": {
            "type": "object",
            "properties": {
              "client_name": { "type": "string" },
              "project_type": { "type": "string" },
              "contact": { "type": "string", "nullable": true },
              "budget_range": { "type": "string" },
              "details": { "type": "string", "nullable": true },
              "created_at": { "type": "string", "format": "date-time" }
            }
          }
        }
      },
      "HealthResponse": {
        "type": "object",
        "required": ["status", "api_version", "service", "timestamp"],
        "properties": {
          "status": { "type": "string", "example": "healthy" },
          "api_version": { "type": "string", "example": "1.0.0" },
          "service": { "type": "string", "example": "rabbits-api" },
          "uptime_seconds": { "type": "integer", "example": 120 },
          "timestamp": { "type": "string", "format": "date-time" },
          "protocols": {
            "type": "object",
            "properties": {
              "rest": { "type": "string" },
              "mcp": { "type": "string" },
              "openapi": { "type": "string" },
              "markdown_negotiation": { "type": "string" }
            }
          }
        }
      },
      "McpManifest": {
        "type": "object",
        "required": ["protocolVersion", "serverInfo", "capabilities", "tools"],
        "properties": {
          "protocolVersion": { "type": "string", "example": "2024-11-05" },
          "serverInfo": {
            "type": "object",
            "properties": {
              "name": { "type": "string", "example": "rabbits-mcp-server" },
              "version": { "type": "string", "example": "1.0.0" },
              "description": { "type": "string" }
            }
          },
          "capabilities": { "type": "object" },
          "tools": { "type": "array", "items": { "type": "object" } }
        }
      },
      "JsonRpcRequest": {
        "type": "object",
        "required": ["jsonrpc", "method"],
        "properties": {
          "jsonrpc": { "type": "string", "enum": ["2.0"], "example": "2.0" },
          "id": { "type": ["string", "integer", "null"], "example": 1 },
          "method": { "type": "string", "example": "initialize" },
          "params": { "type": "object" }
        }
      },
      "JsonRpcResponse": {
        "type": "object",
        "required": ["jsonrpc"],
        "properties": {
          "jsonrpc": { "type": "string", "enum": ["2.0"], "example": "2.0" },
          "id": { "type": ["string", "integer", "null"], "example": 1 },
          "result": { "type": "object" },
          "error": {
            "type": "object",
            "properties": {
              "code": { "type": "integer" },
              "message": { "type": "string" }
            }
          }
        }
      }
    }
  }
}
