{
  "openapi": "3.1.0",
  "info": {
    "title": "Touch Grass Wellness — public enquiry API",
    "version": "1.0.0",
    "description": "Public endpoint for contacting Touch Grass Wellness or joining the founding membership list. Intended for the website's own form AND for AI assistants acting on a user's behalf — agent submissions are welcome. Send-only: nothing is stored server-side; the message is relayed by email to the practice, which replies to the provided address. Not for emergencies: in immediate danger call 911; in Canada call or text 9-8-8; in BC call 310-6789."
  },
  "servers": [
    { "url": "https://bverwkhlfqaxpunesxfv.supabase.co/functions/v1" }
  ],
  "paths": {
    "/tgw-contact": {
      "post": {
        "operationId": "submitEnquiry",
        "summary": "Send an enquiry or founding-list signup to Touch Grass Wellness",
        "description": "Relays the enquiry to the practice inbox. For membership interest, name the tier (Grounded, Rooted, or Evergreen) in the message. The practice replies by email to the address provided, typically the user's own.",
        "security": [{ "anonBearer": [] }],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["name", "email"],
                "properties": {
                  "name": { "type": "string", "maxLength": 200, "description": "The person's name (the human the enquiry is for, not the assistant)." },
                  "email": { "type": "string", "format": "email", "maxLength": 320, "description": "The person's email address — replies go here." },
                  "who": { "type": "string", "maxLength": 100, "description": "Who is reaching out, e.g. 'for myself', 'for someone I care about', 'as a professional making a referral', or 'via my AI assistant'." },
                  "message": { "type": "string", "maxLength": 5000, "description": "The enquiry. For membership: state the tier of interest (Grounded / Rooted / Evergreen). Do not include detailed clinical information." },
                  "website": { "type": "string", "description": "Honeypot — MUST be omitted or empty. Any value causes the submission to be silently discarded." }
                }
              },
              "examples": {
                "foundingList": {
                  "summary": "AI assistant joining the founding list for its user",
                  "value": {
                    "name": "Alex Example",
                    "email": "alex@example.com",
                    "who": "via my AI assistant",
                    "message": "Please add me to the founding membership list — Rooted tier. Interested in weekly check-ins."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": { "description": "Accepted and relayed. Body: {\"ok\": true}" },
          "400": { "description": "Validation failure. Body: {\"error\": \"name_required\" | \"invalid_email\" | \"bad_request\"}" },
          "502": { "description": "Relay failure — retry later or email info@touchgrasswellness.com directly." }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "anonBearer": {
        "type": "http",
        "scheme": "bearer",
        "description": "Public anon token, safe to embed: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImJ2ZXJ3a2hsZnFheHB1bmVzeGZ2Iiwicm9sZSI6ImFub24iLCJpYXQiOjE3Nzg1NjU0ODEsImV4cCI6MjA5NDE0MTQ4MX0.zVA23KThPg03uAK-DAHhIRTOcbkilBp-d6uU7bLRFgM"
      }
    }
  }
}
