{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/pricklymails-com/json-schema/pricklymails-com-signup-preview-response-schema.json",
  "title": "SignupPreviewResponse",
  "description": "Response body for `POST /api/auth/signup-preview`.\n\nSays which checks passed and nothing more: the score, the verdict and the reasons stay on the server until the\naccount the visitor creates is confirmed.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/pricklymails-com-auth-api-openapi.yml#/components/schemas/SignupPreviewResponse",
  "type": "object",
  "required": [
    "signup"
  ],
  "properties": {
    "checks": {
      "oneOf": [
        {
          "type": "null"
        },
        {
          "$ref": "#/$defs/PreviewChecksDto",
          "description": "Which checks passed, absent when no check ran."
        }
      ]
    },
    "preview_token": {
      "type": [
        "string",
        "null"
      ],
      "description": "The handle on the stored result, to send back with `POST /api/auth/register` and `POST /api/auth/confirm`.\nPresent only when `signup` is `allowed`."
    },
    "signup": {
      "$ref": "#/$defs/SignupEligibilityDto",
      "description": "Whether the address may sign up."
    }
  },
  "$defs": {
    "MxPreviewDto": {
      "oneOf": [
        {
          "type": "object",
          "description": "The check ran.",
          "required": [
            "valid"
          ],
          "properties": {
            "valid": {
              "type": "boolean",
              "description": "Whether the domain publishes at least one usable mail exchanger."
            }
          }
        },
        {
          "type": "object",
          "description": "The check was not run.",
          "required": [
            "status"
          ],
          "properties": {
            "status": {
              "type": "string",
              "description": "Always `\"skipped\"`."
            }
          }
        }
      ],
      "description": "The MX check of a signup preview."
    },
    "PreviewChecksDto": {
      "type": "object",
      "description": "Which checks passed for an address a visitor previews before signing up: the shape of the per-check result object,\nwithout the mail exchanger hostnames.",
      "required": [
        "syntax",
        "mx",
        "disposable",
        "role",
        "free",
        "typo",
        "smtp",
        "catchall"
      ],
      "properties": {
        "catchall": {
          "$ref": "#/$defs/ProviderFlagDto",
          "description": "Whether the domain is a catch-all server."
        },
        "disposable": {
          "$ref": "#/$defs/ProviderFlagDto",
          "description": "Whether the domain is from a known disposable provider."
        },
        "free": {
          "$ref": "#/$defs/ProviderFlagDto",
          "description": "Whether the domain is a known free webmail provider."
        },
        "mx": {
          "$ref": "#/$defs/MxPreviewDto",
          "description": "Whether the domain publishes a usable mail exchanger."
        },
        "role": {
          "$ref": "#/$defs/ProviderFlagDto",
          "description": "Whether the local-part is a known role-based address."
        },
        "smtp": {
          "$ref": "#/$defs/SmtpCheckDto",
          "description": "SMTP deliverability probe result."
        },
        "syntax": {
          "type": "boolean",
          "description": "Whether the email syntax is valid."
        },
        "typo": {
          "$ref": "#/$defs/TypoCheckDto",
          "description": "Typo detection result, with the corrected address when one was found."
        }
      }
    },
    "ProviderFlagDto": {
      "oneOf": [
        {
          "type": "boolean",
          "description": "The check ran; carries the real boolean result."
        },
        {
          "type": "object",
          "description": "The check was not run.",
          "required": [
            "status"
          ],
          "properties": {
            "status": {
              "type": "string",
              "description": "Always `\"skipped\"`."
            }
          }
        }
      ],
      "description": "A boolean provider or risk-flag check result (`disposable`, `role`, `free`, `catchall`).\n\nRenders as a bare `true`/`false` when the check ran, or as `{ \"status\": \"skipped\" }` when it did not run (excluded\nfrom the caller's check set), the same skipped shape the `mx` and `smtp` checks use, so an unrun check never reads\nas a definitive negative result."
    },
    "SignupEligibilityDto": {
      "type": "string",
      "description": "Whether the previewed address may sign up.",
      "enum": [
        "allowed",
        "undeliverable",
        "disposable",
        "unchecked"
      ]
    },
    "SmtpCheckDto": {
      "type": "object",
      "description": "SMTP deliverability probe result.",
      "required": [
        "status"
      ],
      "properties": {
        "status": {
          "$ref": "#/$defs/SmtpStatusDto",
          "description": "SMTP probe outcome: `deliverable` (the server accepted the `RCPT TO` command), `undeliverable` (the server\npermanently rejected the recipient, 5xx), `unknown` (no definitive answer: a temporary refusal, a timeout, a\nconnection failure, or a server that refused the probe itself), or `skipped` (not requested, or not\nneeded because the answer was already known)."
        }
      }
    },
    "SmtpStatusDto": {
      "type": "string",
      "description": "Outcome of the SMTP probe.",
      "enum": [
        "deliverable",
        "undeliverable",
        "unknown",
        "skipped"
      ]
    },
    "TypoCheckDto": {
      "type": "object",
      "description": "Typo detection result.",
      "required": [
        "detected"
      ],
      "properties": {
        "detected": {
          "type": "boolean",
          "description": "Whether a domain typo was detected."
        },
        "suggested_domain": {
          "type": [
            "string",
            "null"
          ],
          "description": "Corrected domain only (e.g. `\"gmail.com\"`), present on `GET /api/verify/{uuid}` when a typo was detected.\nOnly the domain is returned (zero-retention policy); the caller already has the local part to combine it with."
        },
        "suggestion": {
          "type": [
            "string",
            "null"
          ],
          "description": "Full corrected address (e.g. `\"user@gmail.com\"`), only ever present on the synchronous submit response where the\nraw email is available in-request.\nAlways absent on `GET /api/verify/{uuid}`, because the submitted address is never stored (zero-retention\npolicy); `suggested_domain` is that path's equivalent."
        }
      }
    }
  }
}