{
  "openapi": "3.1.0",
  "info": {
    "title": "Quillmoor agent API",
    "version": "0.1.0"
  },
  "servers": [
    {
      "url": "https://agents.humblecopper.store"
    }
  ],
  "paths": {
    "/bookings": {
      "post": {
        "operationId": "createBooking",
        "summary": "Book a demo",
        "description": "Sends a request. Nothing is charged or confirmed until the request is answered by email.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "offer": {
                    "type": "string",
                    "enum": [
                      "demo"
                    ]
                  },
                  "date": {
                    "type": "string",
                    "format": "date"
                  },
                  "time": {
                    "type": "string",
                    "pattern": "^[0-2][0-9]:[0-5][0-9]$"
                  },
                  "name": {
                    "type": "string"
                  },
                  "email": {
                    "type": "string",
                    "format": "email"
                  },
                  "notes": {
                    "type": "string",
                    "maxLength": 1000
                  }
                },
                "required": [
                  "offer",
                  "date",
                  "time",
                  "name",
                  "email"
                ]
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "offer": {
                    "type": "string",
                    "enum": [
                      "demo"
                    ]
                  },
                  "date": {
                    "type": "string",
                    "format": "date"
                  },
                  "time": {
                    "type": "string",
                    "pattern": "^[0-2][0-9]:[0-5][0-9]$"
                  },
                  "name": {
                    "type": "string"
                  },
                  "email": {
                    "type": "string",
                    "format": "email"
                  },
                  "notes": {
                    "type": "string",
                    "maxLength": 1000
                  }
                },
                "required": [
                  "offer",
                  "date",
                  "time",
                  "name",
                  "email"
                ]
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Request received",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "const": "received"
                    },
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Fields missing or invalid; send the request again with them",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "missing": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "invalid": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/quotes": {
      "post": {
        "operationId": "createQuote",
        "summary": "Request a quote",
        "description": "Sends a request. Nothing is charged or confirmed until the request is answered by email.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "offer": {
                    "type": "string",
                    "enum": [
                      "demo",
                      "starter",
                      "growth",
                      "scale",
                      "enterprise",
                      "extra-framework",
                      "audit-type-1",
                      "audit-type-2",
                      "pentest"
                    ]
                  },
                  "employees": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 100000
                  },
                  "email": {
                    "type": "string",
                    "format": "email"
                  },
                  "notes": {
                    "type": "string",
                    "maxLength": 1000
                  }
                },
                "required": [
                  "offer",
                  "employees",
                  "email"
                ]
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "offer": {
                    "type": "string",
                    "enum": [
                      "demo",
                      "starter",
                      "growth",
                      "scale",
                      "enterprise",
                      "extra-framework",
                      "audit-type-1",
                      "audit-type-2",
                      "pentest"
                    ]
                  },
                  "employees": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 100000
                  },
                  "email": {
                    "type": "string",
                    "format": "email"
                  },
                  "notes": {
                    "type": "string",
                    "maxLength": 1000
                  }
                },
                "required": [
                  "offer",
                  "employees",
                  "email"
                ]
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Request received",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "const": "received"
                    },
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Fields missing or invalid; send the request again with them",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "missing": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "invalid": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}
