Skip to content

Create a new template for a notification

POST
/notifications/{notificationId}/{channel}/templates
notificationId
required
string

Notification ID

channel
required
string

Channel type

Request body for creating a template. Include templateId (required) plus any channel-specific fields for the channel in the path. Which fields apply depends on the channel (EMAIL, INAPP_WEB, SMS, PUSH, etc.).

object
templateId
required

Unique ID for this template within the notification and channel. Required.

string
html

HTML body of the email.

string
previewText

Preview text (e.g. for inbox).

string
internal

Internal editor representation of the email content (e.g. Bee or Redactor JSON). Used for editing and component embedding; the actual email sent to recipients uses the html field.

string
subject

Email subject line.

string
senderName

Sender display name.

string
senderEmail

Sender email address.

string
title

Notification title (in-app).

string
redirectURL

URL to open when the user taps the notification.

string
imageURL

Image URL shown in the in-app notification.

string
instant

Copy for instant (real-time) delivery.

object
title
string
redirectURL
string
imageURL
required
string
batch

Copy for batch delivery.

object
title
required
string
redirectURL
required
string
imageURL
required
string
text

Message text (SMS or call).

string
message

Push notification body text. (title is shared with INAPP_WEB above.)

string
icon

Web push: icon URL. Slack: bot icon (emoji or URL).

string
url

Web push: URL to open when the notification is clicked.

string
blocks

Slack message blocks (optional).

Array<object>
object
key
additional properties
username

Slack bot username.

string

Successful response

object
envId
required
string
notificationId
required
string
templateId
required
string
channel
required
string
Allowed values: EMAIL INAPP_WEB SMS CALL PUSH WEB_PUSH SLACK
default
required
boolean
isDefaultFor
object
key
additional properties
boolean

Bad Request

Unauthorized

Internal Server Error