{
  "openapi": "3.1.0",
  "info": {
    "title": "Morsely API",
    "description": "Morsely — The World's Most Complete Morse Code Platform. Translate text to Morse code, decode Morse, and access educational content. Built by Cyberkov.",
    "version": "2.0.0",
    "contact": {
      "name": "Morsely by Cyberkov",
      "url": "https://morsely.org/about",
      "email": "hello@morsely.org"
    },
    "license": {
      "name": "Free to use",
      "url": "https://morsely.org/about"
    },
    "x-logo": {
      "url": "https://morsely.org/manus-storage/morsely-logo-v4-transparent_27c1cdb4.png"
    }
  },
  "servers": [
    {
      "url": "https://morsely.org",
      "description": "Production server"
    }
  ],
  "paths": {
    "/": {
      "get": {
        "summary": "Morsely homepage — content negotiation",
        "description": "Returns the Morsely homepage. Supports content negotiation: send Accept: application/json for structured JSON, Accept: text/markdown for Markdown, Accept: text/plain for plain text, or Accept: text/html for the full SPA.",
        "operationId": "getHomepage",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/SiteInfo" }
              },
              "text/markdown": {
                "schema": { "type": "string", "description": "Markdown description of the Morsely platform" }
              },
              "text/plain": {
                "schema": { "type": "string", "description": "Plain text description of the Morsely platform" }
              },
              "text/html": {
                "schema": { "type": "string", "description": "Full React SPA" }
              }
            }
          }
        }
      }
    },
    "/translator": {
      "get": {
        "summary": "Morse Code Translator",
        "description": "Interactive Morse code translator. Converts text to Morse code or decodes Morse to text. Supports Arabic script. Military-grade CW audio at 750 Hz.",
        "operationId": "getTranslator",
        "parameters": [
          {
            "name": "text",
            "in": "query",
            "description": "Text to translate to Morse code",
            "required": false,
            "schema": { "type": "string", "example": "SOS" }
          }
        ],
        "responses": {
          "200": {
            "description": "Translator page",
            "content": {
              "text/html": { "schema": { "type": "string" } }
            }
          }
        }
      }
    },
    "/llms.txt": {
      "get": {
        "summary": "LLMs.txt — machine-readable site description",
        "description": "Returns the llms.txt file following the llmstxt.org standard. Contains a structured description of all Morsely pages and capabilities for AI agents.",
        "operationId": "getLlmsTxt",
        "responses": {
          "200": {
            "description": "LLMs.txt content",
            "content": {
              "text/plain": { "schema": { "type": "string" } }
            }
          }
        }
      }
    },
    "/llms-full.txt": {
      "get": {
        "summary": "LLMs-full.txt — full site content dump",
        "description": "Returns the complete text content of the Morsely platform for RAG pipelines and non-browsing LLMs. Includes all page content, Morse code reference, history, and educational material.",
        "operationId": "getLlmsFullTxt",
        "responses": {
          "200": {
            "description": "Full site content",
            "content": {
              "text/plain": { "schema": { "type": "string" } }
            }
          }
        }
      }
    },
    "/sitemap.xml": {
      "get": {
        "summary": "XML Sitemap",
        "description": "Returns the XML sitemap with all 133 Morsely URLs, priorities, and lastmod dates.",
        "operationId": "getSitemap",
        "responses": {
          "200": {
            "description": "XML Sitemap",
            "content": {
              "application/xml": { "schema": { "type": "string" } }
            }
          }
        }
      }
    },
    "/.well-known/api-catalog": {
      "get": {
        "summary": "API Catalog (RFC 9727)",
        "description": "Returns the API catalog in application/linkset+json format per RFC 9727.",
        "operationId": "getApiCatalog",
        "responses": {
          "200": {
            "description": "API catalog",
            "content": {
              "application/linkset+json": { "schema": { "type": "object" } }
            }
          }
        }
      }
    },
    "/.well-known/mcp/server-card.json": {
      "get": {
        "summary": "MCP Server Card",
        "description": "Returns the MCP Server Card (SEP-1649) describing Morsely's tools and capabilities for Model Context Protocol agents.",
        "operationId": "getMcpServerCard",
        "responses": {
          "200": {
            "description": "MCP Server Card",
            "content": {
              "application/json": { "schema": { "type": "object" } }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "SiteInfo": {
        "type": "object",
        "properties": {
          "name": { "type": "string", "example": "Morsely" },
          "description": { "type": "string" },
          "url": { "type": "string", "format": "uri", "example": "https://morsely.org" },
          "publisher": { "type": "string", "example": "Cyberkov" },
          "publisherUrl": { "type": "string", "format": "uri", "example": "https://cyberkov.com" },
          "features": { "type": "array", "items": { "type": "string" } },
          "links": { "type": "object" }
        }
      }
    }
  },
  "tags": [
    { "name": "Core", "description": "Core platform endpoints" },
    { "name": "Discovery", "description": "AI and agent discovery endpoints" }
  ]
}
