GoliathDevelopersGet an API key
Guides / Content Templates API

Content Templates API

Manage reusable email, SMS, note, task, and task-set templates through the Goliath developer API

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)

operationId What it does
getContentTemplate Fetch one template by id — name, type, body, subject, folder, timestamps, and taskSetSteps for a task set.
listContentTemplates List templates (optional type/folderId filter), including task-set steps and each referenced task template’s id and name.
listContentTemplateFolders List shared content-library folders — id, name, parentFolderId, displayOrder, per-kind templateCounts, and fileCount. Counts cover each folder’s direct contents, excluding its descendants.

Writing templates (WRITE scope)

operationId What it does
createContentTemplate Create an EMAIL, SMS, NOTE, TASK, or TASK_SET template. The input carries its name and content or task configuration; the response includes saved task-set steps.
updateContentTemplate Update a template using its id nested in input. Returns the updated template, including task-set steps.
deleteContentTemplate Permanently delete a template and return the remaining templates. References in workflows or task sets require a dependencyResolution from getDeletionImpact with targetKind: CONTENT_TEMPLATE, including a replacement template of the same type.
moveContentTemplateToFolder Move a template into a folder (or null to ungroup).
createContentTemplateFolder Create a folder (optionally nested under parentFolderId).
renameContentTemplateFolder Rename a folder by id.
deleteContentTemplateFolder Delete a folder and all its subfolders. Templates and library files in those folders become ungrouped; they are not deleted.

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:

operationId Response path
listContentTemplateFolders workflowAutomationsQuery.libraryFolders
createContentTemplateFolder workflowAutomationsMutation.createLibraryFolder
renameContentTemplateFolder workflowAutomationsMutation.renameLibraryFolder
deleteContentTemplateFolder workflowAutomationsMutation.deleteLibraryFolder.libraryFolders

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.

Example

curl -X POST https://server.goliathdata.com/api/v1/call \
  -H "Authorization: Bearer gsk_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "operationId": "listContentTemplates", "variables": { "type": "SMS" } }'

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