Skip to main content

Message templates

The texts that rule steps send, per channel and category (reminder, overdue, negotiation, credit-bureau warning…), with customer and charge variables. duplicate creates an inactive copy under a new name.

CommandHTTPDescription
templates listGET /v1/templatesList templates
templates createPOST /v1/templatesCreate template
templates getGET /v1/templates/{id}Get template
templates updatePUT /v1/templates/{id}Update template
templates deleteDELETE /v1/templates/{id}Delete template
templates duplicatePOST /v1/templates/{id}/duplicateDuplicate template

Examples​

--params carries query, path and header parameters (id, page, filters, X-Workspace-Id); --json carries the request body; --fields limits which fields come back — worth using on every list/get to save context. See Global flags for the full reference.

# E-mail templates
kobana dunning templates list \
--params '{"channel": "email"}' \
--fields "id,name,category,tone,activated_at"

# Create a template
kobana dunning templates create \
--json '{"name": "Lembrete amigável", "channel": "sms", "category": "reminder", "body": "Olá {{ person.name }}, sua cobrança vence em {{ charge.dueDate | date }}."}'

# Duplicate a template
kobana dunning templates duplicate \
--params '{"id": "TEMPLATE_ID"}' \
--json '{"name": "Lembrete amigável (cópia)"}'

Next steps​