{
  "openapi": "3.1.0",
  "info": {
    "title": "devaris.com contact API",
    "version": "1.0.0",
    "description": "Submit an enquiry to DeVaris Brown. Verified with Cloudflare Turnstile; delivered by email. Nothing is stored server-side.",
    "contact": {
      "name": "DeVaris Brown",
      "email": "devaris@devaris.com",
      "url": "https://devaris.com"
    }
  },
  "servers": [
    {
      "url": "https://devaris.com"
    }
  ],
  "paths": {
    "/api/contact": {
      "post": {
        "summary": "Send an enquiry",
        "operationId": "sendEnquiry",
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "name",
                  "email",
                  "message"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "maxLength": 120
                  },
                  "email": {
                    "type": "string",
                    "format": "email",
                    "maxLength": 254
                  },
                  "message": {
                    "type": "string",
                    "maxLength": 4000
                  },
                  "topic": {
                    "type": "string",
                    "enum": [
                      "General",
                      "Speaking",
                      "Consulting",
                      "Advisory / investment"
                    ],
                    "default": "General"
                  },
                  "cf-turnstile-response": {
                    "type": "string",
                    "description": "Turnstile token. Required — a submission without one is refused."
                  },
                  "started": {
                    "type": "integer",
                    "description": "Epoch milliseconds when the form was rendered. Used only when Turnstile is unconfigured."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Accepted and sent.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Validation failed, or verification was missing or rejected.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed. Only POST is accepted."
          },
          "502": {
            "description": "The mail provider rejected the message."
          },
          "503": {
            "description": "Email is not configured on this deployment."
          }
        }
      }
    }
  }
}