{
  "openapi": "3.1.0",
  "info": {
    "title": "GS Ops public API",
    "version": "0.1.0",
    "description": "Read the GS Ops offer, find the package that fits, and request a call for a person. No login is needed. Nothing here can pay, sign or give texting consent.",
    "contact": {
      "name": "Joe Harper",
      "email": "joe@gsops.ai",
      "url": "https://gsops.ai/agents"
    }
  },
  "servers": [
    {
      "url": "https://gsops.ai"
    }
  ],
  "paths": {
    "/api/packages": {
      "get": {
        "operationId": "get_packages",
        "summary": "Get packages and prices",
        "description": "Returns the three GS Ops offers with prices, what each includes and excludes, who each is for, what costs extra and the agreement terms. Read-only.",
        "responses": {
          "200": {
            "description": "The offer file.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/api/business": {
      "get": {
        "operationId": "get_business_info",
        "summary": "Get business information",
        "description": "Returns GS Ops contact details, location, service area and how to reach a person. Read-only.",
        "responses": {
          "200": {
            "description": "Business information.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/api/recommend": {
      "get": {
        "operationId": "recommend_package",
        "summary": "Recommend a package",
        "description": "Applies the published rule to three yes-or-no answers and returns the GS Ops package that fits, with the reason. Read-only; nothing is saved.",
        "parameters": [
          {
            "name": "hasWebsite",
            "in": "query",
            "required": true,
            "description": "The business already has a website it wants to keep.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "wantsFollowUp",
            "in": "query",
            "required": true,
            "description": "The business wants automatic follow-up: instant replies, missed-call text-back, booking reminders and review requests.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "wantsMonthlyService",
            "in": "query",
            "required": true,
            "description": "The business wants GS Ops to host, monitor and update things every month.",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The recommended package and the reason.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "An answer is missing or is not true/false.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/api/lead": {
      "post": {
        "operationId": "request_call",
        "summary": "Request a call",
        "description": "Sends a request for GS Ops to contact a person about its services. Use only when the person has asked you to. The person is contacted by EMAIL ONLY; this tool cannot give texting consent. It does not buy anything, book a time, or agree to any terms. Sending the same request twice is refused.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "firstName": {
                    "type": "string",
                    "description": "The person's first name.",
                    "maxLength": 80
                  },
                  "lastName": {
                    "type": "string",
                    "description": "The person's last name.",
                    "maxLength": 80
                  },
                  "email": {
                    "type": "string",
                    "format": "email",
                    "description": "The person's email address. GS Ops replies here.",
                    "maxLength": 200
                  },
                  "phone": {
                    "type": "string",
                    "description": "Optional phone number with area code, for a call back. It will not be texted.",
                    "maxLength": 40
                  },
                  "businessType": {
                    "type": "string",
                    "description": "The kind of business, e.g. real estate agent, med spa, plumber.",
                    "maxLength": 80
                  },
                  "message": {
                    "type": "string",
                    "description": "What the person wants help with, in a sentence or two.",
                    "maxLength": 2000
                  },
                  "agentName": {
                    "type": "string",
                    "description": "The name of the AI assistant sending this request, e.g. Claude.",
                    "maxLength": 80
                  }
                },
                "required": [
                  "firstName",
                  "email"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The request was received.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Details are missing or not valid; see `issues`.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "409": {
            "description": "The same request was already sent.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Try again later.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "503": {
            "description": "The request could not be taken; contact details are in the message.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    }
  }
}