Email & Templates
Email templates are the reusable HTML or plain-text content behind your outbound campaigns and automations. This API manages the templates and template folders saved in your account’s email builder: list them, create new ones, import one from another email provider, fetch a template’s content, update it, or delete it. It also creates, edits, schedules, and deletes email campaigns, reads the email campaigns that workflows and bulk actions send, and returns delivery statistics for email, workflow, and bulk action campaigns.
Base URL: https://services.smbcrm.com · Version header: v3 ·
Scopes: emails/templates.readonly / emails/templates.write (templates and folders),
emails/campaigns.readonly / emails/campaigns.write (campaigns), and
emails/stats.readonly (statistics). 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. Responses
carry a traceId that identifies the request.
List email templates
Section titled “List email templates”Page through results with limit and offset, or narrow the list with search,
archived, and folderId. A page holds at most 20 items, so for a longer list, step
offset forward until you have read total items.
curl "https://services.smbcrm.com/emails/locations/<location_id>/templates?limit=20&offset=0" \ -H "Authorization: Bearer <token>" \ -H "Version: v3"{ "items": [ { "id": "<template_id>", "name": "Welcome Email", "type": "template", "editorType": "html", "isPlainText": false, "previewUrl": "<preview_url>", "updatedAt": "2026-06-02T10:15:00.000Z", "createdAt": "2026-05-28T09:00:00.000Z" }, { "id": "<folder_id>", "name": "Spring Campaigns", "type": "folder", "childCount": 3, "hasChildren": true, "updatedAt": "2026-06-01T08:30:00.000Z", "createdAt": "2026-05-20T14:00:00.000Z" } ], "total": 2, "traceId": "<trace_id>"}| Query param | Type | Required | Description |
|---|---|---|---|
limit |
number | No | Number of items to return, 1 to 20. Default 10. |
offset |
number | No | Number of items to skip. Default 0. |
search |
string | No | Search by template name. |
sortBy |
string | No | Field to sort by. Only updatedAt is supported, and it is the default. |
sortOrder |
string | No | asc or desc. Default desc. |
archived |
boolean | No | Return archived templates. Default false. |
folderId |
string | No | List the contents of a single folder. Use root for the top level. |
include |
string | No | templates returns only templates, folders returns only folders, and all returns both. Default all. |
Only id, name, and type are always present on a list item. The other fields depend on
the item’s type.
| Field | Type | Description |
|---|---|---|
id |
string | Template or folder ID. |
name |
string | Template or folder name. |
type |
string | template or folder. |
editorType |
string | html, builder, or text. Templates only. |
isPlainText |
boolean | Whether the template is plain text. Templates only. |
previewUrl |
string | Preview URL. Templates only. |
parentFolderId |
string | ID of the folder that holds the item. |
childCount |
number | Number of items in the folder. Folders only. |
hasChildren |
boolean | Whether the folder has items in it. Folders only. |
createdAt |
string | ISO 8601 creation time. |
updatedAt |
string | ISO 8601 time of the last update. |
Create an email template
Section titled “Create an email template”name and editorType are required, and every other field is optional. Send the template
body as editorContent, along with the default subjectLine, fromName, and fromEmail
for messages sent from it. Leave out editorContent to create a blank template and fill it
in later with an update.
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>", "parentFolderId": "<folder_id>", "subjectLine": "Welcome to Acme", "fromName": "Acme Support", "fromEmail": "support@example.com", "previewText": "Thanks for signing up" }'{ "id": "<template_id>", "name": "Welcome Email", "editorType": "html", "isPlainText": false, "parentFolderId": "<folder_id>", "fromName": "Acme Support", "fromEmail": "support@example.com", "subjectLine": "Welcome to Acme", "previewText": "Thanks for signing up", "previewUrl": "<preview_url>", "createdAt": "2026-06-02T10:15:00.000Z", "updatedAt": "2026-06-02T10:15:00.000Z", "traceId": "<trace_id>"}| Body field | Type | Required | Description |
|---|---|---|---|
name |
string | Yes | Template name. |
editorType |
string | Yes | html for a code-editor template or text for a plain-text template. |
editorContent |
string | No | Initial HTML or plain-text content. |
parentFolderId |
string | No | Create the template inside this folder. |
subjectLine |
string | No | Default email subject line. |
fromName |
string | No | Default sender name. |
fromEmail |
string | No | Default sender email address. |
previewText |
string | No | Preview text that appears after the subject line in the inbox. |
userId |
string | No | ID of the user performing the action. |
Retrieve an email template
Section titled “Retrieve an email template”curl https://services.smbcrm.com/emails/locations/<location_id>/templates/<template_id> \ -H "Authorization: Bearer <token>" \ -H "Version: v3"{ "id": "<template_id>", "name": "Welcome Email", "editorType": "html", "isPlainText": false, "parentFolderId": "<folder_id>", "fromName": "Acme Support", "fromEmail": "support@example.com", "subject": "Welcome to Acme", "previewText": "Thanks for signing up", "editorContentUrl": "https://<storage_host>/<path>.html", "deleted": false, "createdAt": "2026-05-28T09:00:00.000Z", "updatedAt": "2026-06-02T10:15:00.000Z", "traceId": "<trace_id>"}Update an email template
Section titled “Update an email template”Send only the fields you want to change. To change the body, send editorContent together
with editorType (html or text) in the same request.
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" }'To replace the body, send both content fields:
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 '{ "editorType": "html", "editorContent": "<html><body>Welcome aboard.</body></html>" }'{ "id": "<template_id>", "name": "Welcome Email (v2)", "archived": false, "fromName": "Acme Support", "fromEmail": "support@example.com", "subjectLine": "Welcome to the Acme family", "previewText": "Thanks for signing up", "previewUrl": "<preview_url>", "updatedAt": "2026-07-01T12:00:00.000Z", "traceId": "<trace_id>"}| Body field | Type | Required | Description |
|---|---|---|---|
name |
string | No | Template name. |
editorContent |
string | No | New HTML or plain-text content. Send it together with editorType. |
editorType |
string | No | html or text. Send it together with editorContent. |
previewText |
string | No | Preview text that appears after the subject line in the inbox. |
subjectLine |
string | No | Default email subject line. |
fromName |
string | No | Default sender name. |
fromEmail |
string | No | Default sender email address. |
archived |
boolean | No | Whether the template is archived. |
parentFolderId |
string | No | Move the template into this folder. Send null to move it to the top level. |
userId |
string | No | ID of the user performing the action. |
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 an email template
Section titled “Delete an email template”curl -X DELETE https://services.smbcrm.com/emails/locations/<location_id>/templates/<template_id> \ -H "Authorization: Bearer <token>" \ -H "Version: v3"{ "deleted": true, "traceId": "<trace_id>"}Create a template folder
Section titled “Create a template folder”Folders group templates in the email builder. name is required. Pass the folder’s id as
parentFolderId when you create, import, or move a template, and as folderId when you
list templates.
curl -X POST https://services.smbcrm.com/emails/locations/<location_id>/templates/folders \ -H "Authorization: Bearer <token>" \ -H "Version: v3" \ -H "Content-Type: application/json" \ -d '{ "name": "Spring Campaigns" }'{ "id": "<folder_id>", "name": "Spring Campaigns", "createdAt": "2026-06-02T10:15:00.000Z", "updatedAt": "2026-06-02T10:15:00.000Z", "traceId": "<trace_id>"}| Body field | Type | Required | Description |
|---|---|---|---|
name |
string | Yes | Folder name. |
userId |
string | No | ID of the user performing the action. |
Import an email template
Section titled “Import an email template”importProvider and importUrl are required. The import works from a public template URL,
so it supports only the providers listed below. The response has the same fields as
Create an email template.
curl -X POST https://services.smbcrm.com/emails/locations/<location_id>/templates/import \ -H "Authorization: Bearer <token>" \ -H "Version: v3" \ -H "Content-Type: application/json" \ -d '{ "importProvider": "mailchimp", "importUrl": "https://templates.example.com/public/template-123", "name": "Imported Template", "parentFolderId": "<folder_id>" }'{ "id": "<template_id>", "name": "Imported Template", "editorType": "html", "isPlainText": false, "parentFolderId": "<folder_id>", "previewUrl": "<preview_url>", "createdAt": "2026-06-02T10:15:00.000Z", "updatedAt": "2026-06-02T10:15:00.000Z", "traceId": "<trace_id>"}| Body field | Type | Required | Description |
|---|---|---|---|
importProvider |
string | Yes | mailchimp or active_campaign. |
importUrl |
string | Yes | Public URL of the template to import. |
name |
string | No | Name for the imported template. |
parentFolderId |
string | No | Folder to import the template into. |
userId |
string | No | ID of the user performing the action. |
Email campaigns
Section titled “Email campaigns”An email campaign sends one email to the contacts you select when you schedule it. Create the
campaign, edit its content, then schedule it. You can update a campaign only while it is a
draft, and you can schedule it only from draft, cancelled, or paused status.
A campaign’s status is draft, scheduled, processing, sent, paused, cancelled,
failed, or archived. Reads need emails/campaigns.readonly. Create, update, schedule, and
delete need emails/campaigns.write.
List email campaigns
Section titled “List email campaigns”Page through results with limit (1 to 20, default 10) and offset (default 0). Filter
with search, which matches the campaign name, and status: all, sent, failed,
archived, draft, processing, scheduled, cancelled, or paused.
curl "https://services.smbcrm.com/emails/locations/<location_id>/campaigns/emails?limit=10&offset=0&status=sent" \ -H "Authorization: Bearer <token>" \ -H "Version: v3"{ "campaigns": [ { "id": "<campaign_id>", "source": "email-campaign", "sourceId": "<source_id>", "name": "February Newsletter", "status": "sent", "campaignType": "bulk-email", "deleted": false, "createdAt": "2026-02-01T11:55:43.598Z", "updatedAt": "2026-02-09T04:49:12.322Z" } ], "total": 1, "traceId": "<trace_id>"}Every campaign response uses these fields. Only id, deleted, createdAt, and updatedAt
are always present.
| Field | Type | Description |
|---|---|---|
id |
string | Campaign ID. |
name |
string | Campaign name. |
status |
string | draft, scheduled, processing, sent, paused, cancelled, failed, or archived. |
source |
string | Source of the campaign. |
sourceId |
string | ID to pass to the statistics endpoint. |
campaignType |
string | Delivery type of the campaign. |
campaignCategory |
string | Category of the campaign. |
variations |
array | A/B test campaigns only. Each entry has sourceId, which you pass to the statistics endpoint for that variation, and isWinner. |
deleted |
boolean | Whether the campaign is deleted. |
createdAt |
string | ISO 8601 creation time. |
updatedAt |
string | ISO 8601 time of the last update. |
Create an email campaign
Section titled “Create an email campaign”name, editorType, timeZone, and userId are required. Pass templateId to start from
an existing template, or leave it out to create a blank campaign. To
set the content in the same request, send editorContent.
curl -X POST https://services.smbcrm.com/emails/locations/<location_id>/campaigns/emails \ -H "Authorization: Bearer <token>" \ -H "Version: v3" \ -H "Content-Type: application/json" \ -d '{ "name": "October Newsletter", "editorType": "html", "templateId": "<template_id>", "timeZone": "America/New_York", "userId": "<user_id>" }'{ "id": "<campaign_id>", "name": "October Newsletter", "status": "draft", "deleted": false, "createdAt": "2026-10-08T14:00:00.000Z", "updatedAt": "2026-10-08T14:00:00.000Z", "traceId": "<trace_id>"}| Body field | Type | Required | Description |
|---|---|---|---|
name |
string | Yes | Campaign name. |
editorType |
string | Yes | html for a code-editor campaign or text for a plain-text campaign. |
timeZone |
string | Yes | Time zone for the campaign, such as America/New_York. |
userId |
string | Yes | ID of the user performing the action. |
templateId |
string | No | Existing template to create the campaign from. |
editorContent |
string | No | Initial HTML or plain-text content, saved right after the campaign is created. |
parentFolderId |
string | No | Parent folder ID. |
userName |
string | No | Name of the user performing the action. |
Retrieve an email campaign
Section titled “Retrieve an email campaign”In addition to the fields above, a single campaign returns editorType (html, builder,
or text), isPlainText, fromName, fromEmail, subject, replyToAddress, and
previewText. As with templates, the body reads back as editorContentUrl, a link you
fetch with a GET request.
curl https://services.smbcrm.com/emails/locations/<location_id>/campaigns/emails/<campaign_id> \ -H "Authorization: Bearer <token>" \ -H "Version: v3"{ "id": "<campaign_id>", "source": "email-campaign", "sourceId": "<source_id>", "name": "October Newsletter", "status": "sent", "editorType": "html", "isPlainText": false, "editorContentUrl": "https://<storage_host>/<path>.html", "fromName": "Acme Support", "fromEmail": "support@example.com", "subject": "Our October newsletter", "replyToAddress": "reply@example.com", "previewText": "What's new this month", "deleted": false, "createdAt": "2026-09-20T14:00:00.000Z", "updatedAt": "2026-09-25T09:00:00.000Z", "traceId": "<trace_id>"}Update an email campaign
Section titled “Update an email campaign”Send only the fields you want to change. To change the content, send editorContent
together with editorType (html or text). Set the sender, subject, and preview text when
you schedule the campaign.
curl -X PATCH https://services.smbcrm.com/emails/locations/<location_id>/campaigns/emails/<campaign_id> \ -H "Authorization: Bearer <token>" \ -H "Version: v3" \ -H "Content-Type: application/json" \ -d '{ "name": "October Newsletter (final)", "editorType": "html", "editorContent": "<html><body>Hello from October.</body></html>" }'{ "id": "<campaign_id>", "name": "October Newsletter (final)", "status": "draft", "deleted": false, "createdAt": "2026-10-08T14:00:00.000Z", "updatedAt": "2026-10-08T14:20:00.000Z", "traceId": "<trace_id>"}| Body field | Type | Required | Description |
|---|---|---|---|
name |
string | No | Campaign name. |
editorContent |
string | No | New HTML or plain-text content. Send it together with editorType. |
editorType |
string | No | html or text. Send it together with editorContent. |
userId |
string | No | ID of the user performing the action. |
Delete an email campaign
Section titled “Delete an email campaign”curl -X DELETE https://services.smbcrm.com/emails/locations/<location_id>/campaigns/emails/<campaign_id> \ -H "Authorization: Bearer <token>" \ -H "Version: v3"{ "deleted": true, "traceId": "<trace_id>"}Schedule an email campaign
Section titled “Schedule an email campaign”The campaign must be in draft, cancelled, or paused status. scheduleType,
timeZone, userId, emailMeta, and recipients are required. This example sends a
campaign to two contacts at a set time:
curl -X POST https://services.smbcrm.com/emails/locations/<location_id>/campaigns/emails/<campaign_id>/schedule \ -H "Authorization: Bearer <token>" \ -H "Version: v3" \ -H "Content-Type: application/json" \ -d '{ "scheduleType": "scheduled", "timeZone": "America/New_York", "userId": "<user_id>", "emailMeta": { "subject": "Our October newsletter", "fromName": "Acme Support", "fromEmail": "support@example.com" }, "recipients": { "type": "contact", "contactIds": ["<contact_id>", "<contact_id>"] }, "scheduleConfig": { "sendAt": "2026-10-15 09:00 AM", "tracking": { "clickTracking": true } } }'{ "campaignId": "<campaign_id>", "sourceId": "<source_id>", "traceId": "<trace_id>"}sourceId is the ID you pass to the statistics endpoint. It can be
null.
| Body field | Type | Required | Description |
|---|---|---|---|
scheduleType |
string | Yes | immediate, scheduled, batch, rss, or smart_send. |
timeZone |
string | Yes | IANA time zone, such as America/New_York. |
userId |
string | Yes | ID of the user performing the action. |
userName |
string | No | Name of the user performing the action. |
emailMeta |
object | Yes | Subject and sender details. See the table below. |
recipients |
object | Yes | Who receives the email. See the table below. |
sendDays |
string[] | No | Days of the week sending is allowed: Mon, Tue, Wed, Thu, Fri, Sat, or Sun. Used for batch and rss. |
scheduleConfig |
object | Required unless scheduleType is rss |
Timing, batching, tracking, and resend options. |
rssConfig |
object | Required when scheduleType is rss |
RSS feed settings. |
abTestConfig |
object | No | A/B test settings. Works with every scheduleType except rss. |
emailMeta fields:
| Field | Type | Required | Description |
|---|---|---|---|
subject |
string | Yes | Email subject line. |
fromName |
string | Yes | Sender display name. |
fromEmail |
string | Yes | Sender email address. |
replyToAddress |
string | No | Reply-to email address. |
previewText |
string | No | Preview text that appears after the subject line in the inbox. |
attachments |
string[] | No | Download URLs of files to attach. |
recipients fields:
| Field | Type | Required | Description |
|---|---|---|---|
type |
string | Yes | contact, tag, or segment. |
contactIds |
string[] | When type is contact |
Contact IDs to send to. |
tagIds |
string[] | When type is tag |
Tag IDs to select recipients by. |
segment |
string | When type is segment |
A prebuilt segment: engaged_last_7_days, engaged_last_30_days, engaged_last_60_days, engaged_last_5_campaigns, or unengaged_last_5_campaigns. |
freezeList |
boolean | No | Freeze the recipient list at schedule time, so contacts that match later are not added. Default true. |
The three config objects take these fields:
| Field | Type | Required | Description |
|---|---|---|---|
scheduleConfig.sendAt |
string | For scheduled, batch, and smart_send |
Date and time to send, such as 2026-04-01 09:00 AM. Ignored for immediate. |
scheduleConfig.batch.batchSize |
number | When scheduleType is batch |
Number of contacts to process per batch. |
scheduleConfig.batch.interval |
number | When scheduleType is batch |
Delay between batches. |
scheduleConfig.batch.intervalUnit |
string | When scheduleType is batch |
minutes, hours, or days. |
scheduleConfig.batch.skipDays |
string[] | No | Days to skip sending, using the same day names as sendDays. |
scheduleConfig.batch.windowStart |
string | No | Earliest time to send batches, such as 09:00 AM. |
scheduleConfig.batch.windowEnd |
string | No | Latest time to send batches, such as 05:00 PM. |
scheduleConfig.tracking.clickTracking |
boolean | No | Track clicks on links. |
scheduleConfig.tracking.utmTracking |
boolean | No | Add UTM parameters to links. |
scheduleConfig.resend.enabled |
boolean | No | Resend to contacts who did not open the email. |
scheduleConfig.resend.waitHours |
number | When resend.enabled is true |
Hours to wait before resending. |
scheduleConfig.resend.subject |
string | No | Subject line to use for the resend. |
scheduleConfig.emailPreferenceId |
string | No | Email preference type ID used to categorize the campaign. |
rssConfig.name |
string | Yes | RSS schedule name. |
rssConfig.rssFeedURL |
string | Yes | RSS feed URL. |
rssConfig.repeatAfter |
string | Yes | How often to check the feed: every_day, every_week, or every_month. |
rssConfig.repeatAfterTime |
string | Yes | Time of day to run, such as 09:00 AM. |
rssConfig.rssFeedLimit |
number | No | Maximum number of feed items per email. |
rssConfig.startAtDay |
string | No | Day of the week for weekly feeds, Monday through Sunday. |
rssConfig.startAtMonthDay |
string | No | Day of the month for monthly feeds, such as 15. |
rssConfig.firstExecutionDate |
string | No | Override the first run, such as 2026-04-01 10:00:00. |
abTestConfig.testType |
string | Yes | What to test: emailContent or subjectLine. |
abTestConfig.testDuration |
number | Yes | Seconds to run the test before picking a winner. |
abTestConfig.variationCount |
number | Yes | Number of variations. |
abTestConfig.testSize |
number | Yes | Percentage of contacts in the test group, 0 to 100. |
abTestConfig.winningCriteria |
string | Yes | How to pick the winner: openRate or clickRate. |
abTestConfig.variations |
array | Yes | One entry per variation, each with a subject and an optional documentId (the template or document ID for that variation). |
A field marked required under rssConfig or abTestConfig is required only when you send
that object.
Workflow and bulk action campaigns
Section titled “Workflow and bulk action campaigns”These endpoints are read-only. They list the email campaigns that workflows and bulk actions
send, and they return the IDs the statistics endpoint needs. All four
require emails/campaigns.readonly. limit (1 to 20, default 10) and offset (default
0) page through the lists, and search takes a query to filter the list.
List workflow campaigns
Section titled “List workflow campaigns”Filter with status, which is published or draft.
curl "https://services.smbcrm.com/emails/locations/<location_id>/campaigns/workflows?limit=10&offset=0&status=published" \ -H "Authorization: Bearer <token>" \ -H "Version: v3"{ "campaigns": [ { "id": "<campaign_id>", "name": "New lead follow-up", "status": "published", "source": "workflow", "sourceId": "<source_id>", "deleted": false, "createdAt": "2025-12-12T08:24:46.700Z", "updatedAt": "2026-01-23T05:58:48.453Z" } ], "total": 1, "traceId": "<trace_id>"}Retrieve a workflow campaign
Section titled “Retrieve a workflow campaign”subSources lists the email-sending steps in the workflow. Pass a step’s id as
subSourceId to the statistics endpoint to get that step’s numbers.
Each step has id, name, subject, fromName, fromEmail, previewText, editorType
(html, builder, or text), isPlainText, editorContentUrl, createdAt, and
updatedAt. Only id is always present.
curl https://services.smbcrm.com/emails/locations/<location_id>/campaigns/workflows/<campaign_id> \ -H "Authorization: Bearer <token>" \ -H "Version: v3"{ "id": "<campaign_id>", "name": "New lead follow-up", "status": "published", "source": "workflow", "sourceId": "<source_id>", "subSources": [ { "id": "<step_id>", "name": "Send welcome email", "subject": "Welcome to Acme", "fromName": "Acme Support", "fromEmail": "support@example.com", "previewText": "Thanks for signing up", "editorType": "html", "isPlainText": false, "editorContentUrl": "https://<storage_host>/<path>.html", "createdAt": "2025-12-12T08:24:46.700Z", "updatedAt": "2026-01-23T05:58:48.453Z" } ], "deleted": false, "createdAt": "2025-12-12T08:24:46.700Z", "updatedAt": "2026-01-23T05:58:48.453Z", "traceId": "<trace_id>"}List bulk action campaigns
Section titled “List bulk action campaigns”Filter with status (processing, scheduled, paused, complete, or cancelled) and
with dateFrom and dateTo, both ISO 8601 date-times.
curl "https://services.smbcrm.com/emails/locations/<location_id>/campaigns/bulk-actions?status=complete&dateFrom=2026-09-01T00:00:00.000Z&dateTo=2026-09-30T23:59:59.999Z" \ -H "Authorization: Bearer <token>" \ -H "Version: v3"{ "campaigns": [ { "id": "<campaign_id>", "source": "email-marketing", "sourceId": "<source_id>", "name": "September promo", "status": "complete", "scheduleType": "SCHEDULED", "deleted": false, "createdAt": "2026-09-10T11:55:43.598Z", "updatedAt": "2026-09-12T04:49:12.322Z", "completedAt": "2026-09-12T04:49:12.000Z", "emailMetadata": { "subject": "Our September promotion", "from": "Acme Support <support@example.com>", "name": "Acme Support", "templateId": "<template_id>" } } ], "total": 1, "traceId": "<trace_id>"}scheduleType is NOW, SCHEDULED, or DRIP. id, status, deleted, createdAt, and
updatedAt are always present.
Retrieve a bulk action campaign
Section titled “Retrieve a bulk action campaign”curl https://services.smbcrm.com/emails/locations/<location_id>/campaigns/bulk-actions/<campaign_id> \ -H "Authorization: Bearer <token>" \ -H "Version: v3"{ "id": "<campaign_id>", "source": "email-marketing", "sourceId": "<source_id>", "name": "September promo", "status": "complete", "scheduleType": "SCHEDULED", "fromName": "Acme Support", "fromEmail": "support@example.com", "subject": "Our September promotion", "replyToAddress": "reply@example.com", "previewText": "Save on your next order", "editorType": "html", "isPlainText": false, "editorContentUrl": "https://<storage_host>/<path>.html", "deleted": false, "createdAt": "2026-09-10T11:55:43.598Z", "updatedAt": "2026-09-12T04:49:12.322Z", "completedAt": "2026-09-12T04:49:12.000Z", "traceId": "<trace_id>"}Campaign statistics
Section titled “Campaign statistics”One endpoint serves all three campaign types. source picks the type, and sourceId is the
sourceId field of that campaign, which you find in the list and retrieve responses above
and in the schedule response.
source |
sourceId is the sourceId of |
|---|---|
email-campaigns |
An email campaign. For an A/B test, use a variation’s sourceId to read that variation. |
workflow-campaigns |
A workflow campaign. |
bulk-actions |
A bulk action campaign. |
To narrow a workflow campaign to one email step, add subSourceId as a query parameter, using
a step id from Retrieve a workflow campaign. subSourceId
is valid only when source is workflow-campaigns.
curl https://services.smbcrm.com/emails/locations/<location_id>/campaigns/stats/email-campaigns/<source_id> \ -H "Authorization: Bearer <token>" \ -H "Version: v3"curl "https://services.smbcrm.com/emails/locations/<location_id>/campaigns/stats/workflow-campaigns/<source_id>?subSourceId=<step_id>" \ -H "Authorization: Bearer <token>" \ -H "Version: v3"curl https://services.smbcrm.com/emails/locations/<location_id>/campaigns/stats/bulk-actions/<source_id> \ -H "Authorization: Bearer <token>" \ -H "Version: v3"{ "locationId": "<location_id>", "source": "email-campaigns", "sourceId": "<source_id>", "stats": { "sent": 1020, "accepted": 5, "delivered": 1000, "opened": 450, "clicked": 120, "unsubscribed": 5, "complained": 2, "permanentFail": 15, "temporaryFail": 3, "rejected": 10, "failed": 5, "replied": 25, "openRate": 45, "clickRate": 12, "unsubscribeRate": 0.5, "complaintRate": 0.2, "bounceRate": 1.76, "replyRate": 2.5 }, "traceId": "<trace_id>"}The response echoes locationId, source, and sourceId, and adds subSourceId when you
send one. Every field in stats is present:
| Field | Description |
|---|---|
sent |
Total emails sent (delivered, accepted, and bounced). |
accepted |
Emails accepted by the mail server. |
delivered |
Emails delivered to the inbox. |
opened |
Emails opened. |
clicked |
Links clicked. |
unsubscribed |
Unsubscribes. |
complained |
Spam complaints. |
permanentFail |
Hard bounces. |
temporaryFail |
Soft bounces. |
rejected |
Rejected emails. |
failed |
Failed emails. |
replied |
Replies received. |
openRate, clickRate, unsubscribeRate, complaintRate, replyRate |
Percentages of delivered. |
bounceRate |
Percentage of sent. |
Related
Section titled “Related”- Conversations & Messages: send email and SMS to contacts.
- Contacts: the contact IDs you select as campaign recipients.
- Custom Fields, Values & Tags: personalize templates with custom values, and find the tag IDs that select campaign recipients.
- Users: the team member IDs that campaign requests require as
userId. - Locations: other settings and resources on your account, including the saved SMS, email, and WhatsApp templates.
