DevelopersAPI referenceEngagement

Message templates API

REST endpoints for message templates in SKUFlow: 7 operations with parameters, request and response fields, permissions and curl examples.

Base URL: https://app.skuflow.ai/api. Every call needs Authorization: Bearer skf_… (Authentication); {organizationId} ($ORGANIZATION_ID in the examples) is your business's id.

OperationEndpointRisk
List message templatesGET /organizations/{organizationId}/message-templatesread
Create a message templatePOST /organizations/{organizationId}/message-templateswrite
List the merge fieldsGET /organizations/{organizationId}/message-templates/merge-fieldsread
Get a message templateGET /organizations/{organizationId}/message-templates/{templateId}read
Edit a message templatePATCH /organizations/{organizationId}/message-templates/{templateId}write
Delete a message templateDELETE /organizations/{organizationId}/message-templates/{templateId}sensitive
Preview a messagePOST /organizations/{organizationId}/message-templates/previewwrite

List message templates

GET /organizations/{organizationId}/message-templates

Email and text templates, the presets' (system: editable, not deletable) first. Read-only.

Permissionengagement.read (Owner, Admin, Staff)
Riskread, OAuth scope skuflow.read. Read: reads only.
MCP toolmessageTemplates_list (toolset marketing)

Parameters

NameInTypeRequiredDescription
channelqueryenumNoOne of EMAIL, SMS.

Example

curl "https://app.skuflow.ai/api/organizations/$ORGANIZATION_ID/message-templates" \
  -H "Authorization: Bearer $SKUFLOW_API_KEY"

Response

200: the answer's fields

An array of objects:

FieldTypeDescription
idstring
namestring
descriptionstring or null
channelenumOne of EMAIL, SMS.
purposeenumOne of TRANSACTIONAL, MARKETING.
subjectstring or null
bodystring
placeholdersarray of string
variantsarray of object
categorystring or null
isSystemboolean
systemKeystring or null
updatedAtstringISO 8601 time (UTC).

Create a message template

POST /organizations/{organizationId}/message-templates

A reusable email or text. Nothing is sent: automations and the send dialogs use templates. Email needs a subject.

Permissionengagement.manage (Owner, Admin)
Riskwrite, OAuth scope skuflow.write. Write: creates or changes records inside the business; nothing leaves it.
MCP toolmessageTemplates_create (toolset marketing)

Request body

FieldTypeRequiredDescription
namestringYesUp to 200 characters.
descriptionstring or nullNoUp to 1000 characters.
channelenumYesOne of EMAIL, SMS.
purposeenumNoOne of TRANSACTIONAL, MARKETING. Default TRANSACTIONAL.
subjectstring or nullNoEmail only; merge fields allowed. Up to 200 characters.
bodystringYesText with {{merge.fields}} (GET /message-templates/merge-fields).
variantsarray of objectNoA/B variants: { id, label, weight, subject?, body }. Up to 10 items. Default [].
variants[].idstringYesUp to 64 characters.
variants[].labelstringNoUp to 100 characters.
variants[].weightintegerNo0–1000. Default 1.
variants[].subjectstring or nullNoUp to 200 characters.
variants[].bodystringYes
categorystring or nullNoUp to 40 characters.

Example

curl -X POST "https://app.skuflow.ai/api/organizations/$ORGANIZATION_ID/message-templates" \
  -H "Authorization: Bearer $SKUFLOW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Dana Whitfield","channel":"EMAIL","body":"string"}'

Response

201: the answer's fields
FieldTypeDescription
idstring
namestring
descriptionstring or null
channelenumOne of EMAIL, SMS.
purposeenumOne of TRANSACTIONAL, MARKETING.
subjectstring or null
bodystring
placeholdersarray of string
variantsarray of object
categorystring or null
isSystemboolean
systemKeystring or null
updatedAtstringISO 8601 time (UTC).

List the merge fields

GET /organizations/{organizationId}/message-templates/merge-fields

Every {{merge.field}} a template can use (business, customer, property, request, quote, invoice, payment, links) with an example. Links are the real customer links, made when a message uses them. Read-only.

Permissionengagement.read (Owner, Admin, Staff)
Riskread, OAuth scope skuflow.read. Read: reads only.
MCP toolmessageTemplates_mergeFields (toolset marketing)

Example

curl "https://app.skuflow.ai/api/organizations/$ORGANIZATION_ID/message-templates/merge-fields" \
  -H "Authorization: Bearer $SKUFLOW_API_KEY"

Response

200: the answer's fields

An array of objects:

FieldTypeDescription
groupstring
tagsarray of object
tags[].tokenstring
tags[].labelstring
tags[].helpstring
tags[].examplestring

Get a message template

GET /organizations/{organizationId}/message-templates/{templateId}

One template with its subject, body, merge fields and A/B variants. Read-only.

Permissionengagement.read (Owner, Admin, Staff)
Riskread, OAuth scope skuflow.read. Read: reads only.
MCP toolmessageTemplates_get (toolset marketing)

Parameters

NameInTypeRequiredDescription
templateIdpathstringYesA message template id, from GET /message-templates.

Example

curl "https://app.skuflow.ai/api/organizations/$ORGANIZATION_ID/message-templates/{templateId}" \
  -H "Authorization: Bearer $SKUFLOW_API_KEY"

