Skip to main content

About

Manage reusable EMAIL, SMS, NOTE, and TASK templates, combine tasks into a TASK_SET, and organize them into folders. Message bodies can contain merge fields such as {{firstName}} when the rendering context supports them. All operations go through the developer API gateway — one endpoint, called by operationId. If you haven’t set up a key yet, start with the Developer API Overview.

Operations

Reading templates (READ scope)

Writing templates (WRITE scope)

Folder responses

Content templates and library files share the same folders. The operation ids above stay the same, but their response fields use the library names below. These paths are relative to the HTTP response’s data object, or to the value returned by an SDK method: The list returns templateCounts with email, sms, note, task, and taskSet counts, plus a separate fileCount. It no longer returns a single templateCount. Creation returns id, name, parentFolderId, and displayOrder; rename returns id and name; deletion returns the remaining folders’ ids and names.

Task templates and sets

A TASK template stores its description in input.bodyContent and its task settings in input.taskConfig: title, optional taskType, dueOffset (amount, unit), preferredTimeOfDay (hour, minute, timezone), and optional auto-completion settings. Apply it with applyTaskTemplate in the Workflows API. A TASK_SET is a saved sequence of 1–25 steps. Leave bodyContent empty and taskConfig unset, and supply input.taskSetSteps, each containing a taskTemplateId, dueOffset, and preferredTimeOfDay. Each step must reference a TASK; a set cannot contain another set, and the same task template may appear more than once. Step timing overrides the task template’s own timing when the set is applied with applyTaskSet. getContentTemplate, listContentTemplates, createContentTemplate, and updateContentTemplate return taskSetSteps with each step’s id, referenced template id/name, relative offset, and preferred time of day.
Preview before deleting a referenced templateCall getDeletionImpact with targetKind: CONTENT_TEMPLATE and the template id. If it is referenced, pass the returned impactVersion and a same-type replacement through deleteContentTemplate.dependencyResolution. References are repointed before the template is deleted. A stale preview must be fetched again; an unreferenced template needs no resolution.
Merge fields use the vocabulary of the node that renders the template; templates have no domain of their own. Consult updateWorkflowGraph’s discovery detail for the supported keys. Keys are case-sensitive: {{firstName}} works with contact context, while {{contact.firstName}} does not. Email templates may store merge fields in subject and body. Check renderContentTemplate.missingVariables, and also check the rendered text: unknown tokens can remain as literal braces. Sending happens in the app.
Organization guardTemplate and folder operations are org-guarded on the ids you pass — a template id or folder id from another organization returns 403 forbidden. Listing and creating happen under your own org. See Authorization for the model.

Example

Full variable schemas, response shapes, and worked examples for every operation are available from the discovery endpoint.