Skip to main content

kobana dunning templates

Commands of kobana dunning templates. Every global option (Global options) applies here.

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

templates list​

List templates

kobana dunning templates list [OPTIONS]

GET /v1/templates

Lists the organization’s message templates with pagination, search and filters.

Query parameters

NameTypeRequiredDescription
pageintegernoPage number (starts at 1).
per_pageintegernoItems per page (max 100).
searchstringnoSearch by name, subject or body.
channelstringnoFilter by channel. Values: email, sms, whatsapp, voice, manual.
categorystringnoFilter by category. Values: reminder, overdue, negotiation, negativation_warning, protest_warning, payment_confirmation.
tonestringnoFilter by tone. Values: friendly, neutral, firm, urgent.
is_activestringnoFilter by activation: true = active, false = inactive. Values: true, false.
sort_bystringnoSort field (public snake_case name, e.g. due_date). Values: name, channel, category, createdAt, updatedAt.
sort_orderstringnoSort direction (asc | desc). Values: asc, desc.

Headers

NameTypeRequiredDescription
X-Workspace-IdstringnoWorkspace the call acts on (id or public_id, listed by GET /v1/workspaces). Optional while the organization has a single workspace; with two or more, omitting it is 400 WORKSPACE_REQUIRED. A workspace of another organization is 403 UNKNOWN_WORKSPACE.

Responses

HTTPDescription
200Paginated template list.
400Invalid request (validation error).
404Resource not found or outside your organization.
413Request body larger than 2 MB.

templates create​

Create template

kobana dunning templates create [OPTIONS]

POST /v1/templates

Creates a message template. Fails with 409 if a template with the same name or external_id already exists.

Headers

NameTypeRequiredDescription
X-Workspace-IdstringnoWorkspace the call acts on (id or public_id, listed by GET /v1/workspaces). Optional while the organization has a single workspace; with two or more, omitting it is 400 WORKSPACE_REQUIRED. A workspace of another organization is 403 UNKNOWN_WORKSPACE.

Request body

NameTypeRequiredDescription
namestringyesTemplate name (unique within the organization).
channelstringyesDelivery channel (email | sms | whatsapp | voice | manual). Values: email, sms, whatsapp, voice, manual.
categorystringyesCategory (reminder | overdue | negotiation | negativation_warning | protest_warning | payment_confirmation). Values: reminder, overdue, negotiation, negativation_warning, protest_warning, payment_confirmation.
bodystringyesMessage body, with variables in {{variable}} format.
tonestringnoMessage tone (friendly | neutral | firm | urgent). Values: friendly, neutral, firm, urgent, null.
subjectstringnoSubject (used for email).
variablesarray<string>noVariables available in the body/subject.
activated_atstring (date-time)noActivation timestamp (null = inactive).
external_idstringnoIdentifier in YOUR system (integration key; unique within the organization).
custom_dataobjectnoAPI-consumer custom metadata. Limits: 64 KB serialized and 16 nesting levels.
custom_metadataobjectnoUser metadata (free-form JSON object, read-write). See custom_data for the legacy field on core resources.
tagsarray<string>noFree-form tags.

More fields and nested objects: kobana schema dunning.templates.create.

Responses

HTTPDescription
201Template created.
400Invalid request (validation error).
404Resource not found or outside your organization.
409Conflict with the current resource state (or reused idempotency key).
413Request body larger than 2 MB.

templates get​

Get template

kobana dunning templates get [ID] [OPTIONS]

GET /v1/templates/{id}

Returns a template by ID.

Path arguments: id

Headers

NameTypeRequiredDescription
X-Workspace-IdstringnoWorkspace the call acts on (id or public_id, listed by GET /v1/workspaces). Optional while the organization has a single workspace; with two or more, omitting it is 400 WORKSPACE_REQUIRED. A workspace of another organization is 403 UNKNOWN_WORKSPACE.

Responses

