{
  "openapi": "3.1.0",
  "info": {
    "title": "Embassia Agentic Web API",
    "description": "Machine-readable API for AI agents to discover, search, and retrieve structured content from embassia.com. All endpoints are static JSON files served via Cloudflare CDN. No authentication required.",
    "version": "1.0.0",
    "contact": {
      "name": "Embassia",
      "email": "founders@embassia.com",
      "url": "https://embassia.com"
    },
    "license": {
      "name": "Public Access",
      "url": "https://embassia.com"
    }
  },
  "servers": [
    {
      "url": "https://embassia.com",
      "description": "Production"
    }
  ],
  "paths": {
    "/.well-known/embassia.json": {
      "get": {
        "operationId": "getDiscovery",
        "summary": "Discovery Document",
        "description": "Canonical entry point for all machine interfaces. Lists all available APIs, content endpoints, and protocol details.",
        "tags": ["Discovery"],
        "responses": {
          "200": {
            "description": "Discovery document with all interface URLs",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/DiscoveryDocument" }
              }
            }
          }
        }
      }
    },
    "/api/v1/content/index.json": {
      "get": {
        "operationId": "getContentIndex",
        "summary": "Content Index",
        "description": "Machine-readable inventory of all public content documents. Each entry includes document ID, title, type, canonical URL, and API URL for retrieval.",
        "tags": ["Content"],
        "responses": {
          "200": {
            "description": "Content index with all document metadata",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/ContentIndex" }
              }
            }
          }
        }
      }
    },
    "/api/v1/content/site.json": {
      "get": {
        "operationId": "getSiteOverview",
        "summary": "Site Overview",
        "description": "Complete overview of Embassia — product description, how it works, supported AI models, FAQ, and machine interface links.",
        "tags": ["Content"],
        "responses": {
          "200": {
            "description": "Complete site overview document",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/ContentDocument" }
              }
            }
          }
        }
      }
    },
    "/api/v1/content/search-index.json": {
      "get": {
        "operationId": "getSearchIndex",
        "summary": "Search Index",
        "description": "Pre-built search index for client-side keyword matching. Match query terms against the keywords array to find relevant documents.",
        "tags": ["Search"],
        "responses": {
          "200": {
            "description": "Search index with keywords for all documents",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/SearchIndex" }
              }
            }
          }
        }
      }
    },
    "/api/v1/content/how-it-works.json": {
      "get": {
        "operationId": "getHowItWorks",
        "summary": "How Embassia Works",
        "description": "The four-step pipeline: Convert to endpoints, Deploy On-Site Agent, Enable Agentic Protocol, Capture Telemetry.",
        "tags": ["Content"],
        "responses": {
          "200": {
            "description": "How it works content document",
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContentDocument" } } }
          }
        }
      }
    },
    "/api/v1/content/agent-experience.json": {
      "get": {
        "operationId": "getAgentExperience",
        "summary": "Agent Experience / Machine Mode",
        "description": "How AI agents discover, search, retrieve, and use website information through Embassia's structured APIs.",
        "tags": ["Content"],
        "responses": {
          "200": {
            "description": "Agent experience content document",
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContentDocument" } } }
          }
        }
      }
    },
    "/api/v1/content/llm-search-console.json": {
      "get": {
        "operationId": "getLLMSearchConsole",
        "summary": "LLM Search Console Feature",
        "description": "Privacy-preserving analytics showing what AI agents ask about your website.",
        "tags": ["Content"],
        "responses": {
          "200": {
            "description": "LLM Search Console content document",
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContentDocument" } } }
          }
        }
      }
    },
    "/api/v1/content/compatibility.json": {
      "get": {
        "operationId": "getCompatibility",
        "summary": "AI Model Compatibility",
        "description": "Supported AI models and platforms: ChatGPT, Claude, Gemini, Perplexity, Copilot, Meta AI, Grok.",
        "tags": ["Content"],
        "responses": {
          "200": {
            "description": "Compatibility content document",
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContentDocument" } } }
          }
        }
      }
    },
    "/api/v1/content/developer-guide.json": {
      "get": {
        "operationId": "getDeveloperGuide",
        "summary": "Agent Access Developer Guide",
        "description": "How to integrate AI agents with Embassia's machine-readable interfaces.",
        "tags": ["Content"],
        "responses": {
          "200": {
            "description": "Developer guide content document",
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContentDocument" } } }
          }
        }
      }
    },
    "/api/v1/architecture.json": {
      "get": {
        "operationId": "getArchitecture",
        "summary": "Architecture Specification",
        "description": "Embassia typed data layer architecture, supported protocols, and integration details.",
        "tags": ["Infrastructure"],
        "responses": {
          "200": {
            "description": "Architecture specification",
            "content": { "application/json": { "schema": { "type": "object" } } }
          }
        }
      }
    },
    "/api/v1/on-site-agent.json": {
      "get": {
        "operationId": "getOnSiteAgent",
        "summary": "On-Site Agent Status",
        "description": "Status and configuration of the on-site agent deployment.",
        "tags": ["Infrastructure"],
        "responses": {
          "200": {
            "description": "On-site agent status",
            "content": { "application/json": { "schema": { "type": "object" } } }
          }
        }
      }
    },
    "/api/v1/mcp.json": {
      "get": {
        "operationId": "getMCPManifest",
        "summary": "MCP Manifest",
        "description": "Anthropic Model Context Protocol manifest listing available tools and resources for discovery.",
        "tags": ["Discovery"],
        "responses": {
          "200": {
            "description": "MCP manifest",
            "content": { "application/json": { "schema": { "type": "object" } } }
          }
        }
      }
    },
    "/api/v1/faq/q01-difference.json": {
      "get": {
        "operationId": "getFAQ01",
        "summary": "FAQ: How is Embassia different from AEO/SEO tools?",
        "tags": ["FAQ"],
        "responses": { "200": { "description": "FAQ entry", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FAQEntry" } } } } }
      }
    },
    "/api/v1/faq/q02-endpoints.json": {
      "get": {
        "operationId": "getFAQ02",
        "summary": "FAQ: What endpoints does Embassia create?",
        "tags": ["FAQ"],
        "responses": { "200": { "description": "FAQ entry", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FAQEntry" } } } } }
      }
    },
    "/api/v1/faq/q03-protection.json": {
      "get": {
        "operationId": "getFAQ03",
        "summary": "FAQ: How does Embassia protect my website?",
        "tags": ["FAQ"],
        "responses": { "200": { "description": "FAQ entry", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FAQEntry" } } } } }
      }
    },
    "/api/v1/faq/q04-protocols.json": {
      "get": {
        "operationId": "getFAQ04",
        "summary": "FAQ: Which protocols does Embassia support?",
        "tags": ["FAQ"],
        "responses": { "200": { "description": "FAQ entry", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FAQEntry" } } } } }
      }
    },
    "/api/v1/faq/q05-insights.json": {
      "get": {
        "operationId": "getFAQ05",
        "summary": "FAQ: What insights does the console provide?",
        "tags": ["FAQ"],
        "responses": { "200": { "description": "FAQ entry", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FAQEntry" } } } } }
      }
    },
    "/api/v1/faq/q06-architecture.json": {
      "get": {
        "operationId": "getFAQ06",
        "summary": "FAQ: What is the technical architecture?",
        "tags": ["FAQ"],
        "responses": { "200": { "description": "FAQ entry", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FAQEntry" } } } } }
      }
    },
    "/llms.txt": {
      "get": {
        "operationId": "getLlmsTxt",
        "summary": "llms.txt Agent Discovery Guide",
        "description": "Plaintext discovery document for AI agents, following the llms.txt convention.",
        "tags": ["Discovery"],
        "responses": {
          "200": {
            "description": "llms.txt content",
            "content": { "text/plain": { "schema": { "type": "string" } } }
          }
        }
      }
    },
    "/llms-full.txt": {
      "get": {
        "operationId": "getLlmsFullTxt",
        "summary": "Full Site Content (plaintext)",
        "description": "Complete site content as plaintext, optimized for AI context windows.",
        "tags": ["Content"],
        "responses": {
          "200": {
            "description": "Full site content",
            "content": { "text/plain": { "schema": { "type": "string" } } }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "DiscoveryDocument": {
        "type": "object",
        "properties": {
          "name": { "type": "string" },
          "description": { "type": "string" },
          "website": { "type": "string", "format": "uri" },
          "api_version": { "type": "string" },
          "interfaces": { "type": "object" },
          "content": { "type": "object" },
          "protocols": { "type": "object" },
          "access": { "type": "object" }
        }
      },
      "ContentIndex": {
        "type": "object",
        "properties": {
          "version": { "type": "string" },
          "total_documents": { "type": "integer" },
          "documents": {
            "type": "array",
            "items": { "$ref": "#/components/schemas/ContentIndexEntry" }
          }
        }
      },
      "ContentIndexEntry": {
        "type": "object",
        "properties": {
          "id": { "type": "string" },
          "title": { "type": "string" },
          "content_type": { "type": "string", "enum": ["page", "faq", "feature", "product"] },
          "canonical_url": { "type": "string", "format": "uri" },
          "api_url": { "type": "string", "format": "uri" },
          "description": { "type": "string" },
          "updated_at": { "type": "string", "format": "date-time" }
        }
      },
      "ContentDocument": {
        "type": "object",
        "properties": {
          "id": { "type": "string" },
          "title": { "type": "string" },
          "content_type": { "type": "string" },
          "canonical_url": { "type": "string", "format": "uri" },
          "updated_at": { "type": "string", "format": "date-time" },
          "content": { "type": "object" },
          "metadata": { "type": "object" }
        }
      },
      "FAQEntry": {
        "type": "object",
        "properties": {
          "id": { "type": "string" },
          "question": { "type": "string" },
          "answer": { "type": "string" }
        }
      },
      "SearchIndex": {
        "type": "object",
        "properties": {
          "version": { "type": "string" },
          "entries": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": { "type": "string" },
                "title": { "type": "string" },
                "description": { "type": "string" },
                "api_url": { "type": "string", "format": "uri" },
                "keywords": { "type": "array", "items": { "type": "string" } }
              }
            }
          }
        }
      }
    }
  },
  "tags": [
    { "name": "Discovery", "description": "Entry points and discovery documents for AI agents" },
    { "name": "Content", "description": "Structured content documents" },
    { "name": "Search", "description": "Content search capabilities" },
    { "name": "FAQ", "description": "Frequently asked questions" },
    { "name": "Infrastructure", "description": "Architecture and infrastructure endpoints" }
  ]
}
