{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/sending-dev/json-schema/sending-dev-journey-schema.json",
  "title": "Journey",
  "x-generated": "2026-11-24",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/sending-dev-openapi.json#/components/schemas/Journey",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "minLength": 1
    },
    "entry": {
      "type": "string",
      "minLength": 1
    },
    "nodes": {
      "type": "array",
      "items": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1
              },
              "type": {
                "type": "string",
                "enum": [
                  "trigger"
                ]
              },
              "event": {
                "type": "string",
                "minLength": 1
              },
              "match": {
                "type": "object",
                "additionalProperties": {
                  "type": "string"
                }
              },
              "filter": {
                "type": "string",
                "minLength": 1
              },
              "note": {
                "type": "string",
                "maxLength": 2000
              },
              "next": {
                "type": [
                  "string",
                  "null"
                ],
                "minLength": 1
              }
            },
            "required": [
              "id",
              "type",
              "event",
              "next"
            ]
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1
              },
              "type": {
                "type": "string",
                "enum": [
                  "message"
                ]
              },
              "preferredChannel": {
                "type": "string",
                "enum": [
                  "email",
                  "whatsapp",
                  "telegram"
                ]
              },
              "fallbackChain": {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "email",
                    "whatsapp",
                    "telegram"
                  ]
                },
                "minItems": 1
              },
              "templateByChannel": {
                "type": "object",
                "properties": {
                  "email": {
                    "type": "string"
                  },
                  "whatsapp": {
                    "type": "string"
                  },
                  "telegram": {
                    "type": "string"
                  }
                }
              },
              "inline": {
                "type": "object",
                "properties": {
                  "subject": {
                    "type": "string",
                    "minLength": 1
                  },
                  "doc": {
                    "type": "object",
                    "properties": {
                      "version": {
                        "type": "number",
                        "enum": [
                          1
                        ]
                      },
                      "settings": {
                        "type": "object",
                        "properties": {
                          "contentWidth": {
                            "type": "integer",
                            "minimum": 320,
                            "maximum": 900,
                            "default": 600
                          },
                          "backgroundColor": {
                            "type": "string",
                            "default": "#FAFAF8"
                          },
                          "canvasColor": {
                            "type": "string",
                            "default": "#ffffff"
                          },
                          "fontFamily": {
                            "type": "string",
                            "default": "Arial, Helvetica, sans-serif"
                          },
                          "textColor": {
                            "type": "string",
                            "default": "#292827"
                          },
                          "linkColor": {
                            "type": "string",
                            "default": "#5B47C9"
                          },
                          "preheader": {
                            "type": "string",
                            "default": ""
                          }
                        }
                      },
                      "blocks": {
                        "type": "array",
                        "items": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "style": {
                                  "type": "object",
                                  "properties": {
                                    "paddingX": {
                                      "type": "integer",
                                      "minimum": 0,
                                      "maximum": 80
                                    },
                                    "paddingY": {
                                      "type": "integer",
                                      "minimum": 0,
                                      "maximum": 80
                                    },
                                    "backgroundColor": {
                                      "type": "string"
                                    },
                                    "align": {
                                      "type": "string",
                                      "enum": [
                                        "left",
                                        "center",
                                        "right"
                                      ]
                                    },
                                    "radius": {
                                      "type": "integer",
                                      "minimum": 0,
                                      "maximum": 40
                                    }
                                  }
                                },
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "text"
                                  ]
                                },
                                "html": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "id",
                                "type",
                                "html"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "style": {
                                  "type": "object",
                                  "properties": {
                                    "paddingX": {
                                      "type": "integer",
                                      "minimum": 0,
                                      "maximum": 80
                                    },
                                    "paddingY": {
                                      "type": "integer",
                                      "minimum": 0,
                                      "maximum": 80
                                    },
                                    "backgroundColor": {
                                      "type": "string"
                                    },
                                    "align": {
                                      "type": "string",
                                      "enum": [
                                        "left",
                                        "center",
                                        "right"
                                      ]
                                    },
                                    "radius": {
                                      "type": "integer",
                                      "minimum": 0,
                                      "maximum": 40
                                    }
                                  }
                                },
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "heading"
                                  ]
                                },
                                "level": {
                                  "anyOf": [
                                    {
                                      "type": "number",
                                      "enum": [
                                        1
                                      ]
                                    },
                                    {
                                      "type": "number",
                                      "enum": [
                                        2
                                      ]
                                    },
                                    {
                                      "type": "number",
                                      "enum": [
                                        3
                                      ]
                                    }
                                  ]
                                },
                                "html": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "id",
                                "type",
                                "level",
                                "html"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "style": {
                                  "type": "object",
                                  "properties": {
                                    "paddingX": {
                                      "type": "integer",
                                      "minimum": 0,
                                      "maximum": 80
                                    },
                                    "paddingY": {
                                      "type": "integer",
                                      "minimum": 0,
                                      "maximum": 80
                                    },
                                    "backgroundColor": {
                                      "type": "string"
                                    },
                                    "align": {
                                      "type": "string",
                                      "enum": [
                                        "left",
                                        "center",
                                        "right"
                                      ]
                                    },
                                    "radius": {
                                      "type": "integer",
                                      "minimum": 0,
                                      "maximum": 40
                                    }
                                  }
                                },
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "image"
                                  ]
                                },
                                "src": {
                                  "type": "string"
                                },
                                "alt": {
                                  "type": "string",
                                  "default": ""
                                },
                                "href": {
                                  "type": "string"
                                },
                                "width": {
                                  "type": "integer",
                                  "exclusiveMinimum": 0
                                },
                                "align": {
                                  "type": "string",
                                  "enum": [
                                    "left",
                                    "center",
                                    "right"
                                  ],
                                  "default": "center"
                                }
                              },
                              "required": [
                                "id",
                                "type",
                                "src"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "style": {
                                  "type": "object",
                                  "properties": {
                                    "paddingX": {
                                      "type": "integer",
                                      "minimum": 0,
                                      "maximum": 80
                                    },
                                    "paddingY": {
                                      "type": "integer",
                                      "minimum": 0,
                                      "maximum": 80
                                    },
                                    "backgroundColor": {
                                      "type": "string"
                                    },
                                    "align": {
                                      "type": "string",
                                      "enum": [
                                        "left",
                                        "center",
                                        "right"
                                      ]
                                    },
                                    "radius": {
                                      "type": "integer",
                                      "minimum": 0,
                                      "maximum": 40
                                    }
                                  }
                                },
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "button"
                                  ]
                                },
                                "text": {
                                  "type": "string"
                                },
                                "href": {
                                  "type": "string"
                                },
                                "bg": {
                                  "type": "string",
                                  "default": "#1B1938"
                                },
                                "color": {
                                  "type": "string",
                                  "default": "#FFFFFF"
                                },
                                "radius": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 40,
                                  "default": 6
                                },
                                "align": {
                                  "type": "string",
                                  "enum": [
                                    "left",
                                    "center",
                                    "right"
                                  ],
                                  "default": "center"
                                },
                                "fullWidth": {
                                  "type": "boolean",
                                  "default": false
                                }
                              },
                              "required": [
                                "id",
                                "type",
                                "text",
                                "href"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "style": {
                                  "type": "object",
                                  "properties": {
                                    "paddingX": {
                                      "type": "integer",
                                      "minimum": 0,
                                      "maximum": 80
                                    },
                                    "paddingY": {
                                      "type": "integer",
                                      "minimum": 0,
                                      "maximum": 80
                                    },
                                    "backgroundColor": {
                                      "type": "string"
                                    },
                                    "align": {
                                      "type": "string",
                                      "enum": [
                                        "left",
                                        "center",
                                        "right"
                                      ]
                                    },
                                    "radius": {
                                      "type": "integer",
                                      "minimum": 0,
                                      "maximum": 40
                                    }
                                  }
                                },
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "divider"
                                  ]
                                },
                                "color": {
                                  "type": "string",
                                  "default": "#e5e7eb"
                                },
                                "thickness": {
                                  "type": "integer",
                                  "minimum": 1,
                                  "maximum": 10,
                                  "default": 1
                                }
                              },
                              "required": [
                                "id",
                                "type"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "style": {
                                  "type": "object",
                                  "properties": {
                                    "paddingX": {
                                      "type": "integer",
                                      "minimum": 0,
                                      "maximum": 80
                                    },
                                    "paddingY": {
                                      "type": "integer",
                                      "minimum": 0,
                                      "maximum": 80
                                    },
                                    "backgroundColor": {
                                      "type": "string"
                                    },
                                    "align": {
                                      "type": "string",
                                      "enum": [
                                        "left",
                                        "center",
                                        "right"
                                      ]
                                    },
                                    "radius": {
                                      "type": "integer",
                                      "minimum": 0,
                                      "maximum": 40
                                    }
                                  }
                                },
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "spacer"
                                  ]
                                },
                                "height": {
                                  "type": "integer",
                                  "minimum": 1,
                                  "maximum": 200,
                                  "default": 24
                                }
                              },
                              "required": [
                                "id",
                                "type"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "style": {
                                  "type": "object",
                                  "properties": {
                                    "paddingX": {
                                      "type": "integer",
                                      "minimum": 0,
                                      "maximum": 80
                                    },
                                    "paddingY": {
                                      "type": "integer",
                                      "minimum": 0,
                                      "maximum": 80
                                    },
                                    "backgroundColor": {
                                      "type": "string"
                                    },
                                    "align": {
                                      "type": "string",
                                      "enum": [
                                        "left",
                                        "center",
                                        "right"
                                      ]
                                    },
                                    "radius": {
                                      "type": "integer",
                                      "minimum": 0,
                                      "maximum": 40
                                    }
                                  }
                                },
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "social"
                                  ]
                                },
                                "links": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "platform": {
                                        "type": "string",
                                        "enum": [
                                          "x",
                                          "facebook",
                                          "instagram",
                                          "linkedin",
                                          "youtube",
                                          "tiktok"
                                        ]
                                      },
                                      "href": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "platform",
                                      "href"
                                    ]
                                  }
                                },
                                "iconStyle": {
                                  "type": "string",
                                  "enum": [
                                    "color",
                                    "mono"
                                  ],
                                  "default": "color"
                                },
                                "align": {
                                  "type": "string",
                                  "enum": [
                                    "left",
                                    "center",
                                    "right"
                                  ],
                                  "default": "center"
                                }
                              },
                              "required": [
                                "id",
                                "type",
                                "links"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "style": {
                                  "type": "object",
                                  "properties": {
                                    "paddingX": {
                                      "type": "integer",
                                      "minimum": 0,
                                      "maximum": 80
                                    },
                                    "paddingY": {
                                      "type": "integer",
                                      "minimum": 0,
                                      "maximum": 80
                                    },
                                    "backgroundColor": {
                                      "type": "string"
                                    },
                                    "align": {
                                      "type": "string",
                                      "enum": [
                                        "left",
                                        "center",
                                        "right"
                                      ]
                                    },
                                    "radius": {
                                      "type": "integer",
                                      "minimum": 0,
                                      "maximum": 40
                                    }
                                  }
                                },
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "html"
                                  ]
                                },
                                "code": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "id",
                                "type",
                                "code"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "style": {
                                  "type": "object",
                                  "properties": {
                                    "paddingX": {
                                      "type": "integer",
                                      "minimum": 0,
                                      "maximum": 80
                                    },
                                    "paddingY": {
                                      "type": "integer",
                                      "minimum": 0,
                                      "maximum": 80
                                    },
                                    "backgroundColor": {
                                      "type": "string"
                                    },
                                    "align": {
                                      "type": "string",
                                      "enum": [
                                        "left",
                                        "center",
                                        "right"
                                      ]
                                    },
                                    "radius": {
                                      "type": "integer",
                                      "minimum": 0,
                                      "maximum": 40
                                    }
                                  }
                                },
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "video"
                                  ]
                                },
                                "href": {
                                  "type": "string"
                                },
                                "thumbnail": {
                                  "type": "string",
                                  "default": ""
                                },
                                "alt": {
                                  "type": "string",
                                  "default": ""
                                },
                                "width": {
                                  "type": "integer",
                                  "exclusiveMinimum": 0
                                },
                                "align": {
                                  "type": "string",
                                  "enum": [
                                    "left",
                                    "center",
                                    "right"
                                  ],
                                  "default": "center"
                                }
                              },
                              "required": [
                                "id",
                                "type",
                                "href"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "style": {
                                  "type": "object",
                                  "properties": {
                                    "paddingX": {
                                      "type": "integer",
                                      "minimum": 0,
                                      "maximum": 80
                                    },
                                    "paddingY": {
                                      "type": "integer",
                                      "minimum": 0,
                                      "maximum": 80
                                    },
                                    "backgroundColor": {
                                      "type": "string"
                                    },
                                    "align": {
                                      "type": "string",
                                      "enum": [
                                        "left",
                                        "center",
                                        "right"
                                      ]
                                    },
                                    "radius": {
                                      "type": "integer",
                                      "minimum": 0,
                                      "maximum": 40
                                    }
                                  }
                                },
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "timer"
                                  ]
                                },
                                "deadline": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "label": {
                                  "type": "string",
                                  "default": ""
                                },
                                "bg": {
                                  "type": "string",
                                  "default": "#1B1938"
                                },
                                "color": {
                                  "type": "string",
                                  "default": "#ffffff"
                                },
                                "align": {
                                  "type": "string",
                                  "enum": [
                                    "left",
                                    "center",
                                    "right"
                                  ],
                                  "default": "center"
                                }
                              },
                              "required": [
                                "id",
                                "type",
                                "deadline"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "style": {
                                  "type": "object",
                                  "properties": {
                                    "paddingX": {
                                      "type": "integer",
                                      "minimum": 0,
                                      "maximum": 80
                                    },
                                    "paddingY": {
                                      "type": "integer",
                                      "minimum": 0,
                                      "maximum": 80
                                    },
                                    "backgroundColor": {
                                      "type": "string"
                                    },
                                    "align": {
                                      "type": "string",
                                      "enum": [
                                        "left",
                                        "center",
                                        "right"
                                      ]
                                    },
                                    "radius": {
                                      "type": "integer",
                                      "minimum": 0,
                                      "maximum": 40
                                    }
                                  }
                                },
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "products"
                                  ]
                                },
                                "layout": {
                                  "type": "string",
                                  "enum": [
                                    "grid2",
                                    "grid3",
                                    "list"
                                  ],
                                  "default": "grid2"
                                },
                                "items": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "productId": {
                                        "type": "string"
                                      },
                                      "title": {
                                        "type": "string"
                                      },
                                      "imageUrl": {
                                        "type": "string",
                                        "default": ""
                                      },
                                      "price": {
                                        "type": "string",
                                        "default": ""
                                      },
                                      "url": {
                                        "type": "string",
                                        "default": ""
                                      }
                                    },
                                    "required": [
                                      "title"
                                    ]
                                  },
                                  "default": []
                                },
                                "showPrice": {
                                  "type": "boolean",
                                  "default": true
                                },
                                "buttonText": {
                                  "type": "string",
                                  "default": "Vedi prodotto"
                                },
                                "buttonBg": {
                                  "type": "string",
                                  "default": "#1B1938"
                                },
                                "buttonColor": {
                                  "type": "string",
                                  "default": "#FFFFFF"
                                }
                              },
                              "required": [
                                "id",
                                "type"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "style": {
                                  "type": "object",
                                  "properties": {
                                    "paddingX": {
                                      "type": "integer",
                                      "minimum": 0,
                                      "maximum": 80
                                    },
                                    "paddingY": {
                                      "type": "integer",
                                      "minimum": 0,
                                      "maximum": 80
                                    },
                                    "backgroundColor": {
                                      "type": "string"
                                    },
                                    "align": {
                                      "type": "string",
                                      "enum": [
                                        "left",
                                        "center",
                                        "right"
                                      ]
                                    },
                                    "radius": {
                                      "type": "integer",
                                      "minimum": 0,
                                      "maximum": 40
                                    }
                                  }
                                },
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "cart"
                                  ]
                                },
                                "title": {
                                  "type": "string",
                                  "default": "Il tuo carrello ti aspetta"
                                },
                                "showImages": {
                                  "type": "boolean",
                                  "default": true
                                },
                                "showPrices": {
                                  "type": "boolean",
                                  "default": true
                                },
                                "buttonText": {
                                  "type": "string",
                                  "default": "Completa l'ordine"
                                },
                                "buttonBg": {
                                  "type": "string",
                                  "default": "#1B1938"
                                },
                                "buttonColor": {
                                  "type": "string",
                                  "default": "#FFFFFF"
                                }
                              },
                              "required": [
                                "id",
                                "type"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "style": {
                                  "type": "object",
                                  "properties": {
                                    "paddingX": {
                                      "type": "integer",
                                      "minimum": 0,
                                      "maximum": 80
                                    },
                                    "paddingY": {
                                      "type": "integer",
                                      "minimum": 0,
                                      "maximum": 80
                                    },
                                    "backgroundColor": {
                                      "type": "string"
                                    },
                                    "align": {
                                      "type": "string",
                                      "enum": [
                                        "left",
                                        "center",
                                        "right"
                                      ]
                                    },
                                    "radius": {
                                      "type": "integer",
                                      "minimum": 0,
                                      "maximum": 40
                                    }
                                  }
                                },
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "columns"
                                  ]
                                },
                                "columns": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "width": {
                                        "type": "number",
                                        "minimum": 1,
                                        "maximum": 100
                                      },
                                      "blocks": {
                                        "type": "array",
                                        "items": {
                                          "oneOf": [
                                            {
                                              "type": "object",
                                              "properties": {
                                                "id": {
                                                  "type": "string",
                                                  "minLength": 1
                                                },
                                                "style": {
                                                  "type": "object",
                                                  "properties": {
                                                    "paddingX": {
                                                      "type": "integer",
                                                      "minimum": 0,
                                                      "maximum": 80
                                                    },
                                                    "paddingY": {
                                                      "type": "integer",
                                                      "minimum": 0,
                                                      "maximum": 80
                                                    },
                                                    "backgroundColor": {
                                                      "type": "string"
                                                    },
                                                    "align": {
                                                      "type": "string",
                                                      "enum": [
                                                        "left",
                                                        "center",
                                                        "right"
                                                      ]
                                                    },
                                                    "radius": {
                                                      "type": "integer",
                                                      "minimum": 0,
                                                      "maximum": 40
                                                    }
                                                  }
                                                },
                                                "type": {
                                                  "type": "string",
                                                  "enum": [
                                                    "text"
                                                  ]
                                                },
                                                "html": {
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "id",
                                                "type",
                                                "html"
                                              ]
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "id": {
                                                  "type": "string",
                                                  "minLength": 1
                                                },
                                                "style": {
                                                  "type": "object",
                                                  "properties": {
                                                    "paddingX": {
                                                      "type": "integer",
                                                      "minimum": 0,
                                                      "maximum": 80
                                                    },
                                                    "paddingY": {
                                                      "type": "integer",
                                                      "minimum": 0,
                                                      "maximum": 80
                                                    },
                                                    "backgroundColor": {
                                                      "type": "string"
                                                    },
                                                    "align": {
                                                      "type": "string",
                                                      "enum": [
                                                        "left",
                                                        "center",
                                                        "right"
                                                      ]
                                                    },
                                                    "radius": {
                                                      "type": "integer",
                                                      "minimum": 0,
                                                      "maximum": 40
                                                    }
                                                  }
                                                },
                                                "type": {
                                                  "type": "string",
                                                  "enum": [
                                                    "heading"
                                                  ]
                                                },
                                                "level": {
                                                  "anyOf": [
                                                    {
                                                      "type": "number",
                                                      "enum": [
                                                        1
                                                      ]
                                                    },
                                                    {
                                                      "type": "number",
                                                      "enum": [
                                                        2
                                                      ]
                                                    },
                                                    {
                                                      "type": "number",
                                                      "enum": [
                                                        3
                                                      ]
                                                    }
                                                  ]
                                                },
                                                "html": {
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "id",
                                                "type",
                                                "level",
                                                "html"
                                              ]
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "id": {
                                                  "type": "string",
                                                  "minLength": 1
                                                },
                                                "style": {
                                                  "type": "object",
                                                  "properties": {
                                                    "paddingX": {
                                                      "type": "integer",
                                                      "minimum": 0,
                                                      "maximum": 80
                                                    },
                                                    "paddingY": {
                                                      "type": "integer",
                                                      "minimum": 0,
                                                      "maximum": 80
                                                    },
                                                    "backgroundColor": {
                                                      "type": "string"
                                                    },
                                                    "align": {
                                                      "type": "string",
                                                      "enum": [
                                                        "left",
                                                        "center",
                                                        "right"
                                                      ]
                                                    },
                                                    "radius": {
                                                      "type": "integer",
                                                      "minimum": 0,
                                                      "maximum": 40
                                                    }
                                                  }
                                                },
                                                "type": {
                                                  "type": "string",
                                                  "enum": [
                                                    "image"
                                                  ]
                                                },
                                                "src": {
                                                  "type": "string"
                                                },
                                                "alt": {
                                                  "type": "string",
                                                  "default": ""
                                                },
                                                "href": {
                                                  "type": "string"
                                                },
                                                "width": {
                                                  "type": "integer",
                                                  "exclusiveMinimum": 0
                                                },
                                                "align": {
                                                  "type": "string",
                                                  "enum": [
                                                    "left",
                                                    "center",
                                                    "right"
                                                  ],
                                                  "default": "center"
                                                }
                                              },
                                              "required": [
                                                "id",
                                                "type",
                                                "src"
                                              ]
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "id": {
                                                  "type": "string",
                                                  "minLength": 1
                                                },
                                                "style": {
                                                  "type": "object",
                                                  "properties": {
                                                    "paddingX": {
                                                      "type": "integer",
                                                      "minimum": 0,
                                                      "maximum": 80
                                                    },
                                                    "paddingY": {
                                                      "type": "integer",
                                                      "minimum": 0,
                                                      "maximum": 80
                                                    },
                                                    "backgroundColor": {
                                                      "type": "string"
                                                    },
                                                    "align": {
                                                      "type": "string",
                                                      "enum": [
                                                        "left",
                                                        "center",
                                                        "right"
                                                      ]
                                                    },
                                                    "radius": {
                                                      "type": "integer",
                                                      "minimum": 0,
                                                      "maximum": 40
                                                    }
                                                  }
                                                },
                                                "type": {
                                                  "type": "string",
                                                  "enum": [
                                                    "button"
                                                  ]
                                                },
                                                "text": {
                                                  "type": "string"
                                                },
                                                "href": {
                                                  "type": "string"
                                                },
                                                "bg": {
                                                  "type": "string",
                                                  "default": "#1B1938"
                                                },
                                                "color": {
                                                  "type": "string",
                                                  "default": "#FFFFFF"
                                                },
                                                "radius": {
                                                  "type": "integer",
                                                  "minimum": 0,
                                                  "maximum": 40,
                                                  "default": 6
                                                },
                                                "align": {
                                                  "type": "string",
                                                  "enum": [
                                                    "left",
                                                    "center",
                                                    "right"
                                                  ],
                                                  "default": "center"
                                                },
                                                "fullWidth": {
                                                  "type": "boolean",
                                                  "default": false
                                                }
                                              },
                                              "required": [
                                                "id",
                                                "type",
                                                "text",
                                                "href"
                                              ]
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "id": {
                                                  "type": "string",
                                                  "minLength": 1
                                                },
                                                "style": {
                                                  "type": "object",
                                                  "properties": {
                                                    "paddingX": {
                                                      "type": "integer",
                                                      "minimum": 0,
                                                      "maximum": 80
                                                    },
                                                    "paddingY": {
                                                      "type": "integer",
                                                      "minimum": 0,
                                                      "maximum": 80
                                                    },
                                                    "backgroundColor": {
                                                      "type": "string"
                                                    },
                                                    "align": {
                                                      "type": "string",
                                                      "enum": [
                                                        "left",
                                                        "center",
                                                        "right"
                                                      ]
                                                    },
                                                    "radius": {
                                                      "type": "integer",
                                                      "minimum": 0,
                                                      "maximum": 40
                                                    }
                                                  }
                                                },
                                                "type": {
                                                  "type": "string",
                                                  "enum": [
                                                    "divider"
                                                  ]
                                                },
                                                "color": {
                                                  "type": "string",
                                                  "default": "#e5e7eb"
                                                },
                                                "thickness": {
                                                  "type": "integer",
                                                  "minimum": 1,
                                                  "maximum": 10,
                                                  "default": 1
                                                }
                                              },
                                              "required": [
                                                "id",
                                                "type"
                                              ]
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "id": {
                                                  "type": "string",
                                                  "minLength": 1
                                                },
                                                "style": {
                                                  "type": "object",
                                                  "properties": {
                                                    "paddingX": {
                                                      "type": "integer",
                                                      "minimum": 0,
                                                      "maximum": 80
                                                    },
                                                    "paddingY": {
                                                      "type": "integer",
                                                      "minimum": 0,
                                                      "maximum": 80
                                                    },
                                                    "backgroundColor": {
                                                      "type": "string"
                                                    },
                                                    "align": {
                                                      "type": "string",
                                                      "enum": [
                                                        "left",
                                                        "center",
                                                        "right"
                                                      ]
                                                    },
                                                    "radius": {
                                                      "type": "integer",
                                                      "minimum": 0,
                                                      "maximum": 40
                                                    }
                                                  }
                                                },
                                                "type": {
                                                  "type": "string",
                                                  "enum": [
                                                    "spacer"
                                                  ]
                                                },
                                                "height": {
                                                  "type": "integer",
                                                  "minimum": 1,
                                                  "maximum": 200,
                                                  "default": 24
                                                }
                                              },
                                              "required": [
                                                "id",
                                                "type"
                                              ]
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "id": {
                                                  "type": "string",
                                                  "minLength": 1
                                                },
                                                "style": {
                                                  "type": "object",
                                                  "properties": {
                                                    "paddingX": {
                                                      "type": "integer",
                                                      "minimum": 0,
                                                      "maximum": 80
                                                    },
                                                    "paddingY": {
                                                      "type": "integer",
                                                      "minimum": 0,
                                                      "maximum": 80
                                                    },
                                                    "backgroundColor": {
                                                      "type": "string"
                                                    },
                                                    "align": {
                                                      "type": "string",
                                                      "enum": [
                                                        "left",
                                                        "center",
                                                        "right"
                                                      ]
                                                    },
                                                    "radius": {
                                                      "type": "integer",
                                                      "minimum": 0,
                                                      "maximum": 40
                                                    }
                                                  }
                                                },
                                                "type": {
                                                  "type": "string",
                                                  "enum": [
                                                    "social"
                                                  ]
                                                },
                                                "links": {
                                                  "type": "array",
                                                  "items": {
                                                    "type": "object",
                                                    "properties": {
                                                      "platform": {
                                                        "type": "string",
                                                        "enum": [
                                                          "x",
                                                          "facebook",
                                                          "instagram",
                                                          "linkedin",
                                                          "youtube",
                                                          "tiktok"
                                                        ]
                                                      },
                                                      "href": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "platform",
                                                      "href"
                                                    ]
                                                  }
                                                },
                                                "iconStyle": {
                                                  "type": "string",
                                                  "enum": [
                                                    "color",
                                                    "mono"
                                                  ],
                                                  "default": "color"
                                                },
                                                "align": {
                                                  "type": "string",
                                                  "enum": [
                                                    "left",
                                                    "center",
                                                    "right"
                                                  ],
                                                  "default": "center"
                                                }
                                              },
                                              "required": [
                                                "id",
                                                "type",
                                                "links"
                                              ]
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "id": {
                                                  "type": "string",
                                                  "minLength": 1
                                                },
                                                "style": {
                                                  "type": "object",
                                                  "properties": {
                                                    "paddingX": {
                                                      "type": "integer",
                                                      "minimum": 0,
                                                      "maximum": 80
                                                    },
                                                    "paddingY": {
                                                      "type": "integer",
                                                      "minimum": 0,
                                                      "maximum": 80
                                                    },
                                                    "backgroundColor": {
                                                      "type": "string"
                                                    },
                                                    "align": {
                                                      "type": "string",
                                                      "enum": [
                                                        "left",
                                                        "center",
                                                        "right"
                                                      ]
                                                    },
                                                    "radius": {
                                                      "type": "integer",
                                                      "minimum": 0,
                                                      "maximum": 40
                                                    }
                                                  }
                                                },
                                                "type": {
                                                  "type": "string",
                                                  "enum": [
                                                    "html"
                                                  ]
                                                },
                                                "code": {
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "id",
                                                "type",
                                                "code"
                                              ]
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "id": {
                                                  "type": "string",
                                                  "minLength": 1
                                                },
                                                "style": {
                                                  "type": "object",
                                                  "properties": {
                                                    "paddingX": {
                                                      "type": "integer",
                                                      "minimum": 0,
                                                      "maximum": 80
                                                    },
                                                    "paddingY": {
                                                      "type": "integer",
                                                      "minimum": 0,
                                                      "maximum": 80
                                                    },
                                                    "backgroundColor": {
                                                      "type": "string"
                                                    },
                                                    "align": {
                                                      "type": "string",
                                                      "enum": [
                                                        "left",
                                                        "center",
                                                        "right"
                                                      ]
                                                    },
                                                    "radius": {
                                                      "type": "integer",
                                                      "minimum": 0,
                                                      "maximum": 40
                                                    }
                                                  }
                                                },
                                                "type": {
                                                  "type": "string",
                                                  "enum": [
                                                    "video"
                                                  ]
                                                },
                                                "href": {
                                                  "type": "string"
                                                },
                                                "thumbnail": {
                                                  "type": "string",
                                                  "default": ""
                                                },
                                                "alt": {
                                                  "type": "string",
                                                  "default": ""
                                                },
                                                "width": {
                                                  "type": "integer",
                                                  "exclusiveMinimum": 0
                                                },
                                                "align": {
                                                  "type": "string",
                                                  "enum": [
                                                    "left",
                                                    "center",
                                                    "right"
                                                  ],
                                                  "default": "center"
                                                }
                                              },
                                              "required": [
                                                "id",
                                                "type",
                                                "href"
                                              ]
                                            }
                                          ]
                                        }
                                      }
                                    },
                                    "required": [
                                      "width",
                                      "blocks"
                                    ]
                                  },
                                  "minItems": 2,
                                  "maxItems": 3
                                }
                              },
                              "required": [
                                "id",
                                "type",
                                "columns"
                              ]
                            }
                          ]
                        }
                      }
                    },
                    "required": [
                      "version",
                      "settings",
                      "blocks"
                    ]
                  }
                },
                "required": [
                  "subject",
                  "doc"
                ]
              },
              "attachmentIds": {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uuid"
                },
                "maxItems": 20
              },
              "ai": {
                "type": "object",
                "properties": {
                  "model": {
                    "type": "string",
                    "minLength": 1
                  },
                  "prompt": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 4000
                  },
                  "mode": {
                    "type": "string",
                    "enum": [
                      "section",
                      "full"
                    ]
                  }
                },
                "required": [
                  "model",
                  "prompt",
                  "mode"
                ]
              },
              "filter": {
                "type": "string",
                "minLength": 1
              },
              "note": {
                "type": "string",
                "maxLength": 2000
              },
              "next": {
                "type": [
                  "string",
                  "null"
                ],
                "minLength": 1
              }
            },
            "required": [
              "id",
              "type",
              "preferredChannel",
              "fallbackChain",
              "templateByChannel",
              "next"
            ]
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1
              },
              "type": {
                "type": "string",
                "enum": [
                  "notify"
                ]
              },
              "to": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "minItems": 1,
                "maxItems": 10
              },
              "subject": {
                "type": "string",
                "minLength": 1,
                "maxLength": 200
              },
              "body": {
                "type": "string",
                "minLength": 1,
                "maxLength": 10000
              },
              "note": {
                "type": "string",
                "maxLength": 2000
              },
              "next": {
                "type": [
                  "string",
                  "null"
                ],
                "minLength": 1
              }
            },
            "required": [
              "id",
              "type",
              "to",
              "subject",
              "body",
              "next"
            ]
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1
              },
              "type": {
                "type": "string",
                "enum": [
                  "wait"
                ]
              },
              "duration": {
                "type": "string",
                "minLength": 2
              },
              "until": {
                "type": "string",
                "format": "date-time"
              },
              "untilCondition": {
                "type": "string",
                "minLength": 1
              },
              "checkTimeout": {
                "type": "string",
                "minLength": 2
              },
              "note": {
                "type": "string",
                "maxLength": 2000
              },
              "next": {
                "type": [
                  "string",
                  "null"
                ],
                "minLength": 1
              }
            },
            "required": [
              "id",
              "type",
              "next"
            ]
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1
              },
              "type": {
                "type": "string",
                "enum": [
                  "wait_for_event"
                ]
              },
              "event": {
                "type": "string",
                "minLength": 1
              },
              "match": {
                "type": "object",
                "additionalProperties": {
                  "type": "string"
                }
              },
              "timeout": {
                "type": "string",
                "minLength": 2
              },
              "note": {
                "type": "string",
                "maxLength": 2000
              },
              "onEvent": {
                "type": [
                  "string",
                  "null"
                ],
                "minLength": 1
              },
              "onTimeout": {
                "type": [
                  "string",
                  "null"
                ],
                "minLength": 1
              }
            },
            "required": [
              "id",
              "type",
              "event",
              "timeout",
              "onEvent",
              "onTimeout"
            ]
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1
              },
              "type": {
                "type": "string",
                "enum": [
                  "branch"
                ]
              },
              "condition": {
                "type": "string",
                "minLength": 1
              },
              "label": {
                "type": "string",
                "maxLength": 400
              },
              "note": {
                "type": "string",
                "maxLength": 2000
              },
              "onTrue": {
                "type": [
                  "string",
                  "null"
                ],
                "minLength": 1
              },
              "onFalse": {
                "type": [
                  "string",
                  "null"
                ],
                "minLength": 1
              }
            },
            "required": [
              "id",
              "type",
              "condition",
              "onTrue",
              "onFalse"
            ]
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1
              },
              "type": {
                "type": "string",
                "enum": [
                  "split"
                ]
              },
              "weights": {
                "type": "array",
                "items": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 100
                },
                "minItems": 2,
                "maxItems": 4
              },
              "paths": {
                "type": "array",
                "items": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "minLength": 1
                },
                "minItems": 2,
                "maxItems": 4
              },
              "note": {
                "type": "string",
                "maxLength": 2000
              }
            },
            "required": [
              "id",
              "type",
              "weights",
              "paths"
            ]
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1
              },
              "type": {
                "type": "string",
                "enum": [
                  "goto"
                ]
              },
              "target": {
                "type": "string",
                "minLength": 1
              },
              "note": {
                "type": "string",
                "maxLength": 2000
              }
            },
            "required": [
              "id",
              "type",
              "target"
            ]
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1
              },
              "type": {
                "type": "string",
                "enum": [
                  "webhook"
                ]
              },
              "url": {
                "type": "string",
                "format": "uri"
              },
              "method": {
                "type": "string",
                "enum": [
                  "POST",
                  "GET",
                  "PUT"
                ]
              },
              "headers": {
                "type": "object",
                "additionalProperties": {
                  "type": "string"
                }
              },
              "bodyTemplate": {
                "type": "string"
              },
              "next": {
                "type": [
                  "string",
                  "null"
                ],
                "minLength": 1
              }
            },
            "required": [
              "id",
              "type",
              "url",
              "method",
              "next"
            ]
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1
              },
              "type": {
                "type": "string",
                "enum": [
                  "add_tag"
                ]
              },
              "tagIds": {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uuid"
                },
                "minItems": 1,
                "maxItems": 20
              },
              "note": {
                "type": "string",
                "maxLength": 2000
              },
              "next": {
                "type": [
                  "string",
                  "null"
                ],
                "minLength": 1
              }
            },
            "required": [
              "id",
              "type",
              "tagIds",
              "next"
            ]
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1
              },
              "type": {
                "type": "string",
                "enum": [
                  "remove_tag"
                ]
              },
              "tagIds": {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uuid"
                },
                "minItems": 1,
                "maxItems": 20
              },
              "note": {
                "type": "string",
                "maxLength": 2000
              },
              "next": {
                "type": [
                  "string",
                  "null"
                ],
                "minLength": 1
              }
            },
            "required": [
              "id",
              "type",
              "tagIds",
              "next"
            ]
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1
              },
              "type": {
                "type": "string",
                "enum": [
                  "subscribe"
                ]
              },
              "listIds": {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uuid"
                },
                "minItems": 1,
                "maxItems": 20
              },
              "note": {
                "type": "string",
                "maxLength": 2000
              },
              "next": {
                "type": [
                  "string",
                  "null"
                ],
                "minLength": 1
              }
            },
            "required": [
              "id",
              "type",
              "listIds",
              "next"
            ]
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1
              },
              "type": {
                "type": "string",
                "enum": [
                  "unsubscribe"
                ]
              },
              "listIds": {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uuid"
                },
                "minItems": 1,
                "maxItems": 20
              },
              "note": {
                "type": "string",
                "maxLength": 2000
              },
              "next": {
                "type": [
                  "string",
                  "null"
                ],
                "minLength": 1
              }
            },
            "required": [
              "id",
              "type",
              "listIds",
              "next"
            ]
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1
              },
              "type": {
                "type": "string",
                "enum": [
                  "update_contact"
                ]
              },
              "updates": {
                "type": "object",
                "additionalProperties": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "maxLength": 1000
                }
              },
              "note": {
                "type": "string",
                "maxLength": 2000
              },
              "next": {
                "type": [
                  "string",
                  "null"
                ],
                "minLength": 1
              }
            },
            "required": [
              "id",
              "type",
              "updates",
              "next"
            ]
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1
              },
              "type": {
                "type": "string",
                "enum": [
                  "add_note"
                ]
              },
              "text": {
                "type": "string",
                "minLength": 1,
                "maxLength": 4000
              },
              "note": {
                "type": "string",
                "maxLength": 2000
              },
              "next": {
                "type": [
                  "string",
                  "null"
                ],
                "minLength": 1
              }
            },
            "required": [
              "id",
              "type",
              "text",
              "next"
            ]
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1
              },
              "type": {
                "type": "string",
                "enum": [
                  "score"
                ]
              },
              "op": {
                "type": "string",
                "enum": [
                  "add",
                  "subtract",
                  "set"
                ]
              },
              "points": {
                "type": "integer",
                "minimum": -100000,
                "maximum": 100000
              },
              "field": {
                "type": "string",
                "minLength": 1,
                "maxLength": 64,
                "default": "score"
              },
              "note": {
                "type": "string",
                "maxLength": 2000
              },
              "next": {
                "type": [
                  "string",
                  "null"
                ],
                "minLength": 1
              }
            },
            "required": [
              "id",
              "type",
              "op",
              "points",
              "next"
            ]
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1
              },
              "type": {
                "type": "string",
                "enum": [
                  "conversion"
                ]
              },
              "name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 120
              },
              "valueCents": {
                "type": "integer",
                "minimum": 0,
                "maximum": 100000000
              },
              "currency": {
                "type": "string",
                "minLength": 3,
                "maxLength": 3
              },
              "note": {
                "type": "string",
                "maxLength": 2000
              },
              "next": {
                "type": [
                  "string",
                  "null"
                ],
                "minLength": 1
              }
            },
            "required": [
              "id",
              "type",
              "name",
              "next"
            ]
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1
              },
              "type": {
                "type": "string",
                "enum": [
                  "start_automation"
                ]
              },
              "automationId": {
                "type": "string",
                "format": "uuid"
              },
              "note": {
                "type": "string",
                "maxLength": 2000
              },
              "next": {
                "type": [
                  "string",
                  "null"
                ],
                "minLength": 1
              }
            },
            "required": [
              "id",
              "type",
              "automationId",
              "next"
            ]
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1
              },
              "type": {
                "type": "string",
                "enum": [
                  "end_automation"
                ]
              },
              "automationId": {
                "type": "string",
                "format": "uuid"
              },
              "note": {
                "type": "string",
                "maxLength": 2000
              },
              "next": {
                "type": [
                  "string",
                  "null"
                ],
                "minLength": 1
              }
            },
            "required": [
              "id",
              "type",
              "automationId",
              "next"
            ]
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1
              },
              "type": {
                "type": "string",
                "enum": [
                  "goal"
                ]
              },
              "event": {
                "type": "string",
                "minLength": 1
              },
              "note": {
                "type": "string",
                "maxLength": 2000
              }
            },
            "required": [
              "id",
              "type",
              "event"
            ]
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1
              },
              "type": {
                "type": "string",
                "enum": [
                  "exit"
                ]
              },
              "reason": {
                "type": "string"
              },
              "note": {
                "type": "string",
                "maxLength": 2000
              }
            },
            "required": [
              "id",
              "type"
            ]
          }
        ]
      },
      "minItems": 1
    },
    "flowFilter": {
      "type": "string",
      "minLength": 1
    }
  },
  "required": [
    "name",
    "entry",
    "nodes"
  ]
}