{
  "openapi": "3.1.0",
  "info": {
    "title": "SpecStory public website content API",
    "version": "1.0.0",
    "description": "Read the published website, product docs, blog, education, and legal pages. These static GET resources are free and need no authentication. The index returns the complete collection without pagination. No private sessions, alpha enrollment, or messaging operations are exposed. SpecStory Cloud has a separate authenticated API documented at /docs/api-reference/introduction.",
    "contact": { "name": "SpecStory", "email": "info@specstory.com", "url": "https://specstory.com/contact" }
  },
  "servers": [{ "url": "/", "description": "The origin serving this website" }],
  "security": [],
  "paths": {
    "/api/content.json": {
      "get": {
        "operationId": "listPublicPages",
        "summary": "List all published SpecStory pages",
        "description": "Retrieve page IDs, titles, descriptions, canonical URLs, and relative URLs for Markdown and JSON. All published pages are included in this single static response.",
        "responses": {
          "200": { "description": "The complete public content index", "content": { "application/json": { "schema": { "type": "object", "required": ["name", "description", "pages"], "properties": { "name": { "type": "string" }, "description": { "type": "string" }, "pages": { "type": "array", "items": { "$ref": "#/components/schemas/Page" } } } } } } }
        }
      }
    },
    "/api/content/{id}.json": {
      "get": {
        "operationId": "getPublicPage",
        "summary": "Read one published page as Markdown in JSON",
        "description": "Use an id returned by listPublicPages. The Markdown is generated from the same production HTML visitors read; navigation and decorative elements are omitted.",
        "parameters": [{ "name": "id", "in": "path", "required": true, "description": "The exact page id from the public content index, for example docs--quickstart or index.", "schema": { "type": "string", "minLength": 1 }, "example": "docs--quickstart" }],
        "responses": {
          "200": { "description": "Page identity and full Markdown content", "content": { "application/json": { "schema": { "allOf": [{ "$ref": "#/components/schemas/Page" }, { "type": "object", "required": ["markdown"], "properties": { "markdown": { "type": "string" } } }] } } } },
          "404": { "description": "No published page has this id", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Page": {
        "type": "object", "required": ["id", "path", "url", "title", "description", "markdownUrl", "contentUrl"],
        "properties": {
          "id": { "type": "string" }, "path": { "type": "string" }, "url": { "type": "string", "format": "uri" },
          "title": { "type": "string" }, "description": { "type": "string" }, "markdownUrl": { "type": "string" }, "contentUrl": { "type": "string" }
        }
      },
      "Problem": {
        "type": "object", "required": ["type", "title", "status", "code", "detail", "resolution"],
        "properties": { "type": { "type": "string", "format": "uri" }, "title": { "type": "string" }, "status": { "type": "integer" }, "code": { "type": "string" }, "detail": { "type": "string" }, "resolution": { "type": "string" } }
      }
    }
  }
}
