Create or Update Template

Changed on

Create a new template or update an existing one. If the template slug already exists, the template metadata is updated. Changes are saved to the draft version.

post/v2/{workspace}/template/{template_slug}/

Request

Path parameters

workspacestring required

Workspace slug.

template_slugstring required

Unique template slug. Used as the identifier for the template.

Request body

namestring

Template display name. Defaults to the slug when a new template is created without a name.

descriptionstring

Optional description for the template.

tagsstring[]

Tags for organising templates.

enabled_channelsstring[]

Channels to enable for this template.

Example request

{
  "name": "Order Confirmed",
  "description": "Sent when an order is placed",
  "tags": [
    "transactional"
  ],
  "enabled_channels": [
    "email",
    "sms"
  ]
}

Response

Template created successfully

object required

Changes

    • breaking

      response property detail list-of-types was widened by adding types array and object to media type application/json of response 401

    • breaking

      removed the success response with the status

    • warning

      the request property's maxLength was set to 128

    • info

      the request property became optional

    • info

      added the success response with the status

    • info

      added the success response with the status