{
  "openapi": "3.1.0",
  "info": {
    "title": "Dither Labs Contact API",
    "version": "1.0.0",
    "description": "Submit contact form inquiries to Dither Labs."
  },
  "servers": [
    {
      "url": "https://ditherlabs.dev"
    }
  ],
  "paths": {
    "/api/contact": {
      "post": {
        "operationId": "submitContact",
        "summary": "Submit a contact form inquiry",
        "description": "Accepts contact form data and forwards the inquiry to the Dither Labs team.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ContactRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Contact inquiry accepted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request data"
          },
          "502": {
            "description": "Upstream delivery failure"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "ContactRequest": {
        "type": "object",
        "required": ["name", "email", "phone"],
        "properties": {
          "name": {
            "type": "string",
            "minLength": 2,
            "description": "Contact name"
          },
          "email": {
            "type": "string",
            "format": "email",
            "description": "Contact email address"
          },
          "phone": {
            "type": "string",
            "minLength": 10,
            "description": "Contact phone number"
          },
          "asunto": {
            "type": "string",
            "description": "Optional subject or message"
          }
        }
      },
      "ContactResponse": {
        "type": "object",
        "properties": {
          "ok": {
            "type": "boolean"
          }
        }
      }
    }
  }
}
