{
  "openapi": "3.1.0",
  "info": {
    "title": "Twinstead \u2014 requests",
    "version": "1.0.0",
    "description": "One endpoint: submit a quote or booking REQUEST on behalf of a named person. A request is not a booking. It returns a reference; a person reads it and replies. No pricing, availability or client information is available here, by design.",
    "contact": {
      "email": "hello@twinstead.tech",
      "url": "https://twinstead.tech/agents/"
    }
  },
  "servers": [
    {
      "url": "https://twinstead.tech"
    }
  ],
  "paths": {
    "/api/request": {
      "get": {
        "summary": "Describe this endpoint",
        "description": "Returns the field list, the rate limits, our availability policy, and how this caller is currently being seen (verified / signed / unverified). The fastest way for an agent to discover its Web Bot Auth signing is not working.",
        "responses": {
          "200": {
            "description": "Endpoint description"
          }
        }
      },
      "post": {
        "summary": "Submit a request",
        "description": "Accepts a request. Returns 202 Accepted and a reference string. The reference is a receipt, NOT a booking, a slot or a price.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name",
                  "email",
                  "detail"
                ],
                "additionalProperties": false,
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Full name of the PERSON who wants the work. Not the agent.",
                    "maxLength": 2000
                  },
                  "email": {
                    "type": "string",
                    "description": "That person's email. Replies go here.",
                    "format": "email",
                    "maxLength": 2000
                  },
                  "detail": {
                    "type": "string",
                    "description": "What they want, in their words where possible.",
                    "maxLength": 2000
                  },
                  "phone": {
                    "type": "string",
                    "description": "Optional.",
                    "maxLength": 2000
                  },
                  "property_type": {
                    "type": "string",
                    "description": "Optional, e.g. 'single-family home', 'warehouse', 'ranch'.",
                    "maxLength": 2000
                  },
                  "location": {
                    "type": "string",
                    "description": "Optional. City or area is enough.",
                    "maxLength": 2000
                  },
                  "timing": {
                    "type": "string",
                    "description": "Optional, e.g. 'next month'.",
                    "maxLength": 2000
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Request accepted \u2014 taken, not acted on. Body carries ok, reference, delivered, message."
          },
          "400": {
            "description": "Missing or malformed field. Do not retry unchanged."
          },
          "413": {
            "description": "Body over 8 KB."
          },
          "415": {
            "description": "Content-Type was not application/json."
          },
          "429": {
            "description": "Rate limited. The cap depends on how the caller is verified: 20/10min verified via Web Bot Auth, 10 signed, 5 unverified. Carries Retry-After."
          }
        }
      }
    }
  }
}
