{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/agentisend-com/json-schema/agentisend-com-post-templates-by-id-publish-reply-schema.json",
  "title": "PostTemplatesBy_idPublishReply",
  "x-generated": "2026-10-30",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/agentisend-com-openapi.json#/components/schemas/PostTemplatesBy_idPublishReply",
  "properties": {
    "id": {
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
      "type": "string"
    },
    "object": {
      "const": "template",
      "type": "string"
    },
    "template": {
      "properties": {
        "alias": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "created_at": {
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
          "type": "string"
        },
        "current_version_id": {
          "anyOf": [
            {
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "current_version_number": {
          "anyOf": [
            {
              "maximum": 9007199254740991,
              "minimum": -9007199254740991,
              "type": "integer"
            },
            {
              "type": "null"
            }
          ]
        },
        "draft_content": {
          "anyOf": [
            {
              "anyOf": [
                {
                  "properties": {
                    "blocks": {
                      "description": "Blocks, in order. At least one.",
                      "items": {
                        "anyOf": [
                          {
                            "properties": {
                              "body": {
                                "description": "The block text. Placeholders use {{name}}.",
                                "type": "string"
                              },
                              "kind": {
                                "const": "text",
                                "description": "A text block.",
                                "type": "string"
                              }
                            },
                            "required": [
                              "kind",
                              "body"
                            ],
                            "type": "object"
                          },
                          {
                            "properties": {
                              "html": {
                                "description": "HTML for this block.",
                                "type": "string"
                              },
                              "kind": {
                                "const": "raw",
                                "description": "HTML inserted as written.",
                                "type": "string"
                              }
                            },
                            "required": [
                              "kind",
                              "html"
                            ],
                            "type": "object"
                          }
                        ]
                      },
                      "minItems": 1,
                      "type": "array"
                    },
                    "mode": {
                      "const": "block",
                      "description": "block, markdown or html.",
                      "type": "string"
                    }
                  },
                  "required": [
                    "mode",
                    "blocks"
                  ],
                  "type": "object"
                },
                {
                  "properties": {
                    "mode": {
                      "description": "markdown or html.",
                      "enum": [
                        "markdown",
                        "html"
                      ],
                      "type": "string"
                    },
                    "source": {
                      "description": "The template source. At most 512 KB when writing.",
                      "minLength": 1,
                      "type": "string"
                    }
                  },
                  "required": [
                    "mode",
                    "source"
                  ],
                  "type": "object"
                }
              ]
            },
            {
              "type": "null"
            }
          ]
        },
        "draft_subject": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "draft_variables": {
          "anyOf": [
            {
              "items": {
                "properties": {
                  "default": {
                    "description": "Used when the render call omits this name.",
                    "type": "string"
                  },
                  "name": {
                    "description": "Placeholder name, without the braces.",
                    "minLength": 1,
                    "type": "string"
                  },
                  "required": {
                    "description": "A missing required value fails the render, unless preview is true.",
                    "type": "boolean"
                  },
                  "type": {
                    "description": "string, number or boolean.",
                    "enum": [
                      "string",
                      "number",
                      "boolean"
                    ],
                    "type": "string"
                  }
                },
                "required": [
                  "name",
                  "type"
                ],
                "type": "object"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ]
        },
        "from": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "has_unpublished_versions": {
          "type": "boolean"
        },
        "html": {
          "type": "string"
        },
        "id": {
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "object": {
          "const": "template",
          "type": "string"
        },
        "published_at": {
          "anyOf": [
            {
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "reply_to": {
          "anyOf": [
            {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ]
        },
        "status": {
          "enum": [
            "draft",
            "published"
          ],
          "type": "string"
        },
        "subject": {
          "type": "string"
        },
        "text": {
          "type": "string"
        },
        "updated_at": {
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
          "type": "string"
        },
        "variables": {
          "items": {
            "properties": {
              "fallback_value": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  }
                ]
              },
              "key": {
                "type": "string"
              },
              "type": {
                "enum": [
                  "string",
                  "number",
                  "boolean"
                ],
                "type": "string"
              }
            },
            "required": [
              "key",
              "type"
            ],
            "type": "object"
          },
          "type": "array"
        }
      },
      "required": [
        "object",
        "id",
        "name",
        "alias",
        "status",
        "current_version_number",
        "current_version_id",
        "has_unpublished_versions",
        "published_at",
        "from",
        "subject",
        "reply_to",
        "html",
        "text",
        "variables",
        "draft_content",
        "draft_variables",
        "draft_subject",
        "created_at",
        "updated_at"
      ],
      "type": "object"
    },
    "version": {
      "properties": {
        "content": {
          "anyOf": [
            {
              "properties": {
                "blocks": {
                  "description": "Blocks, in order. At least one.",
                  "items": {
                    "anyOf": [
                      {
                        "properties": {
                          "body": {
                            "description": "The block text. Placeholders use {{name}}.",
                            "type": "string"
                          },
                          "kind": {
                            "const": "text",
                            "description": "A text block.",
                            "type": "string"
                          }
                        },
                        "required": [
                          "kind",
                          "body"
                        ],
                        "type": "object"
                      },
                      {
                        "properties": {
                          "html": {
                            "description": "HTML for this block.",
                            "type": "string"
                          },
                          "kind": {
                            "const": "raw",
                            "description": "HTML inserted as written.",
                            "type": "string"
                          }
                        },
                        "required": [
                          "kind",
                          "html"
                        ],
                        "type": "object"
                      }
                    ]
                  },
                  "minItems": 1,
                  "type": "array"
                },
                "mode": {
                  "const": "block",
                  "description": "block, markdown or html.",
                  "type": "string"
                }
              },
              "required": [
                "mode",
                "blocks"
              ],
              "type": "object"
            },
            {
              "properties": {
                "mode": {
                  "description": "markdown or html.",
                  "enum": [
                    "markdown",
                    "html"
                  ],
                  "type": "string"
                },
                "source": {
                  "description": "The template source. At most 512 KB when writing.",
                  "minLength": 1,
                  "type": "string"
                }
              },
              "required": [
                "mode",
                "source"
              ],
              "type": "object"
            }
          ]
        },
        "created_at": {
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
          "type": "string"
        },
        "from": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "id": {
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
          "type": "string"
        },
        "published_at": {
          "anyOf": [
            {
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "reply_to": {
          "anyOf": [
            {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ]
        },
        "rolled_back_from": {
          "anyOf": [
            {
              "maximum": 9007199254740991,
              "minimum": -9007199254740991,
              "type": "integer"
            },
            {
              "type": "null"
            }
          ]
        },
        "status": {
          "enum": [
            "draft",
            "published"
          ],
          "type": "string"
        },
        "subject": {
          "type": "string"
        },
        "template_id": {
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
          "type": "string"
        },
        "text": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "variables": {
          "items": {
            "properties": {
              "default": {
                "description": "Used when the render call omits this name.",
                "type": "string"
              },
              "name": {
                "description": "Placeholder name, without the braces.",
                "minLength": 1,
                "type": "string"
              },
              "required": {
                "description": "A missing required value fails the render, unless preview is true.",
                "type": "boolean"
              },
              "type": {
                "description": "string, number or boolean.",
                "enum": [
                  "string",
                  "number",
                  "boolean"
                ],
                "type": "string"
              }
            },
            "required": [
              "name",
              "type"
            ],
            "type": "object"
          },
          "type": "array"
        },
        "version_number": {
          "maximum": 9007199254740991,
          "minimum": -9007199254740991,
          "type": "integer"
        }
      },
      "required": [
        "id",
        "template_id",
        "version_number",
        "status",
        "content",
        "variables",
        "subject",
        "from",
        "reply_to",
        "text",
        "published_at",
        "rolled_back_from",
        "created_at"
      ],
      "type": "object"
    }
  },
  "required": [
    "object",
    "id",
    "template",
    "version"
  ],
  "type": "object"
}