HTTPDescription
200Template found.
404Resource not found or outside your organization.
413Request body larger than 2 MB.

templates update​

Update template

kobana dunning templates update [ID] [OPTIONS]

PUT /v1/templates/{id}

Updates a template (partial). Fails with 409 if the new name or external_id is already taken.

Path arguments: id

Headers

NameTypeRequiredDescription
X-Workspace-IdstringnoWorkspace the call acts on (id or public_id, listed by GET /v1/workspaces). Optional while the organization has a single workspace; with two or more, omitting it is 400 WORKSPACE_REQUIRED. A workspace of another organization is 403 UNKNOWN_WORKSPACE.

Request body

NameTypeRequiredDescription
namestringnoTemplate name (unique within the organization).
channelstringnoDelivery channel (email | sms | whatsapp | voice | manual). Values: email, sms, whatsapp, voice, manual.
categorystringnoCategory (reminder | overdue | negotiation | negativation_warning | protest_warning | payment_confirmation). Values: reminder, overdue, negotiation, negativation_warning, protest_warning, payment_confirmation.
tonestringnoMessage tone (friendly | neutral | firm | urgent). Values: friendly, neutral, firm, urgent, null.
subjectstringnoSubject (used for email).
bodystringnoMessage body, with variables in {{variable}} format.
variablesarray<string>noVariables available in the body/subject.
activated_atstring (date-time)noActivation timestamp (null = inactive).
external_idstringnoIdentifier in YOUR system (integration key; unique within the organization).
custom_dataobjectnoAPI-consumer custom metadata. Limits: 64 KB serialized and 16 nesting levels.
custom_metadataobjectnoUser metadata (free-form JSON object, read-write). See custom_data for the legacy field on core resources.
tagsarray<string>noFree-form tags.
custom_metadata_modestringnoHow the custom_metadata sent is reconciled with the stored value: replace (default) replaces the whole object; merge deep-merges — nested objects merge, scalars and arrays replace the key, and a key sent as null is stored as null (not removed). Update only. Values: replace, merge.

More fields and nested objects: kobana schema dunning.templates.update.

Responses

HTTPDescription
200Template updated.
400Invalid request (validation error).
404Resource not found or outside your organization.
409Conflict with the current resource state (or reused idempotency key).
413Request body larger than 2 MB.

templates delete​

Delete template

kobana dunning templates delete [ID] [OPTIONS]

DELETE /v1/templates/{id}

Soft-deletes a template. Fails with 409 if it is in use by rule steps.

Path arguments: id

Headers

NameTypeRequiredDescription
X-Workspace-IdstringnoWorkspace the call acts on (id or public_id, listed by GET /v1/workspaces). Optional while the organization has a single workspace; with two or more, omitting it is 400 WORKSPACE_REQUIRED. A workspace of another organization is 403 UNKNOWN_WORKSPACE.

Responses

HTTPDescription
204Template deleted.
404Resource not found or outside your organization.
409Conflict with the current resource state (or reused idempotency key).
413Request body larger than 2 MB.

templates duplicate​

Duplicate template

kobana dunning templates duplicate [ID] [OPTIONS]

POST /v1/templates/{id}/duplicate

Creates a copy of the template with the given name. The copy starts inactive (activated_at null) and without external_id.

Path arguments: id

Headers

NameTypeRequiredDescription
X-Workspace-IdstringnoWorkspace the call acts on (id or public_id, listed by GET /v1/workspaces). Optional while the organization has a single workspace; with two or more, omitting it is 400 WORKSPACE_REQUIRED. A workspace of another organization is 403 UNKNOWN_WORKSPACE.

Request body

NameTypeRequiredDescription
namestringyesTemplate name (unique within the organization).

More fields and nested objects: kobana schema dunning.templates.duplicate.

Responses

HTTPDescription
201Template duplicated.
400Invalid request (validation error).
404Resource not found or outside your organization.
409Conflict with the current resource state (or reused idempotency key).
413Request body larger than 2 MB.