---
title: "Update in-app template"
method: POST
path: "/api/templates/inapp/update"
tags: ["templates"]
---

# Update in-app template

`POST /api/templates/inapp/update`

## Request body

- ApiInAppTemplateModel
  - `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
  - `expirationDateTime` string, date-time — The in-app message's absolute expiration time. If set to a time before the campaign sends, contacts will never see the message. Format is <code>YYYY-MM-DD HH:MM:SS</code> (UTC timestamp, time zones not allowed). Default expiration is 90 days after send time. For more information, read <a href="https://support.iterable.com/hc/articles/360044425951">Creating In-App Templates</a>.
  - `expirationDuration` string — The in-app message's expiration time, relative to its send time. Should be an expression such as <code>now+90d</code>. Default expiration is 90 days after send time. For more information, read <a href="https://support.iterable.com/hc/articles/360044425951">Creating In-App Templates</a>.
  - `html` string — Html of the in-app notification
  - `inAppDisplaySettings` InAppDisplaySettings
    - `bgColor` BgColor
      - `alpha` number — The opacity range of the background between 0-1
      - `hex` string — The hex color of the background. Format: #FFFFFF
    - `bottom` InAppDisplaySetting
    - `left` InAppDisplaySetting
    - `right` InAppDisplaySetting
    - `shouldAnimate` boolean — Enables In App Animations
    - `top` InAppDisplaySetting
  - `inboxMetadata` InboxMetadata
    - `icon` string — The icon to display in the inbox
    - `subtitle` string — The subtitle to display in the inbox
    - `title` string — The title to display in the inbox
  - `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
  - `templateId` integer, required — In-app template ID
  - `webInAppDisplaySettings` WebInAppDisplaySettings
    - `position` PositionOption

## 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)
