> ## Documentation Index
> Fetch the complete documentation index at: https://docs.useboom.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Update email template

> Update an email template: rename, change the subject or senders, replace its content, or publish/unpublish it (status). Content is re-rendered server-side. Sending `html` to a block template converts it to an HTML template, one way — an HTML template cannot take a `document` again. A PUBLISHED template is live: journeys that send it use the change from their next send, so any update to one requires confirm: true (call without it first to see the refusal). Omitted fields are unchanged.



## OpenAPI

````yaml /api-reference/openapi.json patch /api/v1/email-templates/{templateId}
openapi: 3.1.0
info:
  title: Boom API
  version: 1.0.0
  description: >-
    Boom's public REST API — one uniform surface over every platform capability.
    CDP: upsert people and custom objects, define object and relationship types,
    link and unlink relationships, and record behavioral events — one record per
    request or up to 1000 per request via the `/batch` endpoints. Segments: read
    (list, read, membership) and full authoring — discover the filterable
    catalog, validate a filter, create and update segments, preview match
    counts, and trigger evaluation. Initiatives: create and configure outreach
    initiatives, link WhatsApp templates, drive the lifecycle (launch, cancel,
    archive), and read collected-data summaries. Participants: enroll people
    into an active initiative, track their status, read conversation
    transcripts, and stop outreach. Journeys: read-only access to always-on
    message flows and their metrics. WhatsApp templates: list your WhatsApp
    numbers and list, read, and create message templates. The same capabilities
    are exposed as MCP tools with identical schemas.
servers:
  - url: https://www.useboom.ai
    description: Production
  - url: https://dev.useboom.ai
    description: Development (sandbox — use a development organization API key)
security:
  - bearerAuth: []