Response

200: the answer's fields
FieldTypeDescription
idstring
namestring
descriptionstring or null
channelenumOne of EMAIL, SMS.
purposeenumOne of TRANSACTIONAL, MARKETING.
subjectstring or null
bodystring
placeholdersarray of string
variantsarray of object
categorystring or null
isSystemboolean
systemKeystring or null
updatedAtstringISO 8601 time (UTC).

Edit a message template

PATCH /organizations/{organizationId}/message-templates/{templateId}

Replaces the template's name, subject, body and variants (the channel cannot change). Automations using it send the new text from their next message.

Permissionengagement.manage (Owner, Admin)
Riskwrite, OAuth scope skuflow.write. Write: creates or changes records inside the business; nothing leaves it.
MCP toolmessageTemplates_update (toolset marketing)

Parameters

NameInTypeRequiredDescription
templateIdpathstringYesA message template id, from GET /message-templates.

Request body

FieldTypeRequiredDescription
namestringYesUp to 200 characters.
descriptionstring or nullNoUp to 1000 characters.
channelenumYesOne of EMAIL, SMS.
purposeenumNoOne of TRANSACTIONAL, MARKETING. Default TRANSACTIONAL.
subjectstring or nullNoEmail only; merge fields allowed. Up to 200 characters.
bodystringYesText with {{merge.fields}} (GET /message-templates/merge-fields).
variantsarray of objectNoA/B variants: { id, label, weight, subject?, body }. Up to 10 items. Default [].
variants[].idstringYesUp to 64 characters.
variants[].labelstringNoUp to 100 characters.
variants[].weightintegerNo0–1000. Default 1.
variants[].subjectstring or nullNoUp to 200 characters.
variants[].bodystringYes
categorystring or nullNoUp to 40 characters.

Example

curl -X PATCH "https://app.skuflow.ai/api/organizations/$ORGANIZATION_ID/message-templates/{templateId}" \
  -H "Authorization: Bearer $SKUFLOW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Dana Whitfield","channel":"EMAIL","body":"string"}'

Response

200: the answer's fields
FieldTypeDescription
idstring
namestring
descriptionstring or null
channelenumOne of EMAIL, SMS.
purposeenumOne of TRANSACTIONAL, MARKETING.
subjectstring or null
bodystring
placeholdersarray of string
variantsarray of object
categorystring or null
isSystemboolean
systemKeystring or null
updatedAtstringISO 8601 time (UTC).

Delete a message template

DELETE /organizations/{organizationId}/message-templates/{templateId}

Destructive: deletes a template no automation uses (409 otherwise). Preset templates cannot be deleted.

Permissionengagement.manage (Owner, Admin)
Risksensitive, OAuth scope skuflow.sensitive. Sensitive: moves money, deletes, sends or shows something to a customer, or grants or revokes access.
MCP toolmessageTemplates_delete (toolset marketing)
ApprovalOver MCP, this tool always waits for your approval in SKUFlow. See Approvals.

Parameters

NameInTypeRequiredDescription
templateIdpathstringYesA message template id, from GET /message-templates.

Example

curl -X DELETE "https://app.skuflow.ai/api/organizations/$ORGANIZATION_ID/message-templates/{templateId}" \
  -H "Authorization: Bearer $SKUFLOW_API_KEY"

Response

200: the answer's fields
FieldTypeDescription
oktrue

Preview a message

POST /organizations/{organizationId}/message-templates/preview

Renders a subject and body (or a saved template) for a real customer and optional record, as it would be sent: merge fields filled, the branded email shell, the SMS length. Without a customer, the merge fields' examples are used. Nothing is sent.

Permissionengagement.read (Owner, Admin, Staff)
Riskwrite, OAuth scope skuflow.write. Write: creates or changes records inside the business; nothing leaves it.
MCP toolmessageTemplates_preview (toolset marketing)

Request body

FieldTypeRequiredDescription
channelenumYesOne of EMAIL, SMS.
purposeenumNoOne of TRANSACTIONAL, MARKETING. Default TRANSACTIONAL.
subjectstring or nullNoUp to 200 characters.
bodystringNo
templateIdstringNoPreview a saved template instead of subject/body.
customerIdstringNoThe sample customer (GET /customers); examples when omitted.
subjectTypeenumNoOne of quote, invoice, payment, request.
subjectIdstringNo
brandingobjectNoEmail branding not saved yet (Settings → Messaging's live preview); without a customer only.
branding.brandColorstring or nullNoUp to 7 characters.
branding.headerTextstring or nullNoUp to 120 characters.
branding.footerTextstring or nullNoUp to 500 characters.

Example

curl -X POST "https://app.skuflow.ai/api/organizations/$ORGANIZATION_ID/message-templates/preview" \
  -H "Authorization: Bearer $SKUFLOW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"channel":"EMAIL"}'

Response

200: the answer's fields
FieldTypeDescription
channelenumOne of EMAIL, SMS.
subjectstring or null
bodystringThe exact text (SMS) or the email's text part.
htmlstring or nullThe branded email, as it would be sent.
unresolvedarray of stringMerge fields with no value for this customer.
warningsarray of string
smsobject or null
sms.charactersinteger
sms.segmentsinteger
sms.encodingstring

On this page