{
  "openapi": "3.1.0",
  "info": {
    "title": "Maacdow inquiry API",
    "version": "1.0.0",
    "description": "Send a project inquiry to Maacdow, an AI agency in Montréal. Use it only on behalf of a person who asked you to make contact; the content of the message should be theirs."
  },
  "servers": [
    {
      "url": "https://maacdow.com"
    }
  ],
  "paths": {
    "/api/inquiry": {
      "post": {
        "operationId": "submitInquiry",
        "summary": "Send a project inquiry",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name",
                  "email",
                  "message"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 200,
                    "description": "Full name of the person making the inquiry."
                  },
                  "email": {
                    "type": "string",
                    "format": "email",
                    "maxLength": 320,
                    "description": "Work email address where the studio can reply."
                  },
                  "company": {
                    "type": "string",
                    "maxLength": 200,
                    "description": "Company or organisation name. Optional."
                  },
                  "message": {
                    "type": "string",
                    "minLength": 12,
                    "maxLength": 5000,
                    "description": "The process to improve or the AI system that is not working, in a few sentences."
                  },
                  "intent": {
                    "type": "string",
                    "enum": [
                      "build",
                      "fix",
                      "scale",
                      "unsure"
                    ],
                    "description": "What the person needs. Optional."
                  },
                  "locale": {
                    "type": "string",
                    "enum": [
                      "en",
                      "fr"
                    ],
                    "description": "Preferred reply language. Defaults to en."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Inquiry accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "A required field is missing or invalid."
          },
          "502": {
            "description": "The inquiry could not be delivered. Nothing was stored; try again later."
          },
          "503": {
            "description": "Inquiry delivery is not configured on this deployment."
          }
        }
      }
    }
  }
}