paths:
  /api/v1/email-templates/{templateId}:
    patch:
      tags:
        - Email templates
      summary: Update email template
      description: >-
        Update an email template: rename, change the subject or senders, replace
        its content, or publish/unpublish it (status). Content is re-rendered
        server-side. Sending `html` to a block template converts it to an HTML
        template, one way — an HTML template cannot take a `document` again. A
        PUBLISHED template is live: journeys that send it use the change from
        their next send, so any update to one requires confirm: true (call
        without it first to see the refusal). Omitted fields are unchanged.
      operationId: email_templates_update
      parameters:
        - name: templateId
          in: path
          required: true
          schema:
            $schema: https://json-schema.org/draft/2020-12/schema
            type: string
            minLength: 1
            description: Email template id.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $schema: https://json-schema.org/draft/2020-12/schema
              type: object
              properties:
                name:
                  type: string
                  minLength: 1
                subject:
                  type: string
                  minLength: 1
                document:
                  description: >-
                    Block-builder content. Send exactly one of `document` or
                    `html`.
                  type: object
                  properties:
                    body:
                      type: object
                      properties:
                        preheader:
                          description: >-
                            Inbox preview text shown next to the subject. May
                            contain {{path}} variables, e.g. {{customer.name}}
                            (see journeys_message_variables for bindable paths).
                          type: string
                        language:
                          description: Language the email is written in; defaults to es.
                          type: string
                          enum:
                            - es
                            - en
                            - pt
                        textColor:
                          type: string
                          minLength: 1
                          description: 'CSS color, e.g. #111827'
                        background:
                          description: Canvas behind the email sheet.
                          type: string
                          minLength: 1
                        sheetBackground:
                          type: string
                          minLength: 1
                          description: 'CSS color, e.g. #111827'
                        sheetRadius:
                          type: number
                          minimum: 0
                        sheetPadding:
                          type: number
                          minimum: 0
                        contentWidth:
                          type: number
                          minimum: 320
                          maximum: 700
                        contentAlign:
                          type: string
                          enum:
                            - left
                            - center
                        fontFamily:
                          type: string
                          minLength: 1
                        fontWeight:
                          type: string
                          enum:
                            - '400'
                            - '500'
                            - '600'
                            - '700'
                      additionalProperties: false
                      description: Whole-email styles.
                    blocks:
                      minItems: 1
                      type: array
                      items:
                        oneOf:
                          - type: object
                            properties:
                              id:
                                type: string
                                minLength: 1
                              spacingBelow:
                                description: Space after the block, px.
                                type: number
                              type:
                                type: string
                                const: heading
                              text:
                                type: string
                                minLength: 1
                                description: >-
                                  Heading text. May contain {{path}} variables,
                                  e.g. {{customer.name}} (see
                                  journeys_message_variables for bindable
                                  paths).
                              size:
                                type: number
                                minimum: 0
                              color:
                                type: string
                                minLength: 1
                                description: 'CSS color, e.g. #111827'
                              align:
                                type: string
                                enum:
                                  - left
                                  - center
                                  - right
                            required:
                              - type
                              - text
                            additionalProperties: false
                            description: A heading.
                          - type: object
                            properties:
                              id:
                                type: string
                                minLength: 1
                              spacingBelow:
                                description: Space after the block, px.
                                type: number
                              type:
                                type: string
                                const: text
                              text:
                                type: string
                                minLength: 1
                                description: >-
                                  Paragraph text. A blank line starts a new
                                  paragraph, a single newline is a line break.
                                  May contain {{path}} variables, e.g.
                                  {{customer.name}} (see
                                  journeys_message_variables for bindable
                                  paths).
                              size:
                                type: number
                                minimum: 0
                              color:
                                type: string
                                minLength: 1
                                description: 'CSS color, e.g. #111827'
                              align:
                                type: string
                                enum:
                                  - left
                                  - center
                                  - right
                            required:
                              - type
                              - text
                            additionalProperties: false
                            description: A paragraph.
                          - type: object
                            properties:
                              id:
                                type: string
                                minLength: 1
                              spacingBelow:
                                description: Space after the block, px.
                                type: number
                              type:
                                type: string
                                const: button
                              text:
                                type: string
                                minLength: 1
                                description: Button label (single line).
                              href:
                                type: string
                                minLength: 1
                                description: >-
                                  Destination URL. May be a variable, e.g.
                                  {{engagement.chatLink}} for the link that
                                  opens this run’s web chat.
                              bg:
                                type: string
                                minLength: 1
                                description: 'CSS color, e.g. #111827'
                              color:
                                type: string
                                minLength: 1
                                description: 'CSS color, e.g. #111827'
                              align:
                                type: string
                                enum:
                                  - left
                                  - center
                                  - right
                              radius:
                                type: number
                                minimum: 0
                              corners:
                                type: array
                                prefixItems:
                                  - type: number
                                    minimum: 0
                                  - type: number
                                    minimum: 0
                                  - type: number
                                    minimum: 0
                                  - type: number
                                    minimum: 0
                                description: >-
                                  Per-corner radii [top-left, top-right,
                                  bottom-right, bottom-left]
                            required:
                              - type
                              - text
                              - href
                            additionalProperties: false
                            description: A call-to-action button.
                          - type: object
                            properties:
                              id:
                                type: string
                                minLength: 1
                              spacingBelow:
                                description: Space after the block, px.
                                type: number
                              type:
                                type: string
                                const: image
                              src:
                                type: string
                                format: uri
                                description: Public image URL (https).
                              alt:
                                type: string
                              radius:
                                type: number
                                minimum: 0
                              corners:
                                type: array
                                prefixItems:
                                  - type: number
                                    minimum: 0
                                  - type: number
                                    minimum: 0
                                  - type: number
                                    minimum: 0
                                  - type: number
                                    minimum: 0
                                description: >-
                                  Per-corner radii [top-left, top-right,
                                  bottom-right, bottom-left]
                              width:
                                type: number
                                exclusiveMinimum: 0
                              widthUnit:
                                description: >-
                                  px suits a logo or icon; % scales with the
                                  email width.
                                type: string
                                enum:
                                  - '%'
                                  - px
                              align:
                                type: string
                                enum:
                                  - left
                                  - center
                                  - right
                              href:
                                description: Optional link target; empty = not a link.
                                type: string
                            required:
                              - type
                              - src
                            additionalProperties: false
                            description: An image.
                          - type: object
                            properties:
                              id:
                                type: string
                                minLength: 1
                              spacingBelow:
                                description: Space after the block, px.
                                type: number
                              type:
                                type: string
                                const: divider
                              color:
                                type: string
                                minLength: 1
                                description: 'CSS color, e.g. #111827'
                              thickness:
                                type: number
                                minimum: 0
                              width:
                                description: Percent of the container.
                                type: number
                                minimum: 10
                                maximum: 100
                              align:
                                type: string
                                enum:
                                  - left
                                  - center
                                  - right
                            required:
                              - type
                            additionalProperties: false
                            description: A horizontal rule.
                          - type: object
                            properties:
                              id:
                                type: string
                                minLength: 1
                              spacingBelow:
                                description: Space after the block, px.
                                type: number
                              type:
                                type: string
                                const: spacer
                              height:
                                type: number
                                minimum: 0
                            required:
                              - type
                            additionalProperties: false
                            description: Vertical space.
                          - type: object
                            properties:
                              id:
                                type: string
                                minLength: 1
                              spacingBelow:
                                description: Space after the block, px.
                                type: number
                              type:
                                type: string
                                const: html
                              source:
                                type: string
                                minLength: 1
                                description: >-
                                  Raw HTML for markup the other blocks cannot
                                  express. Sanitized at render: scripts, event
                                  handlers and external stylesheets are removed.
                                  May contain {{path}} variables, e.g.
                                  {{customer.name}} (see
                                  journeys_message_variables for bindable
                                  paths).
                            required:
                              - type
                              - source
                            additionalProperties: false
                            description: An HTML snippet inside a block email.
                          - type: object
                            properties:
                              id:
                                type: string
                                minLength: 1
                              spacingBelow:
                                description: Space after the block, px.
                                type: number
                              type:
                                type: string
                                const: social
                              links:
                                minItems: 1
                                type: array
                                items:
                                  type: object
                                  properties:
                                    id:
                                      type: string
                                      minLength: 1
                                    network:
                                      type: string
                                      enum:
                                        - instagram
                                        - facebook
                                        - tiktok
                                        - x
                                        - linkedin
                                        - youtube
                                        - whatsapp
                                    url:
                                      type: string
                                      format: uri
                                  required:
                                    - network
                                    - url
                                  additionalProperties: false
                              style:
                                type: string
                                enum:
                                  - brand
                                  - dark
                                  - light
                              size:
                                type: number
                                minimum: 0
                              spacing:
                                type: number
                                minimum: 0
                              align:
                                type: string
                                enum:
                                  - left
                                  - center
                                  - right
                            required:
                              - type
                              - links
                            additionalProperties: false
                            description: A row of social network icons.
                          - type: object
                            properties:
                              id:
                                type: string
                                minLength: 1
                              spacingBelow:
                                description: Space after the block, px.
                                type: number
                              type:
                                type: string
                                const: footer
                              text:
                                type: string
                                minLength: 1
                                description: >-
                                  Footer copy, usually the company name and
                                  postal address.
                              unsubscribeLabel:
                                description: >-
                                  Text of the one-click unsubscribe link under
                                  the footer. Omit for the document language's
                                  default; empty string for no link
                                  (transactional email).
                                type: string
                              color:
                                type: string
                                minLength: 1
                                description: 'CSS color, e.g. #111827'
                              size:
                                type: number
                                minimum: 0
                              align:
                                type: string
                                enum:
                                  - left
                                  - center
                                  - right
                            required:
                              - type
                              - text
                            additionalProperties: false
                            description: The email footer. Top level only.
                          - type: object
                            properties:
                              id:
                                type: string
                                minLength: 1
                              spacingBelow:
                                description: Space after the block, px.
                                type: number
                              type:
                                type: string
                                const: columns
                              columns:
                                minItems: 1
                                maxItems: 4
                                type: array
                                items:
                                  type: object
                                  properties:
                                    id:
                                      type: string
                                      minLength: 1
                                    ratio:
                                      description: >-
                                        Share of the row width; [1,2] = a third
                                        / two thirds.
                                      type: number
                                      exclusiveMinimum: 0
                                    children:
                                      type: array
                                      items:
                                        oneOf:
                                          - type: object
                                            properties:
                                              id:
                                                type: string
                                                minLength: 1
                                              spacingBelow:
                                                description: Space after the block, px.
                                                type: number
                                              type:
                                                type: string
                                                const: heading
                                              text:
                                                type: string
                                                minLength: 1
                                                description: >-
                                                  Heading text. May contain {{path}}
                                                  variables, e.g. {{customer.name}} (see
                                                  journeys_message_variables for bindable
                                                  paths).
                                              size:
                                                type: number
                                                minimum: 0
                                              color:
                                                type: string
                                                minLength: 1
                                                description: 'CSS color, e.g. #111827'
                                              align:
                                                type: string
                                                enum:
                                                  - left
                                                  - center
                                                  - right
                                            required:
                                              - type
                                              - text
                                            additionalProperties: false
                                            description: A heading.
                                          - type: object
                                            properties:
                                              id:
                                                type: string
                                                minLength: 1
                                              spacingBelow:
                                                description: Space after the block, px.
                                                type: number
                                              type:
                                                type: string
                                                const: text
                                              text:
                                                type: string
                                                minLength: 1
                                                description: >-
                                                  Paragraph text. A blank line starts a
                                                  new paragraph, a single newline is a
                                                  line break. May contain {{path}}
                                                  variables, e.g. {{customer.name}} (see
                                                  journeys_message_variables for bindable
                                                  paths).
                                              size:
                                                type: number
                                                minimum: 0
                                              color:
                                                type: string
                                                minLength: 1
                                                description: 'CSS color, e.g. #111827'
                                              align:
                                                type: string
                                                enum:
                                                  - left
                                                  - center
                                                  - right
                                            required:
                                              - type
                                              - text
                                            additionalProperties: false
                                            description: A paragraph.
                                          - type: object
                                            properties:
                                              id:
                                                type: string
                                                minLength: 1
                                              spacingBelow:
                                                description: Space after the block, px.
                                                type: number
                                              type:
                                                type: string
                                                const: button
                                              text:
                                                type: string
                                                minLength: 1
                                                description: Button label (single line).
                                              href:
                                                type: string
                                                minLength: 1
                                                description: >-
                                                  Destination URL. May be a variable, e.g.
                                                  {{engagement.chatLink}} for the link
                                                  that opens this run’s web chat.
                                              bg:
                                                type: string
                                                minLength: 1
                                                description: 'CSS color, e.g. #111827'
                                              color:
                                                type: string
                                                minLength: 1
                                                description: 'CSS color, e.g. #111827'
                                              align:
                                                type: string
                                                enum:
                                                  - left
                                                  - center
                                                  - right
                                              radius:
                                                type: number
                                                minimum: 0
                                              corners:
                                                type: array
                                                prefixItems:
                                                  - type: number
                                                    minimum: 0
                                                  - type: number
                                                    minimum: 0
                                                  - type: number
                                                    minimum: 0
                                                  - type: number
                                                    minimum: 0
                                                description: >-
                                                  Per-corner radii [top-left, top-right,
                                                  bottom-right, bottom-left]
                                            required:
                                              - type
                                              - text
                                              - href
                                            additionalProperties: false
                                            description: A call-to-action button.
                                          - type: object
                                            properties:
                                              id:
                                                type: string
                                                minLength: 1
                                              spacingBelow:
                                                description: Space after the block, px.
                                                type: number
                                              type:
                                                type: string
                                                const: image
                                              src:
                                                type: string
                                                format: uri
                                                description: Public image URL (https).
                                              alt:
                                                type: string
                                              radius:
                                                type: number
                                                minimum: 0
                                              corners:
                                                type: array
                                                prefixItems:
                                                  - type: number
                                                    minimum: 0
                                                  - type: number
                                                    minimum: 0
                                                  - type: number
                                                    minimum: 0
                                                  - type: number
                                                    minimum: 0
                                                description: >-
                                                  Per-corner radii [top-left, top-right,
                                                  bottom-right, bottom-left]
                                              width:
                                                type: number
                                                exclusiveMinimum: 0
                                              widthUnit:
                                                description: >-
                                                  px suits a logo or icon; % scales with
                                                  the email width.
                                                type: string
                                                enum:
                                                  - '%'
                                                  - px
                                              align:
                                                type: string
                                                enum:
                                                  - left
                                                  - center
                                                  - right
                                              href:
                                                description: >-
                                                  Optional link target; empty = not a
                                                  link.
                                                type: string
                                            required:
                                              - type
                                              - src
                                            additionalProperties: false
                                            description: An image.
                                          - type: object
                                            properties:
                                              id:
                                                type: string
                                                minLength: 1
                                              spacingBelow:
                                                description: Space after the block, px.
                                                type: number
                                              type:
                                                type: string
                                                const: divider
                                              color:
                                                type: string
                                                minLength: 1
                                                description: 'CSS color, e.g. #111827'
                                              thickness:
                                                type: number
                                                minimum: 0
                                              width:
                                                description: Percent of the container.
                                                type: number
                                                minimum: 10
                                                maximum: 100
                                              align:
                                                type: string
                                                enum:
                                                  - left
                                                  - center
                                                  - right
                                            required:
                                              - type
                                            additionalProperties: false
                                            description: A horizontal rule.
                                          - type: object
                                            properties:
                                              id:
                                                type: string
                                                minLength: 1
                                              spacingBelow:
                                                description: Space after the block, px.
                                                type: number
                                              type:
                                                type: string
                                                const: spacer
                                              height:
                                                type: number
                                                minimum: 0
                                            required:
                                              - type
                                            additionalProperties: false
                                            description: Vertical space.
                                          - type: object
                                            properties:
                                              id:
                                                type: string
                                                minLength: 1
                                              spacingBelow:
                                                description: Space after the block, px.
                                                type: number
                                              type:
                                                type: string
                                                const: html
                                              source:
                                                type: string
                                                minLength: 1
                                                description: >-
                                                  Raw HTML for markup the other blocks
                                                  cannot express. Sanitized at render:
                                                  scripts, event handlers and external
                                                  stylesheets are removed. May contain
                                                  {{path}} variables, e.g.
                                                  {{customer.name}} (see
                                                  journeys_message_variables for bindable
                                                  paths).
                                            required:
                                              - type
                                              - source
                                            additionalProperties: false
                                            description: An HTML snippet inside a block email.
                                          - type: object
                                            properties:
                                              id:
                                                type: string
                                                minLength: 1
                                              spacingBelow:
                                                description: Space after the block, px.
                                                type: number
                                              type:
                                                type: string
                                                const: social
                                              links:
                                                minItems: 1
                                                type: array
                                                items:
                                                  type: object
                                                  properties:
                                                    id:
                                                      type: string
                                                      minLength: 1
                                                    network:
                                                      type: string
                                                      enum:
                                                        - instagram
                                                        - facebook
                                                        - tiktok
                                                        - x
                                                        - linkedin
                                                        - youtube
                                                        - whatsapp
                                                    url:
                                                      type: string
                                                      format: uri
                                                  required:
                                                    - network
                                                    - url
                                                  additionalProperties: false
                                              style:
                                                type: string
                                                enum:
                                                  - brand
                                                  - dark
                                                  - light
                                              size:
                                                type: number
                                                minimum: 0
                                              spacing:
                                                type: number
                                                minimum: 0
                                              align:
                                                type: string
                                                enum:
                                                  - left
                                                  - center
                                                  - right
                                            required:
                                              - type
                                              - links
                                            additionalProperties: false
                                            description: A row of social network icons.
                                  required:
                                    - children
                                  additionalProperties: false
                              gap:
                                type: number
                                minimum: 0
                              stackOnMobile:
                                type: boolean
                            required:
                              - type
                              - columns
                            additionalProperties: false
                            description: >-
                              Side-by-side columns (1–4). A column holds leaf
                              blocks only.
                          - type: object
                            properties:
                              id:
                                type: string
                                minLength: 1
                              spacingBelow:
                                description: Space after the block, px.
                                type: number
                              type:
                                type: string
                                const: container
                              children:
                                type: array
                                items:
                                  oneOf:
                                    - type: object
                                      properties:
                                        id:
                                          type: string
                                          minLength: 1
                                        spacingBelow:
                                          description: Space after the block, px.
                                          type: number
                                        type:
                                          type: string
                                          const: heading
                                        text:
                                          type: string
                                          minLength: 1
                                          description: >-
                                            Heading text. May contain {{path}}
                                            variables, e.g. {{customer.name}} (see
                                            journeys_message_variables for bindable
                                            paths).
                                        size:
                                          type: number
                                          minimum: 0
                                        color:
                                          type: string
                                          minLength: 1
                                          description: 'CSS color, e.g. #111827'
                                        align:
                                          type: string
                                          enum:
                                            - left
                                            - center
                                            - right
                                      required:
                                        - type
                                        - text
                                      additionalProperties: false
                                      description: A heading.
                                    - type: object
                                      properties:
                                        id:
                                          type: string
                                          minLength: 1
                                        spacingBelow:
                                          description: Space after the block, px.
                                          type: number
                                        type:
                                          type: string
                                          const: text
                                        text:
                                          type: string
                                          minLength: 1
                                          description: >-
                                            Paragraph text. A blank line starts a
                                            new paragraph, a single newline is a
                                            line break. May contain {{path}}
                                            variables, e.g. {{customer.name}} (see
                                            journeys_message_variables for bindable
                                            paths).
                                        size:
                                          type: number
                                          minimum: 0
                                        color:
                                          type: string
                                          minLength: 1
                                          description: 'CSS color, e.g. #111827'
                                        align:
                                          type: string
                                          enum:
                                            - left
                                            - center
                                            - right
                                      required:
                                        - type
                                        - text
                                      additionalProperties: false
                                      description: A paragraph.
                                    - type: object
                                      properties:
                                        id:
                                          type: string
                                          minLength: 1
                                        spacingBelow:
                                          description: Space after the block, px.
                                          type: number
                                        type:
                                          type: string
                                          const: button
                                        text:
                                          type: string
                                          minLength: 1
                                          description: Button label (single line).
                                        href:
                                          type: string
                                          minLength: 1
                                          description: >-
                                            Destination URL. May be a variable, e.g.
                                            {{engagement.chatLink}} for the link
                                            that opens this run’s web chat.
                                        bg:
                                          type: string
                                          minLength: 1
                                          description: 'CSS color, e.g. #111827'
                                        color:
                                          type: string
                                          minLength: 1
                                          description: 'CSS color, e.g. #111827'
                                        align:
                                          type: string
                                          enum:
                                            - left
                                            - center
                                            - right
                                        radius:
                                          type: number
                                          minimum: 0
                                        corners:
                                          type: array
                                          prefixItems:
                                            - type: number
                                              minimum: 0
                                            - type: number
                                              minimum: 0
                                            - type: number
                                              minimum: 0
                                            - type: number
                                              minimum: 0
                                          description: >-
                                            Per-corner radii [top-left, top-right,
                                            bottom-right, bottom-left]
                                      required:
                                        - type
                                        - text
                                        - href
                                      additionalProperties: false
                                      description: A call-to-action button.
                                    - type: object
                                      properties:
                                        id:
                                          type: string
                                          minLength: 1
                                        spacingBelow:
                                          description: Space after the block, px.
                                          type: number
                                        type:
                                          type: string
                                          const: image
                                        src:
                                          type: string
                                          format: uri
                                          description: Public image URL (https).
                                        alt:
                                          type: string
                                        radius:
                                          type: number
                                          minimum: 0
                                        corners:
                                          type: array
                                          prefixItems:
                                            - type: number
                                              minimum: 0
                                            - type: number
                                              minimum: 0
                                            - type: number
                                              minimum: 0
                                            - type: number
                                              minimum: 0
                                          description: >-
                                            Per-corner radii [top-left, top-right,
                                            bottom-right, bottom-left]
                                        width:
                                          type: number
                                          exclusiveMinimum: 0
                                        widthUnit:
                                          description: >-
                                            px suits a logo or icon; % scales with
                                            the email width.
                                          type: string
                                          enum:
                                            - '%'
                                            - px
                                        align:
                                          type: string
                                          enum:
                                            - left
                                            - center
                                            - right
                                        href:
                                          description: >-
                                            Optional link target; empty = not a
                                            link.
                                          type: string
                                      required:
                                        - type
                                        - src
                                      additionalProperties: false
                                      description: An image.
                                    - type: object
                                      properties:
                                        id:
                                          type: string
                                          minLength: 1
                                        spacingBelow:
                                          description: Space after the block, px.
                                          type: number
                                        type:
                                          type: string
                                          const: divider
                                        color:
                                          type: string
                                          minLength: 1
                                          description: 'CSS color, e.g. #111827'
                                        thickness:
                                          type: number
                                          minimum: 0
                                        width:
                                          description: Percent of the container.
                                          type: number
                                          minimum: 10
                                          maximum: 100
                                        align:
                                          type: string
                                          enum:
                                            - left
                                            - center
                                            - right
                                      required:
                                        - type
                                      additionalProperties: false
                                      description: A horizontal rule.
                                    - type: object
                                      properties:
                                        id:
                                          type: string
                                          minLength: 1
                                        spacingBelow:
                                          description: Space after the block, px.
                                          type: number
                                        type:
                                          type: string
                                          const: spacer
                                        height:
                                          type: number
                                          minimum: 0
                                      required:
                                        - type
                                      additionalProperties: false
                                      description: Vertical space.
                                    - type: object
                                      properties:
                                        id:
                                          type: string
                                          minLength: 1
                                        spacingBelow:
                                          description: Space after the block, px.
                                          type: number
                                        type:
                                          type: string
                                          const: html
                                        source:
                                          type: string
                                          minLength: 1
                                          description: >-
                                            Raw HTML for markup the other blocks
                                            cannot express. Sanitized at render:
                                            scripts, event handlers and external
                                            stylesheets are removed. May contain
                                            {{path}} variables, e.g.
                                            {{customer.name}} (see
                                            journeys_message_variables for bindable
                                            paths).
                                      required:
                                        - type
                                        - source
                                      additionalProperties: false
                                      description: An HTML snippet inside a block email.
                                    - type: object
                                      properties:
                                        id:
                                          type: string
                                          minLength: 1
                                        spacingBelow:
                                          description: Space after the block, px.
                                          type: number
                                        type:
                                          type: string
                                          const: social
                                        links:
                                          minItems: 1
                                          type: array
                                          items:
                                            type: object
                                            properties:
                                              id:
                                                type: string
                                                minLength: 1
                                              network:
                                                type: string
                                                enum:
                                                  - instagram
                                                  - facebook
                                                  - tiktok
                                                  - x
                                                  - linkedin
                                                  - youtube
                                                  - whatsapp
                                              url:
                                                type: string
                                                format: uri
                                            required:
                                              - network
                                              - url
                                            additionalProperties: false
                                        style:
                                          type: string
                                          enum:
                                            - brand
                                            - dark
                                            - light
                                        size:
                                          type: number
                                          minimum: 0
                                        spacing:
                                          type: number
                                          minimum: 0
                                        align:
                                          type: string
                                          enum:
                                            - left
                                            - center
                                            - right
                                      required:
                                        - type
                                        - links
                                      additionalProperties: false
                                      description: A row of social network icons.
                                    - type: object
                                      properties:
                                        id:
                                          type: string
                                          minLength: 1
                                        spacingBelow:
                                          description: Space after the block, px.
                                          type: number
                                        type:
                                          type: string
                                          const: columns
                                        columns:
                                          minItems: 1
                                          maxItems: 4
                                          type: array
                                          items:
                                            type: object
                                            properties:
                                              id:
                                                type: string
                                                minLength: 1
                                              ratio:
                                                description: >-
                                                  Share of the row width; [1,2] = a third
                                                  / two thirds.
                                                type: number
                                                exclusiveMinimum: 0
                                              children:
                                                type: array
                                                items:
                                                  oneOf:
                                                    - type: object
                                                      properties:
                                                        id:
                                                          type: string
                                                          minLength: 1
                                                        spacingBelow:
                                                          description: Space after the block, px.
                                                          type: number
                                                        type:
                                                          type: string
                                                          const: heading
                                                        text:
                                                          type: string
                                                          minLength: 1
                                                          description: >-
                                                            Heading text. May contain {{path}}
                                                            variables, e.g. {{customer.name}} (see
                                                            journeys_message_variables for bindable
                                                            paths).
                                                        size:
                                                          type: number
                                                          minimum: 0
                                                        color:
                                                          type: string
                                                          minLength: 1
                                                          description: 'CSS color, e.g. #111827'
                                                        align:
                                                          type: string
                                                          enum:
                                                            - left
                                                            - center
                                                            - right
                                                      required:
                                                        - type
                                                        - text
                                                      additionalProperties: false
                                                      description: A heading.
                                                    - type: object
                                                      properties:
                                                        id:
                                                          type: string
                                                          minLength: 1
                                                        spacingBelow:
                                                          description: Space after the block, px.
                                                          type: number
                                                        type:
                                                          type: string
                                                          const: text
                                                        text:
                                                          type: string
                                                          minLength: 1
                                                          description: >-
                                                            Paragraph text. A blank line starts a
                                                            new paragraph, a single newline is a
                                                            line break. May contain {{path}}
                                                            variables, e.g. {{customer.name}} (see
                                                            journeys_message_variables for bindable
                                                            paths).
                                                        size:
                                                          type: number
                                                          minimum: 0
                                                        color:
                                                          type: string
                                                          minLength: 1
                                                          description: 'CSS color, e.g. #111827'
                                                        align:
                                                          type: string
                                                          enum:
                                                            - left
                                                            - center
                                                            - right
                                                      required:
                                                        - type
                                                        - text
                                                      additionalProperties: false
                                                      description: A paragraph.
                                                    - type: object
                                                      properties:
                                                        id:
                                                          type: string
                                                          minLength: 1
                                                        spacingBelow:
                                                          description: Space after the block, px.
                                                          type: number
                                                        type:
                                                          type: string
                                                          const: button
                                                        text:
                                                          type: string
                                                          minLength: 1
                                                          description: Button label (single line).
                                                        href:
                                                          type: string
                                                          minLength: 1
                                                          description: >-
                                                            Destination URL. May be a variable, e.g.
                                                            {{engagement.chatLink}} for the link
                                                            that opens this run’s web chat.
                                                        bg:
                                                          type: string
                                                          minLength: 1
                                                          description: 'CSS color, e.g. #111827'
                                                        color:
                                                          type: string
                                                          minLength: 1
                                                          description: 'CSS color, e.g. #111827'
                                                        align:
                                                          type: string
                                                          enum:
                                                            - left
                                                            - center
                                                            - right
                                                        radius:
                                                          type: number
                                                          minimum: 0
                                                        corners:
                                                          type: array
                                                          prefixItems:
                                                            - type: number
                                                              minimum: 0
                                                            - type: number
                                                              minimum: 0
                                                            - type: number
                                                              minimum: 0
                                                            - type: number
                                                              minimum: 0
                                                          description: >-
                                                            Per-corner radii [top-left, top-right,
                                                            bottom-right, bottom-left]
                                                      required:
                                                        - type
                                                        - text
                                                        - href
                                                      additionalProperties: false
                                                      description: A call-to-action button.
                                                    - type: object
                                                      properties:
                                                        id:
                                                          type: string
                                                          minLength: 1
                                                        spacingBelow:
                                                          description: Space after the block, px.
                                                          type: number
                                                        type:
                                                          type: string
                                                          const: image
                                                        src:
                                                          type: string
                                                          format: uri
                                                          description: Public image URL (https).
                                                        alt:
                                                          type: string
                                                        radius:
                                                          type: number
                                                          minimum: 0
                                                        corners:
                                                          type: array
                                                          prefixItems:
                                                            - type: number
                                                              minimum: 0
                                                            - type: number
                                                              minimum: 0
                                                            - type: number
                                                              minimum: 0
                                                            - type: number
                                                              minimum: 0
                                                          description: >-
                                                            Per-corner radii [top-left, top-right,
                                                            bottom-right, bottom-left]
                                                        width:
                                                          type: number
                                                          exclusiveMinimum: 0
                                                        widthUnit:
                                                          description: >-
                                                            px suits a logo or icon; % scales with
                                                            the email width.
                                                          type: string
                                                          enum:
                                                            - '%'
                                                            - px
                                                        align:
                                                          type: string
                                                          enum:
                                                            - left
                                                            - center
                                                            - right
                                                        href:
                                                          description: >-
                                                            Optional link target; empty = not a
                                                            link.
                                                          type: string
                                                      required:
                                                        - type
                                                        - src
                                                      additionalProperties: false
                                                      description: An image.
                                                    - type: object
                                                      properties:
                                                        id:
                                                          type: string
                                                          minLength: 1
                                                        spacingBelow:
                                                          description: Space after the block, px.
                                                          type: number
                                                        type:
                                                          type: string
                                                          const: divider
                                                        color:
                                                          type: string
                                                          minLength: 1
                                                          description: 'CSS color, e.g. #111827'
                                                        thickness:
                                                          type: number
                                                          minimum: 0
                                                        width:
                                                          description: Percent of the container.
                                                          type: number
                                                          minimum: 10
                                                          maximum: 100
                                                        align:
                                                          type: string
                                                          enum:
                                                            - left
                                                            - center
                                                            - right
                                                      required:
                                                        - type
                                                      additionalProperties: false
                                                      description: A horizontal rule.
                                                    - type: object
                                                      properties:
                                                        id:
                                                          type: string
                                                          minLength: 1
                                                        spacingBelow:
                                                          description: Space after the block, px.
                                                          type: number
                                                        type:
                                                          type: string
                                                          const: spacer
                                                        height:
                                                          type: number
                                                          minimum: 0
                                                      required:
                                                        - type
                                                      additionalProperties: false
                                                      description: Vertical space.
                                                    - type: object
                                                      properties:
                                                        id:
                                                          type: string
                                                          minLength: 1
                                                        spacingBelow:
                                                          description: Space after the block, px.
                                                          type: number
                                                        type:
                                                          type: string
                                                          const: html
                                                        source:
                                                          type: string
                                                          minLength: 1
                                                          description: >-
                                                            Raw HTML for markup the other blocks
                                                            cannot express. Sanitized at render:
                                                            scripts, event handlers and external
                                                            stylesheets are removed. May contain
                                                            {{path}} variables, e.g.
                                                            {{customer.name}} (see
                                                            journeys_message_variables for bindable
                                                            paths).
                                                      required:
                                                        - type
                                                        - source
                                                      additionalProperties: false
                                                      description: An HTML snippet inside a block email.
                                                    - type: object
                                                      properties:
                                                        id:
                                                          type: string
                                                          minLength: 1
                                                        spacingBelow:
                                                          description: Space after the block, px.
                                                          type: number
                                                        type:
                                                          type: string
                                                          const: social
                                                        links:
                                                          minItems: 1
                                                          type: array
                                                          items:
                                                            type: object
                                                            properties:
                                                              id:
                                                                type: string
                                                                minLength: 1
                                                              network:
                                                                type: string
                                                                enum:
                                                                  - instagram
                                                                  - facebook
                                                                  - tiktok
                                                                  - x
                                                                  - linkedin
                                                                  - youtube
                                                                  - whatsapp
                                                              url:
                                                                type: string
                                                                format: uri
                                                            required:
                                                              - network
                                                              - url
                                                            additionalProperties: false
                                                        style:
                                                          type: string
                                                          enum:
                                                            - brand
                                                            - dark
                                                            - light
                                                        size:
                                                          type: number
                                                          minimum: 0
                                                        spacing:
                                                          type: number
                                                          minimum: 0
                                                        align:
                                                          type: string
                                                          enum:
                                                            - left
                                                            - center
                                                            - right
                                                      required:
                                                        - type
                                                        - links
                                                      additionalProperties: false
                                                      description: A row of social network icons.
                                            required:
                                              - children
                                            additionalProperties: false
                                        gap:
                                          type: number
                                          minimum: 0
                                        stackOnMobile:
                                          type: boolean
                                      required:
                                        - type
                                        - columns
                                      additionalProperties: false
                                      description: >-
                                        Side-by-side columns (1–4). A column
                                        holds leaf blocks only.
                              background:
                                type: string
                                minLength: 1
                                description: 'CSS color, e.g. #111827'
                              padding:
                                type: number
                                minimum: 0
                              radius:
                                type: number
                                minimum: 0
                              corners:
                                type: array
                                prefixItems:
                                  - type: number
                                    minimum: 0
                                  - type: number
                                    minimum: 0
                                  - type: number
                                    minimum: 0
                                  - type: number
                                    minimum: 0
                                description: >-
                                  Per-corner radii [top-left, top-right,
                                  bottom-right, bottom-left]
                              borderColor:
                                type: string
                                minLength: 1
                                description: 'CSS color, e.g. #111827'
                              borderWidth:
                                type: number
                                minimum: 0
                            required:
                              - type
                              - children
                            additionalProperties: false
                            description: >-
                              A framed card. May hold leaf blocks and one level
                              of columns.
                  required:
                    - blocks
                  additionalProperties: false
                html:
                  description: >-
                    Hand-written HTML (the template becomes an HTML template).
                    Sanitized on save — scripts, event handlers and external
                    stylesheets are removed and listed in `removed`. Variables
                    use the same {{path}} grammar.
                  type: string
                  minLength: 1
                fromSenderId:
                  description: >-
                    Sender id to send From. Must be on the verified domain
                    (usableAsFrom in journeys_email_templates). Null/omitted =
                    the org default.
                  anyOf:
                    - type: string
                    - type: 'null'
                replyToSenderId:
                  description: Sender id for Reply-To. Null/omitted = the org default.
                  anyOf:
                    - type: string
                    - type: 'null'
                status:
                  description: >-
                    PUBLISHED makes it usable by SEND_EMAIL nodes; DRAFT
                    withdraws it, and journeys that send it will then fail to
                    send.
                  type: string
                  enum:
                    - DRAFT
                    - PUBLISHED
                confirm:
                  default: false
                  description: Must be true to change a template that is PUBLISHED.
                  type: boolean
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $schema: https://json-schema.org/draft/2020-12/schema
                type: object
                properties:
                  template:
                    type: object
                    properties:
                      id:
                        type: string
                      name:
                        type: string
                      subject:
                        type: string
                      status:
                        type: string
                        enum:
                          - DRAFT
                          - PUBLISHED
                        description: Only a PUBLISHED template can be sent by a journey.
                      authoringMode:
                        type: string
                        enum:
                          - BLOCKS
                          - CODE
                        description: BLOCKS = block builder; CODE = hand-written HTML.
                      updatedAt:
                        type: string
                        description: ISO timestamp.
                      variables:
                        type: array
                        items:
                          type: object
                          properties:
                            key:
                              type: string
                            path:
                              type: string
                          required:
                            - key
                            - path
                          additionalProperties: false
                        description: The {{path}} variables the subject and body use.
                      document:
                        anyOf:
                          - {}
                          - type: 'null'
                        description: >-
                          BLOCKS templates: the block document, in the same
                          shape `email_templates_update` accepts as `document`.
                          Null for CODE templates, and for a legacy template
                          saved before the block builder.
                      html:
                        anyOf:
                          - type: string
                          - type: 'null'
                        description: >-
                          CODE templates: the HTML source as authored. Null for
                          BLOCKS templates.
                      renderedHtml:
                        type: string
                        description: >-
                          The deliverable HTML, with {{path}} variables still
                          literal (they resolve at send).
                      text:
                        anyOf:
                          - type: string
                          - type: 'null'
                        description: The plain-text part.
                      fromSenderId:
                        anyOf:
                          - type: string
                          - type: 'null'
                      replyToSenderId:
                        anyOf:
                          - type: string
                          - type: 'null'
                    required:
                      - id
                      - name
                      - subject
                      - status
                      - authoringMode
                      - updatedAt
                      - variables
                      - document
                      - html
                      - renderedHtml
                      - text
                      - fromSenderId
                      - replyToSenderId
                    additionalProperties: false
                  removed:
                    type: array
                    items:
                      type: string
                    description: What the HTML sanitizer removed. Empty for block content.
                required:
                  - template
                  - removed
                additionalProperties: false
        '400':
          description: Validation failed or the request cannot proceed.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        description: Stable machine-readable error code (snake_case).
                      message:
                        type: string
                    required:
                      - code
                      - message
                required:
                  - error
        '401':
          description: Missing, malformed, or revoked API key.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        description: Stable machine-readable error code (snake_case).
                      message:
                        type: string
                    required:
                      - code
                      - message
                required:
                  - error
        '404':
          description: The resource does not exist in this organization.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        description: Stable machine-readable error code (snake_case).
                      message:
                        type: string
                    required:
                      - code
                      - message
                required:
                  - error
        '409':
          description: >-
            Conflicts with the current state (duplicates, wrong lifecycle
            state).
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        description: Stable machine-readable error code (snake_case).
                      message:
                        type: string
                    required:
                      - code
                      - message
                required:
                  - error
        '422':
          description: The request is well-formed but semantically invalid.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        description: Stable machine-readable error code (snake_case).
                      message:
                        type: string
                    required:
                      - code
                      - message
                required:
                  - error
        '429':
          description: Rate limit exceeded — retry after `Retry-After`.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        description: Stable machine-readable error code (snake_case).
                      message:
                        type: string
                    required:
                      - code
                      - message
                required:
                  - error
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        description: Stable machine-readable error code (snake_case).
                      message:
                        type: string
                    required:
                      - code
                      - message
                required:
                  - error
        '503':
          description: Transient error — retry with a narrower request.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        description: Stable machine-readable error code (snake_case).
                      message:
                        type: string
                    required:
                      - code
                      - message
                required:
                  - error
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'Organization API key, sent as `Authorization: Bearer boom_org_...`.'

````