{
  "openapi": "3.1.0",
  "info": {
    "title": "Sean Guillermo — Site API",
    "description": "Public API for seanguillermo.com. Contact and newsletter endpoints. Discoverable via /.well-known/api-catalog (RFC 9727).",
    "version": "1.1.0",
    "contact": {
      "name": "Sean Guillermo",
      "url": "https://www.seanguillermo.com/contact",
      "email": "strategy@seanguillermo.com"
    }
  },
  "servers": [{ "url": "https://www.seanguillermo.com" }],
  "components": {
    "schemas": {
      "ErrorResponse": {
        "type": "object",
        "required": ["error", "requestId"],
        "properties": {
          "error": { "type": "string", "description": "Human-readable error message" },
          "requestId": { "type": "string", "format": "uuid", "description": "Correlation ID for support" }
        }
      },
      "SuccessResponse": {
        "type": "object",
        "required": ["success", "requestId"],
        "properties": {
          "success": { "type": "boolean", "const": true },
          "requestId": { "type": "string", "format": "uuid" }
        }
      }
    },
    "responses": {
      "BadRequest": {
        "description": "Invalid or missing required fields",
        "content": {
          "application/json": {
            "schema": { "$ref": "#/components/schemas/ErrorResponse" }
          }
        }
      },
      "TooManyRequests": {
        "description": "Rate limit exceeded",
        "headers": {
          "Retry-After": {
            "schema": { "type": "integer" },
            "description": "Seconds until the client may retry"
          }
        },
        "content": {
          "application/json": {
            "schema": { "$ref": "#/components/schemas/ErrorResponse" }
          }
        }
      },
      "ServerError": {
        "description": "Internal server error",
        "content": {
          "application/json": {
            "schema": { "$ref": "#/components/schemas/ErrorResponse" }
          }
        }
      }
    }
  },
  "paths": {
    "/api/contact": {
      "post": {
        "operationId": "submitContact",
        "summary": "Submit a contact / project inquiry",
        "description": "Accepts a contact-form submission. Required: name, email, message. Optional: company, service.",
        "tags": ["Leads"],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["name", "email", "message"],
                "properties": {
                  "name": { "type": "string", "description": "Sender's name" },
                  "email": { "type": "string", "format": "email", "description": "Reply-to email address" },
                  "message": { "type": "string", "description": "Inquiry message" },
                  "company": { "type": "string", "description": "Company name (optional)" },
                  "service": {
                    "type": "string",
                    "description": "Service of interest, e.g. seo, local-seo, ecommerce, ai-search-optimization, web-development, automation (optional)"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Submission accepted",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/SuccessResponse" }
              }
            }
          },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/TooManyRequests" },
          "500": { "$ref": "#/components/responses/ServerError" }
        }
      }
    },
    "/api/newsletter": {
      "post": {
        "operationId": "subscribeNewsletter",
        "summary": "Subscribe to the newsletter",
        "description": "Accepts an email address for the Inside Strategy newsletter.",
        "tags": ["Leads"],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["email"],
                "properties": {
                  "email": { "type": "string", "format": "email", "description": "Subscriber email address" }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Subscription accepted",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/SuccessResponse" }
              }
            }
          },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/TooManyRequests" },
          "500": { "$ref": "#/components/responses/ServerError" }
        }
      }
    }
  }
}
