Skip to main content

Create template

POST 

/api/v1/notifications/templates

Create a new message template with variable support.

Request Body

  • name (string, required): Template name. Max length: 200.
  • subject (string, optional): Message subject. Max length: 500. Used only by the email channel type as the email subject line.
  • content (string, required): Message body. Max length: 50000.
  • channelTypes (array, required): One or more channel types this template targets (e.g., email, teams, linemessage, webhook).
  • tags (array, optional): Tags for categorization.

Variable Syntax: {variableName}

Per-Channel Template Constraints

channelTypesubjectcontent
emailUsed as the email subject line; supports {variableName} substitutionUsed as the email body; supports plain text or HTML with {variableName} substitution
teamsIgnoredUsed as the Teams message body
linemessageIgnoredUsed as the LINE message text
webhookIgnoredUsed as the HTTP request body payload

Responses

  • 201 Created: Template created successfully.
  • 400 Bad Request: Validation error or invalid template variable syntax.
  • 409 Conflict: Template with same name exists.
  • 404 Not Found: Channel type not found.

Request

Responses

Template created successfully