{
  "openapi": "3.1.0",
  "info": {
    "title": "Cypher Knowledge Base API",
    "description": "Static JSON API for Cypher's blog and help center content. All endpoints are pre-built at deploy time and require no authentication.",
    "version": "1.0.0",
    "contact": {
      "name": "Cypher",
      "url": "https://cypherhq.io"
    }
  },
  "servers": [
    {
      "url": "https://cypherhq.io"
    }
  ],
  "paths": {
    "/llms.txt": {
      "get": {
        "operationId": "getLlmsTxt",
        "summary": "LLM discovery file",
        "description": "Returns a plain-text discovery file following the llms.txt proposal. Lists all product pages, help center categories, blog posts, legal pages, and API endpoints with descriptions and links.",
        "responses": {
          "200": {
            "description": "Plain-text llms.txt discovery file",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/llms-full.txt": {
      "get": {
        "operationId": "getLlmsFullTxt",
        "summary": "Full LLM knowledge base",
        "description": "Returns a plain-text file containing the full markdown content of every help center article and blog post. This is the comprehensive version of /llms.txt with all content inlined.",
        "responses": {
          "200": {
            "description": "Plain-text file with all help articles and blog posts inlined as markdown",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/api/blog-index.json": {
      "get": {
        "operationId": "getBlogsIndex",
        "summary": "List all blog posts",
        "description": "Returns an index of all published blog posts with metadata. Use this to discover blog content, then fetch individual posts via the blog doc endpoint.",
        "responses": {
          "200": {
            "description": "Array of blog post summaries",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/BlogIndexItem"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/help-index.json": {
      "get": {
        "operationId": "getHelpIndex",
        "summary": "List all help center articles",
        "description": "Returns an index of all FAQ/help articles organized by category. Use this to discover help content, then fetch individual articles via the help doc endpoint.",
        "responses": {
          "200": {
            "description": "Array of help article summaries",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/HelpIndexItem"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/docs/blog/{slug}.json": {
      "get": {
        "operationId": "getBlogDoc",
        "summary": "Get full blog post content",
        "description": "Returns a single blog post with full markdown body content. The slug can be found in the blogs index.",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "description": "Blog post slug (e.g. 'hello-world')",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Full blog post with markdown body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BlogDoc"
                }
              }
            }
          }
        }
      }
    },
    "/api/docs/help/{category}/{slug}.json": {
      "get": {
        "operationId": "getHelpDoc",
        "summary": "Get full help article content",
        "description": "Returns a single help/FAQ article with full markdown body content. The category and slug can be found in the help index.",
        "parameters": [
          {
            "name": "category",
            "in": "path",
            "required": true,
            "description": "Article category (e.g. 'getting-started', 'cards', 'wallet')",
            "schema": {
              "type": "string",
              "enum": [
                "getting-started",
                "cards",
                "transactions",
                "wallet",
                "premium",
                "protocol",
                "rewards",
                "business"
              ]
            }
          },
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "description": "Article slug within the category",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Full help article with markdown body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HelpDoc"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "BlogIndexItem": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Blog post identifier / slug"
          },
          "url": {
            "type": "string",
            "description": "Canonical page URL"
          },
          "title": {
            "type": "string",
            "description": "Blog post headline"
          },
          "section": {
            "type": "string",
            "const": "blog",
            "description": "Content section"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Tags for categorization"
          },
          "author": {
            "type": "string",
            "description": "Author key"
          },
          "publishDate": {
            "type": "string",
            "format": "date",
            "description": "Publication date (YYYY-MM-DD)"
          },
          "updatedDate": {
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "description": "Last updated date or null"
          },
          "excerpt": {
            "type": "string",
            "description": "Short description / excerpt"
          }
        },
        "required": [
          "id",
          "url",
          "title",
          "section",
          "tags",
          "author",
          "publishDate",
          "excerpt"
        ]
      },
      "HelpIndexItem": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Article identifier (category/slug format)"
          },
          "url": {
            "type": "string",
            "description": "Canonical page URL"
          },
          "title": {
            "type": "string",
            "description": "Article title / question"
          },
          "section": {
            "type": "string",
            "const": "help",
            "description": "Content section"
          },
          "category": {
            "type": "string",
            "description": "Category ID"
          },
          "categoryTitle": {
            "type": "string",
            "description": "Human-readable category name"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Tags for filtering"
          },
          "updatedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "description": "Last updated date or null"
          },
          "excerpt": {
            "type": "string",
            "description": "Short description or body excerpt"
          }
        },
        "required": [
          "id",
          "url",
          "title",
          "section",
          "category",
          "categoryTitle",
          "tags",
          "excerpt"
        ]
      },
      "BlogDoc": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "section": {
            "type": "string",
            "const": "blog"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "author": {
            "type": "string"
          },
          "publishDate": {
            "type": "string",
            "format": "date"
          },
          "updatedDate": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "excerpt": {
            "type": "string"
          },
          "bodyMarkdown": {
            "type": "string",
            "description": "Full article content in Markdown"
          }
        },
        "required": [
          "id",
          "url",
          "title",
          "section",
          "tags",
          "author",
          "publishDate",
          "excerpt",
          "bodyMarkdown"
        ]
      },
      "HelpDoc": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "section": {
            "type": "string",
            "const": "help"
          },
          "category": {
            "type": "string"
          },
          "categoryTitle": {
            "type": "string"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "updatedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "bodyMarkdown": {
            "type": "string",
            "description": "Full article content in Markdown"
          }
        },
        "required": [
          "id",
          "url",
          "title",
          "section",
          "category",
          "categoryTitle",
          "tags",
          "bodyMarkdown"
        ]
      }
    }
  }
}