> ## Documentation Index
> Fetch the complete documentation index at: https://docs.goliathdata.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Content Templates API

> Manage reusable email, SMS, and note templates and their folders through the Goliath developer API

## About

Manage the reusable message templates your workflows and outreach use —
create and edit EMAIL/SMS/NOTE templates (with `{{merge_fields}}`) and
organize them into folders.

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](/developer-api/overview).

## Operations

### Reading templates (`READ` scope)

| operationId                  | What it does                                                                |
| ---------------------------- | --------------------------------------------------------------------------- |
| `getContentTemplate`         | Fetch one template by id — name, type (`EMAIL`/`SMS`/`NOTE`), body, folder. |
| `listContentTemplates`       | List templates (optional `type`/`folderId` filter).                         |
| `listContentTemplateFolders` | List template folders (id, name, template count).                           |

### Writing templates (`WRITE` scope)

| operationId                   | What it does                                                                        |
| ----------------------------- | ----------------------------------------------------------------------------------- |
| `createContentTemplate`       | Create a template (type `EMAIL`/`SMS`/`NOTE`; body may include `{{merge_fields}}`). |
| `updateContentTemplate`       | Update a template by id (name/body/subject).                                        |
| `deleteContentTemplate`       | Delete a template by id.                                                            |
| `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 by id (its templates become ungrouped).                             |

<Note>
  Dynamic variables use the same merge-field syntax as the app's template
  editor — see [Content Templates](https://goliathdata.com/help/automations/content-templates/) for
  the available fields and how they resolve at send time. Email templates may
  store merge tags in both subject and body. Check that `renderContentTemplate` returns an
  empty `missingVariables` array before using a rendered message; sending
  itself happens in the app.
</Note>

<Note>
  **Organization guard**

  Template 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](/developer-api/authorization) for the model.
</Note>

## Example

```bash theme={null}
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](/developer-api/overview#discovering-operations).
