{
  "openapi": "3.1.0",
  "info": {
    "title": "ResolveAI enquiries",
    "version": "1.0",
    "description": "Send a business enquiry to ResolveAI on behalf of a person, with their consent. ResolveAI replies by email to the address given."
  },
  "servers": [
    {
      "url": "https://www.resolveai.cc"
    }
  ],
  "paths": {
    "/api/contact": {
      "post": {
        "operationId": "sendEnquiry",
        "summary": "Send an enquiry to ResolveAI",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name",
                  "email",
                  "problem"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "maxLength": 120,
                    "description": "Person's name"
                  },
                  "company": {
                    "type": "string",
                    "maxLength": 160
                  },
                  "email": {
                    "type": "string",
                    "format": "email",
                    "description": "Where ResolveAI should reply"
                  },
                  "phone": {
                    "type": "string",
                    "maxLength": 40,
                    "description": "Optional phone or WhatsApp number"
                  },
                  "team": {
                    "type": "string",
                    "description": "Team size, e.g. 11-50"
                  },
                  "problem": {
                    "type": "string",
                    "maxLength": 4000,
                    "description": "What they need: the slow or manual work, and which product they are interested in"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Enquiry received",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Missing or invalid fields"
          },
          "502": {
            "description": "Could not send right now; email hello@resolveai.cc"
          }
        }
      }
    }
  }
}