{
  "openapi": "3.1.0",
  "info": {
    "title": "DIN CTRL public actions",
    "version": "1.0.0",
    "description": "The one public action on dinctrl.com: submit a lead (an email address, optionally a name) for the free build or for a paid plan when DIN launches. DIN is prelaunch. There is no public pricing lookup endpoint beyond the static https://dinctrl.com/pricing.json, and no checkout endpoint. Submit a lead only with the consent of the person whose address it is."
  },
  "servers": [{ "url": "https://dinctrl.com" }],
  "paths": {
    "/api/lead": {
      "post": {
        "operationId": "createLead",
        "summary": "Submit a lead",
        "description": "Appends one line to a local file on the console that serves this site: the fields below and the time. Not the IP address, not the user agent, not a cookie. There is no route that reads a lead back out. GET answers 405.",
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "required": ["email"],
                "properties": {
                  "email": { "type": "string", "format": "email", "description": "Required." },
                  "first": { "type": "string", "maxLength": 64, "description": "First name. Optional." },
                  "last": { "type": "string", "maxLength": 64, "description": "Last name. Optional." },
                  "intent": { "type": "string", "maxLength": 32, "pattern": "^[a-z0-9_-]+$", "description": "Which door the lead came through, for example download or paid. Optional; defaults to unknown." },
                  "tier": { "type": "string", "maxLength": 32, "pattern": "^[a-z0-9_-]+$", "description": "The plan a paid lead asked about. Optional." },
                  "billing_mode": { "type": "string", "enum": ["self-host", "hosted"], "description": "Optional." },
                  "segment": { "type": "string", "enum": ["enterprise", "agency", "smb"], "description": "The landing the lead was framed by. Optional." },
                  "note": { "type": "string", "description": "Free text. Optional; control characters are dropped and it is cut at 500 characters." }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Stored.",
            "content": { "application/json": { "schema": { "type": "object", "properties": {
              "ok": { "type": "boolean", "const": true },
              "stored": { "type": "boolean", "const": true },
              "intent": { "type": "string" } } } } }
          },
          "400": {
            "description": "A field failed validation. The error names the field.",
            "content": { "application/json": { "schema": { "type": "object", "properties": {
              "ok": { "type": "boolean", "const": false },
              "error": { "type": "string" } } } } }
          },
          "405": { "description": "Not a POST." },
          "503": { "description": "The console could not store the lead. Nothing was kept or sent anywhere else." }
        }
      }
    }
  }
}
