---
title: "ReplaceEmailTemplateHtmlSection"
method: POST
path: "/channel/{id}/email-template/{templateId}/html-section"
tags: ["Email_templates"]
---

# ReplaceEmailTemplateHtmlSection

`POST /channel/{id}/email-template/{templateId}/html-section`

Replace marked email template HTML section

## Path parameters

- `id` string, required
- `templateId` string, required

## Request body

- object
  - `sections` object[] — <p>Multiple HTML blocks to inject between marker pairs.</p>
    - `html` string, required — <p>The new HTML block to inject between the markers.</p>
    - `startMarker` string, required — <p>Start marker in an editor element's content field.</p>
    - `endMarker` string, required — <p>End marker in an editor element's content field.</p>
  - `html` string — <p>Backward-compatible single HTML block to inject between the markers.</p>
  - `startMarker` string — <p>DAILY_BLOCK_START --&gt;] Backward-compatible single start marker.</p>
  - `endMarker` string — <p>DAILY_BLOCK_END --&gt;] Backward-compatible single end marker.</p>
  - `replaceAll` boolean — <p>Replace every matching marked section instead of only the first one.</p>
  - `processAsync` boolean — <p>Queue the update as a worker job. Set to false for immediate local testing.</p>

## Response `200`

Success-Response:

- object
  - `success` boolean, required — <p>True if the template was updated successfully.</p>
  - `jobId` string
  - `replacedSections` number, required — <p>Number of marked sections replaced.</p>

---

[API](https://skmtc.dev/cleverpush/apis/cleverpush-api-reference.md) · [All operations](https://skmtc.dev/cleverpush/apis/cleverpush-api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/cleverpush/cleverpush-api-reference/revisions/64ed799d2f1b/schema)
