{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/thanks-io/json-schema/thanks-io-message-template-update-schema.json",
  "title": "message-template-update",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/thanks-io-message-templates-api-openapi.yml#/components/schemas/message-template-update",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Updated name of the message template"
    },
    "handwriting_style_id": {
      "type": "integer",
      "description": "Handwriting style ID for the message template"
    },
    "font_color": {
      "type": "string",
      "description": "Handwriting color to use"
    },
    "handwriting_realism": {
      "type": "boolean",
      "description": "Set to true to enable the realism effect for AI fonts."
    },
    "content": {
      "type": "string",
      "description": "Updated template body content"
    },
    "type": {
      "type": "string",
      "enum": [
        "postcard",
        "postcard6x9",
        "postcard6x11",
        "letter",
        "windowlessletter",
        "notecard",
        "giftcard",
        "magnacard"
      ],
      "description": "Type of the message template"
    },
    "sub_account_id": {
      "type": [
        "integer",
        "null"
      ],
      "description": "ID of the sub-account to associate with this template."
    },
    "additional_pages": {
      "type": "string",
      "format": "uri",
      "description": "Updated additional PDF URL for the template"
    },
    "pdf_only_url": {
      "type": "string",
      "format": "uri",
      "description": "URL to PDF file to use for entire mailer. If this is specified, no cover letter is generated.  Valid for letter templates only. Providing this URL automatically sets skip_creative_generation to true. For windowed letter templates, leave the upper-left address area of page 1 blank and do not include a recipient address in the PDF; thanks.io prints each recipient's address there."
    },
    "custom_background_url": {
      "type": "string",
      "format": "uri",
      "description": "Updated custom background image URL. Only valid for postcard backs and the interior background of notecards and giftcards."
    },
    "qrcode_url": {
      "type": "string",
      "format": "uri",
      "description": "Updated QR code image URL"
    },
    "cc_emails": {
      "type": "array",
      "items": {
        "type": "string",
        "format": "email"
      }
    },
    "giftcard_brand_code": {
      "type": "string",
      "description": "Updated gift card brand code. Required when type is giftcard."
    },
    "giftcard_amount": {
      "type": "integer",
      "description": "Updated gift card amount in cents. Required when type is giftcard."
    },
    "landing_page_url": {
      "type": "string",
      "format": "uri",
      "description": "Updated gated landing page URL (also known as a gating URL). Recipients must visit this page before they can redeem the gift card, letting you gate redemption behind an action such as booking a demo or completing a form. Only valid for giftcards."
    }
  }
}