How to create a template for follow up task type
This endpoint allows you to create email or text templates for a specific follow-up task type. Templates can be used to standardize messages sent to customers for different types of follow-ups.
To use this endpoint, you first need your credentials. If you don't already have one, please head over to the Authentication and Authorization page to see how you can request for credentials from us.
Request
HTTP request
POST https://api.mykaarma.com/leads/followup/dealer/{dealerUUID}/template
Parameters
Required path parameters:
| Parameter Name | Value | Description |
|---|---|---|
dealerUUID | string | Unique identifier for the dealer for which the template needs to be created |
Authorization
This request requires authorization. Include your credentials in the authorization header.
Request Body
| Property Name | Type | Description |
|---|---|---|
dealerUUID | string | Unique identifier for the dealer |
taskTypeUUID | string | Unique identifier for the task type for which the template is getting created |
type | string | Type of template: EMAIL or TEXT (only these 2 values are supported) |
isDefault | boolean | Whether the template is the default template for the task type. There can only be one default template of a type for a task type |
multi | boolean | Always send false |
title | string | Title of the template |
message | string | Main body for the template |
locale | string | Locale of the template. Supported values: en-us and fr-ca |
isFreemarkerTemplate | boolean | Whether the template is freemarker type or not |
Sample Request
curl --location 'https://api.mykaarma.com/leads/followup/dealer/{dealerUUID}/template' \
--header 'accept: application/json' \
--header 'authorization: <your-credentials>' \
--header 'Content-Type: application/json' \
--data '{
"dealerUUID": "dealer-uuid",
"taskTypeUUID": "task-type-uuid",
"type": "EMAIL",
"isDefault": true,
"multi": false,
"title": "Follow-up for Declined Service",
"message": "Dear ${customerName}, we noticed you declined some service recommendations. Please contact us to schedule.",
"locale": "en-us",
"isFreemarkerTemplate": true
}'
tip
- Use
isFreemarkerTemplate: trueif your message contains Freemarker variables (e.g.,${customerName}) - If
isFreemarkerTemplate: false, you'll need to evaluate the template on your end before sending - Only one default template of each type (EMAIL/TEXT) can exist per task type
Response
{
"statusCode": 200,
"error": null,
"warnings": null
}
Response Fields
| Field | Type | Description |
|---|---|---|
statusCode | integer | HTTP status code (200 for success) |
error | object | Error details if the request failed |
warnings | array | Warning messages if any |