{
  "openapi": "3.1.0",
  "info": {
    "title": "bensonshen.com",
    "version": "2.0.0",
    "description": "The API behind Benson Shen's portfolio. Read-only apart from the contact endpoint. There is also an MCP server at /mcp.",
    "contact": {
      "name": "Benson Shen",
      "email": "me@bensonshen.com",
      "url": "https://bensonshen.com"
    }
  },
  "servers": [
    {
      "url": "https://bensonshen.com"
    }
  ],
  "paths": {
    "/": {
      "get": {
        "summary": "The site",
        "description": "Returns HTML to browsers. Terminal clients (curl, wget, httpie) get a plain-text résumé instead.",
        "responses": {
          "200": {
            "description": "HTML page or plain-text résumé, by content negotiation",
            "content": {
              "text/html": {},
              "text/plain": {}
            }
          }
        }
      }
    },
    "/api/resume.json": {
      "get": {
        "summary": "Résumé as JSON Resume",
        "responses": {
          "200": {
            "description": "A JSON Resume v1 document",
            "content": {
              "application/json": {}
            }
          }
        }
      }
    },
    "/api/openapi.json": {
      "get": {
        "summary": "This document",
        "responses": {
          "200": {
            "description": "OpenAPI 3.1 spec"
          }
        }
      }
    },
    "/api/contact": {
      "post": {
        "summary": "Send a message",
        "description": "Turnstile-protected. Rate limited per IP.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name",
                  "email",
                  "message"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "maxLength": 120
                  },
                  "email": {
                    "type": "string",
                    "format": "email",
                    "maxLength": 200
                  },
                  "message": {
                    "type": "string",
                    "maxLength": 4000
                  },
                  "turnstileToken": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Message accepted"
          },
          "400": {
            "description": "Validation failed"
          },
          "403": {
            "description": "Turnstile verification failed"
          },
          "429": {
            "description": "Rate limited"
          },
          "503": {
            "description": "Email delivery not configured"
          }
        }
      },
      "options": {
        "summary": "Contact form configuration",
        "description": "Returns the Turnstile site key if one is configured.",
        "responses": {
          "200": {
            "description": "Public form configuration"
          }
        }
      }
    },
    "/mcp": {
      "post": {
        "summary": "MCP endpoint (Streamable HTTP)",
        "description": "Model Context Protocol server exposing get_profile, list_projects, get_experience, search and get_resume. Supports spec 2026-07-28 and the legacy initialize handshake.",
        "responses": {
          "200": {
            "description": "JSON-RPC response"
          }
        }
      }
    }
  }
}