Skip to main content

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 NameValueDescription
dealerUUIDstringUnique 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 NameTypeDescription
dealerUUIDstringUnique identifier for the dealer
taskTypeUUIDstringUnique identifier for the task type for which the template is getting created
typestringType of template: EMAIL or TEXT (only these 2 values are supported)
isDefaultbooleanWhether the template is the default template for the task type. There can only be one default template of a type for a task type
multibooleanAlways send false
titlestringTitle of the template
messagestringMain body for the template
localestringLocale of the template. Supported values: en-us and fr-ca
isFreemarkerTemplatebooleanWhether 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: true if 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

FieldTypeDescription
statusCodeintegerHTTP status code (200 for success)
errorobjectError details if the request failed
warningsarrayWarning messages if any