1. Tasks
  2. Update Template

Tasks

Update Template

Updates a template programmatically. Useful for builder automation, template maintenance, generated configuration, and controlled template changes.

Basic usage

The below task adds a new action to the default context of the draft branch.

loading...

Parameters

templateuuid
required
string

UUID of the template to send the message to : ~~template.templateuuid

path
optional
string

The path inside template.branches to apply the changes to. Typically draft.contexts.default.parts.flow or similar.

WARNING

If no path is provided, the changes will be applied to template.branches, meaning it's possible to overwrite all existing branches.

operation
optional
string

The operation to perform on the data at path.

  • merge will merge the changes into the existing data at path
  • set will replace the existing data at path with changes

Defaults to merge.

changes
required
object

The changes to apply to the data at path.

validate_changes
optional
boolean

Whether to validate the provided changes against the schema for the target path before updating the template.

When set to true, the task returns a validation error if the payload does not match the expected structure.

Result

loading...

Examples

Updating template.data programmatically from a task

loading...