Skip to content

Email & Templates

Email templates are the reusable HTML or plain-text content behind your outbound campaigns and automations. This API manages the templates saved in your account’s email builder — list them, create new ones, fetch a single template’s content, update it, or delete it.

Base URL: https://services.smbcrm.com · Version header: v3 · Scopes: emails/templates.readonly, emails/templates.write. See Scopes.

Every endpoint on this page takes your account/location ID as a path segment. See Base URL & Headers for where <location_id> comes from.

GET/emails/locations/{locationId}/templates

List email templates and folders saved in your account's email builder.

scope emails/templates.readonlyauth Location token or PIT

Page through results with limit and offset, or narrow the list with search, archived, and folderId.

Terminal window
curl "https://services.smbcrm.com/emails/locations/<location_id>/templates?limit=20&offset=0" \
-H "Authorization: Bearer <token>" \
-H "Version: v3"
200 OK
{
"items": [
{
"id": "<template_id>",
"name": "Welcome Email",
"type": "template",
"editorType": "html",
"isPlainText": false,
"updatedAt": "2026-06-02T10:15:00.000Z",
"createdAt": "2026-05-28T09:00:00.000Z"
}
],
"total": 1
}
Query param Type Required Description
limit number No Maximum number of items to return per page.
offset number No Number of items to skip, for pagination.
search string No Filter by template or folder name.
sortBy string No Field to sort by. Currently only updatedAt is supported.
sortOrder string No asc or desc.
archived boolean No Include or exclude archived templates.
folderId string No List the contents of a single folder.
include string No all, templates, or folders.
POST/emails/locations/{locationId}/templates

Create an email template in your account's email builder.

scope emails/templates.writeauth Location token or PIT

name and editorType are required. Send the template body as editorContent, along with the default subjectLine, fromName, and fromEmail for messages sent from it.

Terminal window
curl -X POST https://services.smbcrm.com/emails/locations/<location_id>/templates \
-H "Authorization: Bearer <token>" \
-H "Version: v3" \
-H "Content-Type: application/json" \
-d '{
"name": "Welcome Email",
"editorType": "html",
"editorContent": "<html>...</html>",
"subjectLine": "Welcome to Acme",
"fromName": "Acme Support",
"fromEmail": "[email protected]"
}'
201 Created
{
"id": "<template_id>",
"name": "Welcome Email",
"editorType": "html",
"isPlainText": false,
"fromName": "Acme Support",
"fromEmail": "[email protected]",
"subjectLine": "Welcome to Acme",
"createdAt": "2026-06-02T10:15:00.000Z",
"updatedAt": "2026-06-02T10:15:00.000Z"
}

editorType is html or text.

GET/emails/locations/{locationId}/templates/{templateId}

Get a single email template, including a link to its content.

scope emails/templates.readonlyauth Location token or PIT
Terminal window
curl https://services.smbcrm.com/emails/locations/<location_id>/templates/<template_id> \
-H "Authorization: Bearer <token>" \
-H "Version: v3"
200 OK
{
"id": "<template_id>",
"name": "Welcome Email",
"editorType": "html",
"isPlainText": false,
"fromName": "Acme Support",
"fromEmail": "[email protected]",
"subject": "Welcome to Acme",
"editorContentUrl": "https://storage.smbcrm.com/templates/<template_id>.html",
"deleted": false,
"createdAt": "2026-05-28T09:00:00.000Z",
"updatedAt": "2026-06-02T10:15:00.000Z"
}
PATCH/emails/locations/{locationId}/templates/{templateId}

Update an email template's content or metadata.

scope emails/templates.writeauth Location token or PIT

Send only the fields you want to change.

Terminal window
curl -X PATCH https://services.smbcrm.com/emails/locations/<location_id>/templates/<template_id> \
-H "Authorization: Bearer <token>" \
-H "Version: v3" \
-H "Content-Type: application/json" \
-d '{
"name": "Welcome Email (v2)",
"subjectLine": "Welcome to the Acme family"
}'
200 OK
{
"id": "<template_id>",
"name": "Welcome Email (v2)",
"archived": false,
"fromName": "Acme Support",
"fromEmail": "[email protected]",
"subjectLine": "Welcome to the Acme family",
"updatedAt": "2026-07-01T12:00:00.000Z"
}

Set archived to true to archive a template without deleting it; archived templates are excluded from List email templates unless you pass archived=true.

DELETE/emails/locations/{locationId}/templates/{templateId}

Delete an email template.

scope emails/templates.writeauth Location token or PIT
Terminal window
curl -X DELETE https://services.smbcrm.com/emails/locations/<location_id>/templates/<template_id> \
-H "Authorization: Bearer <token>" \
-H "Version: v3"
200 OK
{
"deleted": true
}