{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/relayger-com/json-schema/relayger-com-email-request-schema.json",
  "title": "EmailRequest",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/relayger-com-email-api-openapi.yml#/components/schemas/EmailRequest",
  "oneOf": [
    {
      "additionalProperties": false,
      "properties": {
        "displayName": {
          "maxLength": 120,
          "minLength": 1,
          "type": "string"
        },
        "email": {
          "maxLength": 254,
          "minLength": 3,
          "pattern": "^[\\x21-\\x7e]+@[^\\s@]+$",
          "type": "string"
        },
        "handle": {
          "pattern": "^[a-z][a-z0-9_-]{1,39}$",
          "type": "string"
        },
        "purpose": {
          "const": "signup",
          "type": "string"
        }
      },
      "required": [
        "purpose",
        "email",
        "handle",
        "displayName"
      ],
      "type": "object"
    },
    {
      "additionalProperties": false,
      "properties": {
        "email": {
          "maxLength": 254,
          "minLength": 3,
          "pattern": "^[\\x21-\\x7e]+@[^\\s@]+$",
          "type": "string"
        },
        "purpose": {
          "enum": [
            "verify",
            "login",
            "recover"
          ],
          "type": "string"
        }
      },
      "required": [
        "purpose",
        "email"
      ],
      "type": "object"
    }
  ]
}