latestSwagger 2.02026-08-10148196271.0 KB

afaab604b58c

templates

Create an in-app template

Create an in-app template if it doesn't exist yet, otherwise update all in-app templates that match the name provided.

post/api/templates/inapp/upsert

Request body

campaignDataFieldsobject

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.

clientTemplateIdstring required

ID used by the client to identify a template. If multiple templates exist with the ID, all will be updated

creatorUserIdstring

Specify a specific creator user id (email). The email must be an existing member of the project. Defaults to the organization creator.

expirationDateTimestring date-time

Absolute expiration of message

expirationDurationstring

Relative expiration of message

htmlstring

Html of the in-app notification

isDefaultLocaleboolean

Ask your Iterable CSM to enroll you in the beta for this feature.

Sets the locale associated with the request content as the template’s default. If empty or flexible default locales are not enabled for the project, the project’s default locale is assigned.

localestring

The locale for the content in this request. Leave empty for default locale. Iterable will automatically send the content with locale that matches a 'locale' field in the user profile.

messageTypeIdinteger

Message Type Id

namestring

Name of the template

Response

successful operation