{
  "openapi": "3.1.0",
  "info": {
    "title": "Bridger Tower API",
    "version": "0.1.0",
    "description": "Public APIs for Bridger Tower's website: posts, newsletter, health, and MCP."
  },
  "servers": [
    {
      "url": "https://bridger.to"
    }
  ],
  "paths": {
    "/api/posts": {
      "get": {
        "summary": "List published posts",
        "operationId": "listPosts",
        "responses": {
          "200": {
            "description": "Published posts"
          }
        }
      }
    },
    "/api/posts/{slug}": {
      "get": {
        "summary": "Get a published post",
        "operationId": "getPost",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Post"
          },
          "404": {
            "description": "Not found"
          }
        }
      }
    },
    "/api/subscribe": {
      "post": {
        "summary": "Subscribe to the newsletter",
        "operationId": "subscribe",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "email"
                ],
                "properties": {
                  "email": {
                    "type": "string",
                    "format": "email"
                  },
                  "source": {
                    "type": "string"
                  },
                  "userGroup": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Subscribed"
          },
          "400": {
            "description": "Invalid request"
          }
        }
      }
    },
    "/api/health": {
      "get": {
        "summary": "Health check",
        "operationId": "health",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/mcp": {
      "post": {
        "summary": "MCP Streamable HTTP endpoint",
        "operationId": "mcp",
        "responses": {
          "200": {
            "description": "JSON-RPC response"
          }
        }
      }
    }
  }
}
