Skip to main content

How to update template for a task type

This endpoint allows you to update an existing template for a follow-up task type.

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​

PUT  https://api.mykaarma.com/leads/followup/dealer/{dealerUUID}/template/{templateUUID}

Parameters​

Required path parameters:

Parameter NameValueDescription
dealerUUIDstringUnique identifier for the dealer
templateUUIDstringUnique identifier for the template that needs to be updated

Authorization​

This request requires authorization. Include your credentials in the authorization header.

Scope​

This request requires the following authorization scopes:

ScopeLevelDescription
followup.updateDealerAuthorizes client to update a follow-up template for the provided dealer

Request Body​

Property NameTypeDescription
dealerUUIDstringUnique identifier for the dealer
taskTypeUUIDstringUnique identifier for the task type for which the template belongs
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 --request PUT 'https://api.mykaarma.com/leads/followup/dealer/{dealerUUID}/template/{templateUUID}' \
--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": "Updated Follow-up for Declined Service",
"message": "Dear ${customerName}, we noticed you declined some service recommendations. Please contact us to schedule at your convenience.",
"locale": "en-us",
"isFreemarkerTemplate": true
}'

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