Skip to main content
POST
/
api
/
user
/
sms-templates
Create a new SMS template
curl --request POST \
  --url https://your-instance.example.com/api/user/sms-templates \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "Intro - new lead",
  "template": "Hi {{firstName}}, thanks for reaching out — when is a good time to chat?",
  "type": "sms",
  "category": "introduction"
}
'
{
  "_id": "64d2f9c5e8a1d4e001a0b1c2",
  "name": "Tour confirm — Maple Court",
  "template": "Hi {{firstName}}! Confirming your tour for {{tour.date}} at {{tour.time}}.",
  "type": "sms",
  "category": "tours",
  "organizationId": "64a1b2c3d4e5f60012345678",
  "userId": "64a1b2c3d4e5f60012345679",
  "createdBy": "64a1b2c3d4e5f60012345679",
  "createdAt": "2026-05-18T12:34:56.000Z",
  "updatedAt": "2026-05-18T12:34:56.000Z"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
name
string
required

Human-readable template title shown in the composer picker (e.g., "Intro - new lead").

template
string
required

Template body containing {{firstName}}-style placeholders resolved against the contact at send time.

type
string
required

Template kind: sms, campaign, script, or automation. Automation templates ignore category.

category
string

Category slug (matches TemplateCategory.name) used to group templates in the picker; defaults to other when omitted for non-automation types.

Response

Template created

A reusable template (type: sms / campaign / script / automation). Returned by create/update template endpoints.

_id
string
required
name
string
required
template
string
required

Template body with {{firstName}}-style placeholders.

type
enum<string>
required
Available options:
sms,
email,
campaign,
script,
automation
category
string
organizationId
string
userId
string
createdBy
string
updatedBy
string
createdAt
string<date-time>
updatedAt
string<date-time>