Create template
Templates
Create template
Create a template scoped to the caller’s organization. name, template body and type are required; category is required for non-automation types.
POST
Create template
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Template display name shown in the template picker.
Template body with {{firstName}}-style placeholders resolved at send time.
Template kind: sms, email, campaign, script, automation.
Grouping label for filtering; required unless type === "automation".
Response
Template created
Available options:
true Mongoose Template document. category is omitted when type === "automation".
Example:
{
"_id": "66a0a0b0c0d0e0f0a0b0c0d0",
"name": "Demo follow-up",
"template": "Hi {{firstName}}, thanks for the demo today!",
"type": "message",
"category": "sales-followup",
"userId": "65b1f0a2c3d4e5f6a7b8c9d0",
"organizationId": "65a0e0e0e0e0e0e0e0e0e0e0",
"createdBy": "65b1f0a2c3d4e5f6a7b8c9d0",
"createdAt": "2026-04-12T08:00:00.000Z",
"updatedAt": "2026-04-12T08:00:00.000Z"
}