Skip to content

Update a template's properties

PATCH
/notifications/{notificationId}/{channel}/templates/{templateId}
curl --request PATCH \
--url https://api.pingram.io/notifications/example/example/templates/example \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "html": "example", "previewText": "example", "internal": "example", "subject": "example", "senderName": "example", "senderEmail": "example", "title": "example", "redirectURL": "example", "imageURL": "example", "instant": { "title": "example", "redirectURL": "example", "imageURL": "example" }, "batch": { "title": "example", "redirectURL": "example", "imageURL": "example" }, "text": "example", "message": "example", "icon": "example", "url": "example", "blocks": [ { "additionalProperty": "example" } ], "username": "example" }'
notificationId
required
string

Notification ID

channel
required
string

Channel type

templateId
required
string

Template ID

Media type application/json

Request body for updating a template. Include only properties that apply to the channel in the path. EMAIL: html, subject, senderName, etc. | INAPP_WEB: title, redirectURL, instant, batch | SMS/CALL: text | PUSH/WEB_PUSH: title, message, icon, url | SLACK: text, blocks, username, icon

object
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
Example generated
{
"html": "example",
"previewText": "example",
"internal": "example",
"subject": "example",
"senderName": "example",
"senderEmail": "example",
"title": "example",
"redirectURL": "example",
"imageURL": "example",
"instant": {
"title": "example",
"redirectURL": "example",
"imageURL": "example"
},
"batch": {
"title": "example",
"redirectURL": "example",
"imageURL": "example"
},
"text": "example",
"message": "example",
"icon": "example",
"url": "example",
"blocks": [
{
"additionalProperty": "example"
}
],
"username": "example"
}

Successful response

Media type application/json
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
Example
{
"channel": "EMAIL"
}

Bad Request - validation errors, invalid input

Media type application/json

Standard error response for API errors.

object
trackingId
required

Unique tracking ID for the request.

string
error
required

Structured error details for API error responses.

object
code
required

Machine-readable error code.

string
message
required

Human-readable error message.

string
fix

Actionable hint for fixing the error.

string
Example generated
{
"trackingId": "example",
"error": {
"code": "example",
"message": "example",
"fix": "example"
}
}

Unauthorized

Payment Required - usage limits exceeded

Media type application/json

Standard error response for API errors.

object
trackingId
required

Unique tracking ID for the request.

string
error
required

Structured error details for API error responses.

object
code
required

Machine-readable error code.

string
message
required

Human-readable error message.

string
fix

Actionable hint for fixing the error.

string
Example generated
{
"trackingId": "example",
"error": {
"code": "example",
"message": "example",
"fix": "example"
}
}

Internal Server Error

Bad Gateway - provider error

Media type application/json

Standard error response for API errors.

object
trackingId
required

Unique tracking ID for the request.

string
error
required

Structured error details for API error responses.

object
code
required

Machine-readable error code.

string
message
required

Human-readable error message.

string
fix

Actionable hint for fixing the error.

string
Example generated
{
"trackingId": "example",
"error": {
"code": "example",
"message": "example",
"fix": "example"
}
}