title: Marketing Message Template Body Input
type: object
x-tags:
  - Models
description: The body of a WhatsApp marketing template. Use a tracked campaign URL button and an optional
  text, image or video header.
required:
  - text
  - header
  - action
additionalProperties: false
properties:
  text:
    type: string
    minLength: 1
    description: Message text. WhatsApp-formatted text is limited to 1,024 characters. Use {{customer_name}} and
      {{merchant_name}} only in the text, separated by actual text. Placeholders cannot start or end the
      message.
    example: Hello {{customer_name}}, see this weekend’s offers from {{merchant_name}} below.
  header:
    description: Optional message header. Active messaging integrations may impose additional constraints.
    oneOf:
      - type: "null"
      - type: object
        required:
          - type
          - text
        additionalProperties: false
        properties:
          type:
            type: string
            const: text
          text:
            type: string
            minLength: 1
            description: Static header text. Template placeholders are not supported.
            example: Welcome
            maxLength: 60
      - $ref: ./MessageTemplateImageHeaderInput.yaml
      - $ref: ./MessageTemplateVideoHeaderInput.yaml
  action:
    type: object
    required:
      - type
      - label
      - target
    properties:
      type:
        type: string
        const: url
      label:
        type: string
        minLength: 1
        maxLength: 20
        example: Browse offers
      target:
        type: object
        required:
          - type
          - key
        properties:
          type:
            type: string
            const: dynamic
          key:
            type: string
            const: marketing_campaign
        additionalProperties: false
    additionalProperties: false
