{
  "openapi": "3.1.0",
  "info": {
    "title": "MailBridgeAPI public knowledge API",
    "version": "1.0.0",
    "description": "Read-only product knowledge. No mailbox access, credentials or email sending. Fetch source articles before answering product questions."
  },
  "servers": [
    {
      "url": "https://mailbridgeapi.com"
    }
  ],
  "paths": {
    "/api/knowledge": {
      "get": {
        "operationId": "searchMailBridgeKnowledge",
        "summary": "Search current public documentation",
        "parameters": [
          {
            "name": "lang",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "en",
                "fr",
                "es",
                "pt",
                "de",
                "nl",
                "ru",
                "tr"
              ],
              "default": "en"
            }
          },
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 300
            }
          },
          {
            "name": "category",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 20,
              "default": 8
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Current public knowledge",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "version": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "total": {
                      "type": "integer"
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "title": {
                            "type": "string"
                          },
                          "category": {
                            "type": "string"
                          },
                          "language": {
                            "type": "string"
                          },
                          "url": {
                            "type": "string",
                            "format": "uri"
                          },
                          "summary": {
                            "type": "string"
                          },
                          "content": {
                            "type": "string"
                          },
                          "updatedAt": {
                            "type": "string",
                            "format": "date-time"
                          }
                        },
                        "required": [
                          "id",
                          "title",
                          "category",
                          "url"
                        ]
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/knowledge/articles/{id}": {
      "get": {
        "operationId": "getMailBridgeKnowledgeArticle",
        "summary": "Read a full article with its source",
        "parameters": [
          {
            "name": "lang",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "en",
                "fr",
                "es",
                "pt",
                "de",
                "nl",
                "ru",
                "tr"
              ],
              "default": "en"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Current public knowledge",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "version": {
                      "type": "string"
                    },
                    "article": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "title": {
                          "type": "string"
                        },
                        "category": {
                          "type": "string"
                        },
                        "language": {
                          "type": "string"
                        },
                        "url": {
                          "type": "string",
                          "format": "uri"
                        },
                        "summary": {
                          "type": "string"
                        },
                        "content": {
                          "type": "string"
                        },
                        "updatedAt": {
                          "type": "string",
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "id",
                        "title",
                        "category",
                        "url"
                      ]
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Article not found"
          }
        }
      }
    },
    "/api/knowledge/status": {
      "get": {
        "operationId": "getMailBridgeKnowledgeStatus",
        "summary": "Read the current knowledge revision",
        "parameters": [
          {
            "name": "lang",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "en",
                "fr",
                "es",
                "pt",
                "de",
                "nl",
                "ru",
                "tr"
              ],
              "default": "en"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Current public knowledge",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "version": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "articleCount": {
                      "type": "integer"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}
