{
  "openapi": "3.1.0",
  "info": {
    "title": "PlaidGTM inquiry API",
    "version": "1.0.0",
    "description": "Lets people and AI agents send a project inquiry to PlaidGTM (agentic GTM systems, founded by Jordan Stewart). Submit only on behalf of a real person who asked to get in touch, with their real contact details. Jordan replies by email."
  },
  "servers": [{ "url": "https://www.plaidgtm.com" }],
  "paths": {
    "/api/inquiry": {
      "post": {
        "operationId": "submitInquiry",
        "summary": "Send a project inquiry to PlaidGTM",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": { "$ref": "#/components/schemas/Inquiry" },
              "example": {
                "name": "Full Name",
                "email": "person@company.example",
                "company": "Company name",
                "role": "VP Sales",
                "team_size": "11-50",
                "interest": "prospecting-agents",
                "message": "Our AEs spend half a day researching accounts before outreach. Looking for help building research agents that write back to HubSpot.",
                "submitted_by": "agent",
                "agent_name": "Assistant name",
                "on_behalf_of": "Full Name"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Inquiry received",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": { "success": { "type": "boolean" }, "message": { "type": "string" } }
                }
              }
            }
          },
          "400": { "description": "Missing or invalid fields; the response lists them" },
          "502": { "description": "Inquiry could not be delivered; retry later" }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Inquiry": {
        "type": "object",
        "required": ["name", "email", "message"],
        "properties": {
          "name": { "type": "string", "maxLength": 200, "description": "Full name of the person Jordan should reply to" },
          "email": { "type": "string", "format": "email", "description": "Where Jordan should reply" },
          "company": { "type": "string", "maxLength": 200 },
          "website": { "type": "string", "maxLength": 300 },
          "role": { "type": "string", "maxLength": 200 },
          "team_size": { "type": "string", "enum": ["1-10", "11-50", "51-200", "201-1000", "1000+"] },
          "interest": {
            "type": "string",
            "enum": ["company-skills", "prospecting-agents", "crm-agents", "rep-morning-page", "gtm-architecture", "not-sure"],
            "description": "Which PlaidGTM service fits best"
          },
          "message": { "type": "string", "maxLength": 5000, "description": "What the team is trying to fix or build" },
          "referral": { "type": "string", "maxLength": 300, "description": "How they heard about PlaidGTM" },
          "submitted_by": { "type": "string", "enum": ["human", "agent"], "default": "agent" },
          "agent_name": { "type": "string", "maxLength": 200, "description": "Name of the AI agent or assistant submitting" },
          "on_behalf_of": { "type": "string", "maxLength": 200, "description": "The person the agent is acting for" }
        }
      }
    }
  }
}
