{
  "openapi": "3.1.0",
  "info": {
    "title": "Meghoo agent API",
    "version": "1.0.0",
    "description": "For AI agents acting on behalf of a person: request a 20-minute intro call or a free first-pass assessment from Meghoo Consulting. Send the person's real details with their consent. Nothing is booked until the team confirms with the person by email.",
    "contact": {
      "email": "info@meghoo-consulting.com",
      "url": "https://meghoo-consulting.com/"
    }
  },
  "servers": [
    {
      "url": "https://fd-dev-app.proudstone-ce7552f9.eastus2.azurecontainerapps.io"
    }
  ],
  "paths": {
    "/v1/agent/businesses/{businessId}/requests": {
      "post": {
        "summary": "Request an intro call or a free assessment for a person (for AI agents)",
        "description": "For AI agents acting on behalf of a person who asked them to. Server-to-server: no browser origin is needed.\nOnly businesses that accept agent requests answer (others 404). The request reaches the team like the website\nform does and is marked as agent-submitted; nothing is booked until the team confirms with the person by email.\nSend the person's real contact details and a summary of their business in their own terms; never invent them.\n",
        "operationId": "requestIntroCallOrAssessment",
        "parameters": [
          {
            "name": "businessId",
            "in": "path",
            "required": true,
            "description": "Business id; for Meghoo Consulting use `meghoo`.",
            "schema": {
              "type": "string",
              "enum": [
                "meghoo"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "kind",
                  "name",
                  "email",
                  "businessSummary"
                ],
                "properties": {
                  "kind": {
                    "enum": [
                      "intro-call",
                      "free-assessment"
                    ],
                    "description": "`intro-call`: a 20-minute call. `free-assessment`: a written first pass on the business's systems or AI readiness."
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200,
                    "description": "The person's full name."
                  },
                  "email": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 320,
                    "description": "The person's email; the team replies there."
                  },
                  "phone": {
                    "type": "string",
                    "maxLength": 40
                  },
                  "company": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "preferredTimes": {
                    "type": "string",
                    "maxLength": 300,
                    "description": "For example: weekday mornings, Pacific time."
                  },
                  "businessSummary": {
                    "type": "string",
                    "minLength": 20,
                    "maxLength": 8000,
                    "description": "What the business does, its size, its systems and the problem to solve."
                  },
                  "goals": {
                    "type": "string",
                    "maxLength": 2000
                  },
                  "agentName": {
                    "type": "string",
                    "maxLength": 100,
                    "description": "The agent or product submitting",
                    "for the team's records.": null
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Received. Tell the person the next step from `nextStep`.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "received",
                    "kind",
                    "nextStep"
                  ],
                  "properties": {
                    "received": {
                      "const": true
                    },
                    "kind": {
                      "enum": [
                        "intro-call",
                        "free-assessment"
                      ]
                    },
                    "replyDueBy": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "nextStep": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Request does not match the schema.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "reply": {
                      "type": "string",
                      "description": "Text to show the visitor",
                      "when there is one.": null
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Unknown business",
            "or it does not accept agent requests.": null
          },
          "429": {
            "description": "Too many requests from this sender; try later."
          },
          "503": {
            "description": "Not saved; ask the person to email the business instead."
          }
        }
      }
    }
  }
}
