{
  "openapi": "3.1.0",
  "info": {
    "title": "Relexable Public API",
    "version": "1.0.0",
    "summary": "Public, unauthenticated read endpoints exposed by Relexable.",
    "description": "Relexable is a German SaaS for Lexware Office. The vast majority of its API surface is private (workspace-scoped, JWT-authenticated Supabase Edge Functions). This OpenAPI document only lists the public, unauthenticated endpoints that AI answer engines and agents can safely call to retrieve product information.",
    "contact": {
      "name": "Relexable Support",
      "email": "support@relexable.de",
      "url": "https://relexable.de"
    },
    "license": {
      "name": "Proprietary – marketing content",
      "url": "https://relexable.de/agb"
    }
  },
  "servers": [
    { "url": "https://relexable.de", "description": "Marketing site & public portals" },
    { "url": "https://api.relexable.de", "description": "Cloudflare Worker proxy for selected edge functions" }
  ],
  "tags": [
    { "name": "discovery", "description": "Static, machine-readable resources for AI agents." },
    { "name": "portal", "description": "Public customer-facing portals (token-protected)." }
  ],
  "paths": {
    "/llms.txt": {
      "get": {
        "tags": ["discovery"],
        "summary": "Canonical Markdown summary for LLMs.",
        "responses": {
          "200": {
            "description": "Plain Markdown",
            "content": { "text/markdown": { "schema": { "type": "string" } } }
          }
        }
      }
    },
    "/llms-full.txt": {
      "get": {
        "tags": ["discovery"],
        "summary": "Extended Markdown reference (full feature list, FAQ, architecture).",
        "responses": {
          "200": { "description": "Plain Markdown", "content": { "text/markdown": { "schema": { "type": "string" } } } }
        }
      }
    },
    "/sitemap.xml": {
      "get": {
        "tags": ["discovery"],
        "summary": "XML sitemap of public pages.",
        "responses": { "200": { "description": "XML sitemap" } }
      }
    },
    "/.well-known/ai-plugin.json": {
      "get": {
        "tags": ["discovery"],
        "summary": "ChatGPT plugin manifest.",
        "responses": { "200": { "description": "JSON manifest" } }
      }
    },
    "/.well-known/agent.json": {
      "get": {
        "tags": ["discovery"],
        "summary": "Generic agent capability manifest.",
        "responses": { "200": { "description": "JSON manifest" } }
      }
    },
    "/portal/{token}": {
      "get": {
        "tags": ["portal"],
        "summary": "Public customer portal landing page.",
        "description": "Renders the customer portal. Login is gated by postal code – no JSON API. Provided here so agents understand the URL pattern.",
        "parameters": [
          { "name": "token", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Workspace-defined slug or token, e.g. `mustermann-gmbh`." }
        ],
        "responses": {
          "200": { "description": "HTML page", "content": { "text/html": { "schema": { "type": "string" } } } },
          "404": { "description": "Unknown portal token" }
        }
      }
    },
    "/quote/{action}/{token}": {
      "get": {
        "tags": ["portal"],
        "summary": "Public quote-response landing page (accept/reject).",
        "parameters": [
          { "name": "action", "in": "path", "required": true, "schema": { "type": "string", "enum": ["accept", "reject", "view"] } },
          { "name": "token", "in": "path", "required": true, "schema": { "type": "string" } }
        ],
        "responses": { "200": { "description": "HTML page" } }
      }
    },
    "/changelog": {
      "get": {
        "tags": ["discovery"],
        "summary": "Public product changelog (HTML).",
        "responses": { "200": { "description": "HTML page" } }
      }
    }
  },
  "components": {
    "securitySchemes": {}
  }
}
