Input schema (truncated preview — do not copy)
{
"type": "object",
"required": [
"doc",
"id",
"version"
],
"properties": {
"id": {
"type": "string"
},
"doc": {
"type": "object",
"required": [
"nodes",
"start",
"triggers",
"v"
],
"properties": {
"v": {
"type": "integer",
"const": 1
},
"nodes": {
"type": "object",
"additionalProperties": {
"type": "object",
"required": [
"type"
],
"properties": {
"all": {
"type": "array",
"items": {
"type": "object",
"required": [
"field",
"op"
],
"properties": {
"op": {
"enum": [
"eq",
"ne",
"gt",
"lt",
"has",
"not_has",
"contains"
],
"type": "string"
},
"key": {
"type": "string"
},
"field": {
"enum": [
"tag",
"follows_us",
"we_follow",
"follower_count",
"verified",
"window_open",
"opted_in",
"last_interaction_hours",
"field",
"intent",
"sentiment",
"text"
],
"type": "string"
},
"value": {}
}
}
},
"else": {
"type": [
"string",
"null"
],
"description": "Id of the next node, or null to stop."
},
"flow": {
"type": "string"
},
"mode": {
"enum": [
"window",
"private_reply",
"public_reply"
],
"type": "string",
"description": "send: window = inside the 24-hour window, private_reply = one DM to a commenter, public_reply = comment under the post."
},
"next": {
"type": [
"string",
"null"
],
"description": "Id of the next node, or null to stop."
},
"then": {
"type": [
"string",
"null"
],
"description": "Id of the next node, or null to stop."
},
"type": {
"enum": [
"send",
"condition",
"action",
"delay",
"random",
"goto",
"ai"
],
"type": "string"
},
"items": {
"type": "array",
"items": {
"type": "object",
"required": [
"type"
],
"properties": {
"key": {
"type": "string"
},
"tag": {
"type": "string"
},
"type": {
"enum": [
"add_tag",
"remove_tag",
"set_field",
"clear_field",
"opt_in",
"opt_out",
"open_conversation",
"close_conversation",
"assign",
"hide_reply",
"approve_reply"
],
"type": "string"
},
"value": {
"type": "string"
},
"userId": {
"type": "string"
}
}
}
},
"blocks": {
"type": "array",
"items": {
"type": "object",
"required": [
"type"
],
"properties": {
"url": {
"type": "string"
},
"text": {
"type": "string"
},
"type": {
"enum": [
"text",
"image",
"video",
"audio",
"file",
"delay",
"card",
"gallery"
],
"type": "string"
},
"cards": {
"type": "array",
"items": {
"type": "object"
}
},
"title": {
"type": "string"
},
"buttons": {
"type": "array",
"items": {
"type": "object",
"required": [
"id",
"kind",
"title"
],
"properties": {
"id": {
"type": "string"
},
"url": {
"type": "string"
},
"kind": {
"enum": [
"postback",
"url"
],
"type": "string"
},
"next": {
"type": [
"string",
"null"
],
"description": "Id of the next node, or null to stop."
},
"title": {
"type": "string",
"description": "At most 20 characters."
}
}
}
},
"mediaId": {
"type": "string"
},
"seconds": {
"type": "number"
},
"imageUrl": {
"type": "string"
},
"subtitle": {
"type": "string"
}
}
}
},
"buttons": {
"type": "array",
"items": {
"type": "object",
"required": [
"id",
"kind",
"title"
],
"properties": {
"id": {
"type": "string"
},
"url": {
"type": "string"
},
"kind": {
"enum": [
"postback",
"url"
],
"type": "string"
},
"next": {
"type": [
"string",
"null"
],
"description": "Id of the next node, or null to stop."
},
"title": {
"type": "string",
"description": "At most 20 characters."
}
}
},
"maxItems": 3
},
"seconds": {
"type": "number"
},
"branches": {
"type": "array",
"items": {
"type": "object",
"required": [
"weight"
],
"properties": {
"next": {
"type": [
"string",
"null"
],
"description": "Id of the next node, or null to stop."
},
"weight": {
"type": "number"
}
}
}
},
"escalate": {
"type": [
"string",
"null"
],
"description": "Id of the next node, or null to stop."
},
"maxTurns": {
"type": "integer"
},
"usePersona": {
"type": "boolean"
},
"instruction": {
"type": "string"
},
"quickReplies": {
"type": "array",
"items": {
"type": "object",
"required": [
"id",
"title"
],
"properties": {
"id": {
"type": "string"
},
"next": {
"type": [
"string",
"null"
],
"description": "Id of the next node, or null to stop."
},
"title": {
"type": "string"
}
}
},
"maxItems": 13
}
}
}
},
"start": {
"type": [
"string",
"null"
]
},
"layout": {
"type": "object",
"additionalProperties": {
"type": "object",
"properties": {
"x": {
"type": "number"
},
"y": {
"type": "number"
}
}
}
},
"template": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"params": {
"type": "object"
}
}
},
"triggers": {
"type": "array",
"items": {
"type": "object",
"required": [
"kind"
],
"properties": {
"at": {
"type": "string"
},
"ref": {
"type": "string"
},
"tag": {
"type": "string"
},
"kind": {
"enum": [
"comment",
"live_comment",
"message",
"story_reply",
"story_mention",
"referral",
… [server-provided details truncated]