title: Message Template
type: object
x-tags:
  - Models
description: A merchant-owned message definition. Origin describes who owns the
  definition. Purpose identifies transactional templates and reusable marketing
  drafts. System templates retain their immutable system key.
required:
  - uuid
  - name
  - description
  - integrations_requiring_submission
  - supported_params
  - body
  - capabilities
  - created_at
  - origin
  - purpose
  - system_key
properties:
  uuid:
    type: string
    format: uuid
    description: The template's unique identifier.
    readOnly: true
  name:
    type: string
    minLength: 1
    maxLength: 255
    description: The editable display name.
  description:
    type:
      - string
      - 'null'
    example: Sent when a customer registration is completed.
    description: Description of the template definition.
    readOnly: true
  integrations_requiring_submission:
    type: array
    uniqueItems: true
    readOnly: true
    description: The configured third-party messaging integrations that require
      submission of this template.
    items:
      $ref: ./MessagingIntegration.yaml
  supported_params:
    type: array
    uniqueItems: true
    description: The predefined parameters supported by the template. {{customer_tier_benefits}} lists the
      benefits associated with the customer's membership tier, excluding archived loyalty programs. The
      cashback_earning_confirmation system template supports {{cashback_earning_summary}} with per-program earned
      totals including bonuses. Manual cashback credits and redemptions reuse top_up_confirmation and
      redemption_confirmation. Replays, voids, zero awards and reversals do not send new confirmations; cashback
      is not purchasable through bot top-up choices.
    items:
      type: object
      required:
        - name
        - description
        - example
      properties:
        name:
          type: string
          pattern: ^\{\{[A-Za-z_][A-Za-z0-9_]*}}$
          maxLength: 36
          description: A predefined placeholder supported by this definition. The length includes the surrounding braces.
        description:
          type:
            - string
            - 'null'
          example: The merchant's name.
          description: A user-friendly description of how the parameter can be used.
          readOnly: true
        example:
          type:
            - string
            - 'null'
          example: Barry's Burgers
          description: An example of what the parameter replaced with when included in a
            message.
          readOnly: true
    readOnly: true
  body:
    $ref: ./MessageTemplateBody.yaml
  capabilities:
    description: Workflow and integration editing constraints for this template.
    oneOf:
      - $ref: ./MessageTemplateCapabilities.yaml
      - type: 'null'
  created_at:
    type: string
    format: date-time
    description: The date-time that the template was first created.
    readOnly: true
  origin:
    $ref: ./MessageTemplateOrigin.yaml
    readOnly: true
  purpose:
    type: string
    enum:
      - transactional
      - marketing
    description: The workflow this template belongs to.
    readOnly: true
  system_key:
    type:
      - string
      - 'null'
    minLength: 1
    description: The immutable predefined definition key. Display names do not select
      system behavior. Stamp purchase earning uses stamp_earning_confirmation; point earning uses point_earning_confirmation;
      stamp-to-voucher exchange uses stamp_exchange_confirmation, and point exchange uses point_exchange_confirmation. Manual stamp and point
      additions and direct discounts reuse top_up_confirmation and
      redemption_confirmation. Consumers should use supported_params from each
      returned definition rather than maintaining a fixed placeholder list.
    readOnly: true
