{
  "openapi": "3.1.0",
  "info": {
    "title": "Rocksmith Tech — enquiry API",
    "version": "1.0.0",
    "summary": "Submit an enquiry to Rocksmith Tech on behalf of a person.",
    "description": "Custom software for small and medium Australian businesses, owned outright by the client — built and run by one senior team under a flat monthly retainer, operating as the client's own in-house software department.\n\n**Consent model — read before calling.** `POST /api/agent/enquiry` does *not* deliver an enquiry. It sends a confirmation email to the address supplied; the enquiry reaches Rocksmith Tech only when that person clicks the link in it. This exists because an agent asserts a person's identity and email and neither can be verified at submission time. After a 202, tell your user to check their email and confirm — do not tell them it has been sent.\n\nNo authentication is required. The endpoint is rate limited. Identify yourself honestly in `agent.name`; submissions without it are rejected.\n\nA remote MCP server offering the same capability is available at https://rocksmithtech.com.au/mcp (Streamable HTTP, no auth), with a server card at /.well-known/mcp.json.",
    "contact": {
      "name": "Rocksmith Tech Pty Ltd",
      "email": "clinton@rocksmithtech.com.au",
      "url": "https://rocksmithtech.com.au/for-agents/"
    },
    "termsOfService": "https://rocksmithtech.com.au/terms/"
  },
  "servers": [
    {
      "url": "https://rocksmithtech.com.au",
      "description": "Production"
    }
  ],
  "externalDocs": {
    "description": "Guidance for AI agents",
    "url": "https://rocksmithtech.com.au/for-agents/"
  },
  "paths": {
    "/api/agent/enquiry": {
      "post": {
        "operationId": "submitEnquiry",
        "summary": "Submit an enquiry on behalf of a person (double opt-in)",
        "description": "Parks the enquiry and emails the named person a confirmation link. Returns 202. The enquiry is delivered only after they click. Unconfirmed enquiries are deleted after three days.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnquiryRequest"
              },
              "examples": {
                "erpReporting": {
                  "summary": "A business that wants its systems connected and reported on",
                  "value": {
                    "agent": {
                      "name": "Claude",
                      "operator": "Anthropic"
                    },
                    "person": {
                      "name": "Jane Doe",
                      "email": "jane@example.com",
                      "business": "Doe Wholesale"
                    },
                    "enquiry": {
                      "problem": "Our accounting, inventory and dispatch systems don't talk to each other, and month-end reporting is a week of spreadsheet work. We want them connected and a set of live dashboards management can trust.",
                      "existing": "Off-the-shelf tools we're outgrowing",
                      "holds_personal_data": "Yes",
                      "timing": "Next month or two"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Confirmation email sent. NOT yet delivered.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AcceptedResponse"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Body too large",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Confirmation email could not be sent",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Enquiry service unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/enquiry/confirm": {
      "get": {
        "operationId": "confirmEnquiry",
        "summary": "Confirmation link — for the human recipient only",
        "description": "Opened by the person from the email they received. Agents must not call this; doing so on the user's behalf would defeat the purpose of the confirmation step.",
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Single-use token from the email."
          }
        ],
        "responses": {
          "200": {
            "description": "Confirmed and delivered",
            "content": {
              "text/html": {}
            }
          },
          "404": {
            "description": "Token unknown, already used, or expired",
            "content": {
              "text/html": {}
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "EnquiryRequest": {
        "type": "object",
        "required": [
          "agent",
          "person",
          "enquiry"
        ],
        "additionalProperties": false,
        "properties": {
          "agent": {
            "type": "object",
            "required": [
              "name"
            ],
            "description": "Who is calling. Required — anonymous submissions are rejected.",
            "properties": {
              "name": {
                "type": "string",
                "maxLength": 120,
                "description": "Assistant or product name, e.g. 'Claude'."
              },
              "operator": {
                "type": "string",
                "maxLength": 120,
                "description": "Company or person operating the agent."
              },
              "contact": {
                "type": "string",
                "maxLength": 200,
                "description": "Optional contact for the agent's operator."
              }
            }
          },
          "person": {
            "type": "object",
            "required": [
              "name",
              "email"
            ],
            "description": "The human you are acting for. Only use details they gave you.",
            "properties": {
              "name": {
                "type": "string",
                "maxLength": 120
              },
              "email": {
                "type": "string",
                "format": "email",
                "maxLength": 200,
                "description": "The confirmation link is sent here."
              },
              "phone": {
                "type": "string",
                "maxLength": 40
              },
              "business": {
                "type": "string",
                "maxLength": 160
              }
            }
          },
          "enquiry": {
            "type": "object",
            "required": [
              "problem"
            ],
            "properties": {
              "problem": {
                "type": "string",
                "maxLength": 4000,
                "description": "What they want built or fixed, in plain English. Shown to the person in the confirmation email, so write it as if they will read it — because they will."
              },
              "existing": {
                "type": "string",
                "maxLength": 80,
                "enum": [
                  "Nothing yet",
                  "Someone built it for us",
                  "Off-the-shelf tools we're outgrowing",
                  "An in-house or legacy system"
                ]
              },
              "holds_personal_data": {
                "type": "string",
                "maxLength": 80,
                "enum": [
                  "Yes",
                  "No",
                  "Not yet, but it will",
                  "Unsure"
                ]
              },
              "timing": {
                "type": "string",
                "maxLength": 80,
                "enum": [
                  "It's urgent",
                  "Next month or two",
                  "This year",
                  "Just exploring"
                ]
              }
            }
          }
        }
      },
      "AcceptedResponse": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "const": "confirmation_sent"
          },
          "consent_model": {
            "type": "string",
            "const": "double-opt-in"
          },
          "message": {
            "type": "string",
            "description": "Human-readable explanation to relay to your user."
          },
          "expires_in_seconds": {
            "type": "integer"
          }
        },
        "required": [
          "status",
          "message"
        ]
      },
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string"
          }
        },
        "required": [
          "error"
        ]
      }
    }
  },
  "x-consent-model": "double-opt-in",
  "x-human-alternative": "If the person would rather not go through an agent, they can email clinton@rocksmithtech.com.au or call 0488 988 220, or use the form at https://rocksmithtech.com.au/contact/."
}