{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/romm/json-schema/romm-email-channel-create-payload-schema.json",
  "title": "EmailChannelCreatePayload",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/romm-notification-channels-api-openapi.yml#/components/schemas/EmailChannelCreatePayload",
  "properties": {
    "min_level": {
      "$ref": "#/$defs/NotificationChannelMinLevel",
      "default": "info"
    },
    "topics": {
      "anyOf": [
        {
          "items": {
            "$ref": "#/$defs/NotificationTopic"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Topics"
    },
    "type": {
      "type": "string",
      "const": "email",
      "title": "Type"
    },
    "name": {
      "type": "string",
      "maxLength": 100,
      "minLength": 1,
      "title": "Name"
    },
    "address": {
      "type": "string",
      "maxLength": 320,
      "title": "Address"
    }
  },
  "type": "object",
  "required": [
    "type",
    "name",
    "address"
  ],
  "$defs": {
    "NotificationChannelMinLevel": {
      "type": "string",
      "enum": [
        "info",
        "warning",
        "error"
      ],
      "title": "NotificationChannelMinLevel",
      "description": "The least severe notification a channel forwards; success ranks as info."
    },
    "NotificationTopic": {
      "type": "string",
      "enum": [
        "scans",
        "tasks",
        "streaming",
        "devices",
        "account",
        "custom"
      ],
      "title": "NotificationTopic",
      "description": "The groups a notification channel picks what it forwards by."
    }
  }
}