{
  "openapi": "3.1.1",
  "info": {
    "title": "Unite API",
    "version": "1.0.0",
    "summary": "Conteúdo público do site da Unite: soluções, perguntas frequentes, busca e contato.",
    "description": "API pública e somente leitura sobre o mesmo conteúdo das páginas de https://unitebr.com. Não exige autenticação. Erros em application/problem+json. Versionamento e depreciação: https://unitebr.com/api-policy.md.",
    "contact": {
      "name": "Unite",
      "url": "https://unitebr.com/contato",
      "email": "support@myunite.ai"
    },
    "termsOfService": "https://unitebr.com/api-policy.md"
  },
  "servers": [
    {
      "url": "https://unitebr.com",
      "description": "Produção"
    }
  ],
  "externalDocs": {
    "description": "Portal do desenvolvedor",
    "url": "https://unitebr.com/developers"
  },
  "security": [],
  "tags": [
    {
      "name": "conteudo",
      "description": "Conteúdo publicado no site."
    },
    {
      "name": "status",
      "description": "Saúde da API."
    }
  ],
  "paths": {
    "/api/v1": {
      "get": {
        "operationId": "getApiIndex",
        "summary": "Índice da API",
        "description": "Versão, documentação e endpoints disponíveis.",
        "tags": [
          "status"
        ],
        "responses": {
          "200": {
            "description": "Índice da API.",
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                }
              },
              "API-Version": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiIndex"
                }
              }
            }
          },
          "304": {
            "description": "Não modificado (If-None-Match)."
          },
          "400": {
            "description": "Erro (RFC 9457).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Erro (RFC 9457).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "405": {
            "description": "Erro (RFC 9457).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "default": {
            "description": "Erro (RFC 9457).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/solucoes": {
      "get": {
        "operationId": "listSolucoes",
        "summary": "Lista as soluções",
        "description": "Soluções da Unite com resumo, descrição e link.",
        "tags": [
          "conteudo"
        ],
        "parameters": [
          {
            "name": "query",
            "in": "query",
            "required": false,
            "description": "Filtro por texto (até 160 caracteres).",
            "schema": {
              "type": "string",
              "maxLength": 160
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Itens por página, de 1 a 50 (padrão 10).",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50,
              "default": 10
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "next_cursor opaco devolvido pela página anterior.",
            "schema": {
              "type": "string",
              "maxLength": 512
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Página de soluções.",
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                }
              },
              "API-Version": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginaSolucoes"
                }
              }
            }
          },
          "304": {
            "description": "Não modificado (If-None-Match)."
          },
          "400": {
            "description": "Erro (RFC 9457).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Erro (RFC 9457).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "405": {
            "description": "Erro (RFC 9457).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "default": {
            "description": "Erro (RFC 9457).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/solucoes/{id}": {
      "get": {
        "operationId": "getSolucao",
        "summary": "Obtém uma solução",
        "description": "Uma solução pelo id.",
        "tags": [
          "conteudo"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "id da solução.",
            "schema": {
              "type": "string",
              "enum": [
                "optimize",
                "agente",
                "create",
                "validate"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A solução.",
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                }
              },
              "API-Version": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RespostaSolucao"
                }
              }
            }
          },
          "304": {
            "description": "Não modificado (If-None-Match)."
          },
          "400": {
            "description": "Erro (RFC 9457).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Erro (RFC 9457).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "405": {
            "description": "Erro (RFC 9457).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "default": {
            "description": "Erro (RFC 9457).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/faq": {
      "get": {
        "operationId": "listFaq",
        "summary": "Lista as perguntas frequentes",
        "description": "Perguntas frequentes com as respostas oficiais.",
        "tags": [
          "conteudo"
        ],
        "parameters": [
          {
            "name": "query",
            "in": "query",
            "required": false,
            "description": "Filtro por texto (até 160 caracteres).",
            "schema": {
              "type": "string",
              "maxLength": 160
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Itens por página, de 1 a 50 (padrão 10).",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50,
              "default": 10
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "next_cursor opaco devolvido pela página anterior.",
            "schema": {
              "type": "string",
              "maxLength": 512
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Página de perguntas.",
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                }
              },
              "API-Version": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginaFaq"
                }
              }
            }
          },
          "304": {
            "description": "Não modificado (If-None-Match)."
          },
          "400": {
            "description": "Erro (RFC 9457).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Erro (RFC 9457).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "405": {
            "description": "Erro (RFC 9457).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "default": {
            "description": "Erro (RFC 9457).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/busca": {
      "get": {
        "operationId": "searchConteudo",
        "summary": "Busca no conteúdo",
        "description": "Busca em linguagem natural; devolve itens schema.org com link. O mesmo índice do endpoint NLWeb /ask.",
        "tags": [
          "conteudo"
        ],
        "parameters": [
          {
            "name": "query",
            "in": "query",
            "required": true,
            "description": "Pergunta ou termos (obrigatório).",
            "schema": {
              "type": "string",
              "maxLength": 160
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Itens por página, de 1 a 50 (padrão 10).",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50,
              "default": 10
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "next_cursor opaco devolvido pela página anterior.",
            "schema": {
              "type": "string",
              "maxLength": 512
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Página de resultados.",
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                }
              },
              "API-Version": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginaBusca"
                }
              }
            }
          },
          "304": {
            "description": "Não modificado (If-None-Match)."
          },
          "400": {
            "description": "Erro (RFC 9457).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Erro (RFC 9457).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "405": {
            "description": "Erro (RFC 9457).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "default": {
            "description": "Erro (RFC 9457).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/contato": {
      "get": {
        "operationId": "getContato",
        "summary": "Canais de contato",
        "description": "Página de demonstração, e-mail, endereço e dados da empresa.",
        "tags": [
          "conteudo"
        ],
        "responses": {
          "200": {
            "description": "Contato.",
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                }
              },
              "API-Version": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RespostaContato"
                }
              }
            }
          },
          "304": {
            "description": "Não modificado (If-None-Match)."
          },
          "400": {
            "description": "Erro (RFC 9457).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Erro (RFC 9457).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "405": {
            "description": "Erro (RFC 9457).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "default": {
            "description": "Erro (RFC 9457).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/health": {
      "get": {
        "operationId": "getHealth",
        "summary": "Saúde da API",
        "description": "Status e revisão do conteúdo.",
        "tags": [
          "status"
        ],
        "responses": {
          "200": {
            "description": "Status.",
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                }
              },
              "API-Version": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Health"
                }
              }
            }
          },
          "304": {
            "description": "Não modificado (If-None-Match)."
          },
          "400": {
            "description": "Erro (RFC 9457).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Erro (RFC 9457).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "405": {
            "description": "Erro (RFC 9457).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "default": {
            "description": "Erro (RFC 9457).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Problem": {
        "type": "object",
        "required": [
          "type",
          "title",
          "status",
          "detail",
          "instance"
        ],
        "properties": {
          "type": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "status": {
            "type": "integer"
          },
          "detail": {
            "type": "string"
          },
          "instance": {
            "type": "string"
          }
        }
      },
      "ApiIndex": {
        "type": "object",
        "required": [
          "name",
          "version",
          "authentication",
          "documentation",
          "openapi",
          "mcp",
          "endpoints"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "version": {
            "type": "string"
          },
          "authentication": {
            "type": "string",
            "const": "none"
          },
          "documentation": {
            "type": "string",
            "format": "uri"
          },
          "openapi": {
            "type": "string",
            "format": "uri"
          },
          "mcp": {
            "type": "string",
            "format": "uri"
          },
          "endpoints": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "Solucao": {
        "type": "object",
        "required": [
          "id",
          "nome",
          "resumo",
          "descricao",
          "tipo_de_servico",
          "url"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "nome": {
            "type": "string"
          },
          "resumo": {
            "type": "string"
          },
          "descricao": {
            "type": "string"
          },
          "tipo_de_servico": {
            "type": "string"
          },
          "url": {
            "type": "string",
            "format": "uri"
          }
        }
      },
      "Pergunta": {
        "type": "object",
        "required": [
          "id",
          "pergunta",
          "resposta",
          "url"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "pergunta": {
            "type": "string"
          },
          "resposta": {
            "type": "string"
          },
          "url": {
            "type": "string",
            "format": "uri"
          }
        }
      },
      "ItemSchemaOrg": {
        "type": "object",
        "required": [
          "@type"
        ],
        "properties": {
          "@type": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "url": {
            "type": "string"
          }
        },
        "additionalProperties": true
      },
      "Contato": {
        "type": "object",
        "properties": {
          "demonstracao": {
            "type": "string",
            "format": "uri"
          },
          "email": {
            "type": "string"
          },
          "razao_social": {
            "type": "string"
          },
          "cnpj": {
            "type": "string"
          },
          "endereco": {
            "type": "string"
          },
          "login_plataforma": {
            "type": "string",
            "format": "uri"
          },
          "linkedin": {
            "type": "string",
            "format": "uri"
          },
          "instagram": {
            "type": "string",
            "format": "uri"
          },
          "precos": {
            "type": "string"
          }
        }
      },
      "Health": {
        "type": "object",
        "required": [
          "status",
          "revision",
          "solucoes",
          "faq"
        ],
        "properties": {
          "status": {
            "type": "string",
            "const": "ok"
          },
          "revision": {
            "type": "string"
          },
          "solucoes": {
            "type": "integer"
          },
          "faq": {
            "type": "integer"
          }
        }
      },
      "PaginaSolucoes": {
        "type": "object",
        "required": [
          "ok",
          "total",
          "next_cursor",
          "items"
        ],
        "properties": {
          "ok": {
            "type": "boolean",
            "const": true
          },
          "total": {
            "type": "integer",
            "description": "Total de itens da consulta."
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Cursor da próxima página; null na última."
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Solucao"
            }
          }
        }
      },
      "PaginaFaq": {
        "type": "object",
        "required": [
          "ok",
          "total",
          "next_cursor",
          "items"
        ],
        "properties": {
          "ok": {
            "type": "boolean",
            "const": true
          },
          "total": {
            "type": "integer",
            "description": "Total de itens da consulta."
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Cursor da próxima página; null na última."
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Pergunta"
            }
          }
        }
      },
      "PaginaBusca": {
        "type": "object",
        "required": [
          "ok",
          "total",
          "next_cursor",
          "items"
        ],
        "properties": {
          "ok": {
            "type": "boolean",
            "const": true
          },
          "total": {
            "type": "integer",
            "description": "Total de itens da consulta."
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Cursor da próxima página; null na última."
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ItemSchemaOrg"
            }
          }
        }
      },
      "RespostaSolucao": {
        "type": "object",
        "required": [
          "ok",
          "solucao"
        ],
        "properties": {
          "ok": {
            "type": "boolean",
            "const": true
          },
          "solucao": {
            "$ref": "#/components/schemas/Solucao"
          }
        }
      },
      "RespostaContato": {
        "type": "object",
        "required": [
          "ok",
          "contato"
        ],
        "properties": {
          "ok": {
            "type": "boolean",
            "const": true
          },
          "contato": {
            "$ref": "#/components/schemas/Contato"
          }
        }
      }
    }
  }
}
