---
title: "Update embedded message template"
method: POST
path: "/api/templates/embedded/update"
tags: ["templates"]
---

# Update embedded message template

`POST /api/templates/embedded/update`

## Request body

- ApiEmbeddedTemplateModel
  - `body` string — Body text of the embedded message
  - `campaignDataFields` object — Campaign-level data fields available as {{field}} merge parameters during message rendering. These fields are overridden by user and event data fields of the same name.
  - `campaignId` integer — Campaign ID
  - `clientTemplateId` string — Client template ID. Used as a secondary key to reference the template
  - `elements` Elements
    - `buttons` Button[] — Buttons to display with the embedded message. Each template may have up to two buttons with associated open URLs or custom actions.
      - `action` Action
        - `data` string — For URL actions, this field is a full URL. For custom actions, it's an empty string.
        - `type` string — For URL actions, this field is <code>openUrl</code>. For custom actions, it's the full URL of the custom action.
      - `id` string — ID of the button.
      - `title` string — Text to display on the button.
    - `defaultAction` Action
      - `data` string — For URL actions, this field is a full URL. For custom actions, it's an empty string.
      - `type` string — For URL actions, this field is <code>openUrl</code>. For custom actions, it's the full URL of the custom action.
    - `mediaUrl` string — URL for image or video content to display in the embedded message.
    - `mediaUrlCaption` string — Alt text for the media specified by <code>mediaUrl</code>.
    - `text` Text[] — Custom text fields for the template. Each custom text field has a <code>label</code> key that is predefined by the template's associated placement, and a configurable <code>text</code> value.
      - `label` string — Identifier for the text field, specified by the user who created its associated placement. This field is a key, not content. Do not display it.
      - `text` string — Text to display.
  - `isDefaultLocale` boolean — Ask your Iterable CSM to enroll you in the beta for this feature. Identifies if the locale associated with the response is the template's default. If empty or flexible default locales are not enabled for the project, the project's default locale is assigned.
  - `locale` string — The locale for the content in this request. Leave empty for default locale. Iterable automatically sends the content with a locale that matches a user profile's <code>locale</code> field.
  - `messageTypeId` integer — Message type ID
  - `name` string — Name of the template
  - `payload` object — Payload
  - `placementId` object — Placement ID that this template is associated with
  - `templateId` integer, required — Embedded message template ID
  - `title` string — Title of the embedded message

## Response `200`

successful operation

## Other responses

- `400` — Invalid parameters
- `401` — Invalid API key

---

[API](https://skmtc.net/iterable/apis/iterable-api.md) · [All operations](https://skmtc.net/iterable/apis/iterable-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/iterable/iterable-api/revisions/afaab604b58c/schema)
