Templates

The templates system is used manage templates and render content from existing templates. Templates can be used, for instance, when sending emails and text messages. Custom branding and dynamic fields can be added into templates.

Management

The templates system consists of two main components: Template Descriptors and Template Versions (also sometimes simply referred to as "templates"). A Template Descriptor is a configuration object that defines the structure of a template. A Template Version is a specific instance of a template that contains the actual content.

A Template Descriptor many have many Template Versions associated with it. There can be only one "active" Template Version at a time.

Content

Syntax

Peach uses Jinja templating. Therefore all templates use Jinja template syntax, and must be a valid Jinja template to render.

Rendering Context

When a template is rendered, context variables are passed into the template. If a template looks like:

Hello {{foo}}, your loan is due on {{bar}}.

then the context variables in the template are foo and bar. If, when the template is rendered, the provided context is:

{
  "foo": "John",
  "bar": "2021-01-01"
}

...then the rendered template will be:

Hello John, your loan is due on 2021-01-01.

List template descriptors

Securityoauth2 or bearerAuth or apiKeyHeader
Request
query Parameters
limit
integer [ 1 .. 100 ]
Default: 25

The maximum count of results to retrieve.

startingAfter
string

Return results starting after the provided object identifier.

endingBefore
string

Return results ending before the provided object identifier.

companyId
string (CompanyId) CP-[A-Z0-9]{4}-[A-Z0-9]{4}

The Company ID by which to filter.

Example: companyId=CP-AAAA-BBBB
Responses
200

OK

400

Bad request

get/communicator/templatedescriptors
Response samples
application/json
[
  • {
    }
]

Create template descriptor

Securityoauth2 or bearerAuth or apiKeyHeader
Request
Request Body schema: application/json
required
InteractionSubject (string) or string (TemplateSubject)

The subject of the template

channel
string or null (InteractionChannel)

The channel where interactions with a borrower occur. For example, an outbound call with a borrower is considered voice.

Enum: "voice" "email" "fax" "text" "chat" "mail" "gui" "document"
language
string (language) = 2 characters
Default: "en"

The ISO 639-1 two character code of the email language.

productId
string or null (LoanTypeIdNullable) LT-[A-Z0-9]{4}-[A-Z0-9]{4}

The Loan Type ID to which this template is associated. By configuring a Loan Type for a Template Descriptor it is possible to use completely different templates for different types of loans.

sensitive
boolean
Default: false

If true, then all interactions and documents created from this template will have the sensitive field set to true. Such interaction and documents cannot have their content viewed except with a special permission (interaction:read.sensitive).

Usually this would be used to prevent employees without need to access private information from accessing it.

enabled
boolean
Default: true

If true, then this template is disabled. Attempts to send messages with this template will be rejected. (Return 400 responses from the API.)

name
string [ 1 .. 100 ]

An optional human-friendly name for templates. Only the Custom1-Custom20 family of subjects can have a custom name.

Responses
200

OK

400

Bad request

post/communicator/templatedescriptors
Request samples
application/json
{
  • "subject": "annualPrivacyPolicyNotice",
  • "channel": "voice",
  • "language": "en",
  • "productId": "LT-AAAA-BBBB",
  • "sensitive": false,
  • "enabled": true,
  • "name": "string"
}
Response samples
application/json
{
  • "id": "TD-AAAA-BBBB",
  • "companyId": "CP-AAAA-BBBB",
  • "activeVersionId": "string",
  • "subject": "annualPrivacyPolicyNotice",
  • "channel": "voice",
  • "language": "en",
  • "productId": "LT-AAAA-BBBB",
  • "sensitive": false,
  • "enabled": true,
  • "name": "string"
}

Get template descriptor

Securityoauth2 or bearerAuth or apiKeyHeader
Request
path Parameters
descriptorId
required
string (TemplateDescriptorId) TD-[A-Z0-9]{4}-[A-Z0-9]{4}

ID of the Template Descriptor.

Example: TD-AAAA-BBBB
Responses
200

OK

400

Bad request

get/communicator/templatedescriptors/{descriptorId}
Response samples
application/json
{
  • "id": "TD-AAAA-BBBB",
  • "companyId": "CP-AAAA-BBBB",
  • "activeVersionId": "string",
  • "subject": "annualPrivacyPolicyNotice",
  • "channel": "voice",
  • "language": "en",
  • "productId": "LT-AAAA-BBBB",
  • "sensitive": false,
  • "enabled": true,
  • "name": "string"
}

Update template descriptor

Securityoauth2 or bearerAuth or apiKeyHeader
Request
path Parameters
descriptorId
required
string (TemplateDescriptorId) TD-[A-Z0-9]{4}-[A-Z0-9]{4}

ID of the Template Descriptor.

Example: TD-AAAA-BBBB
Request Body schema: application/json
required

The updated template descriptor

InteractionSubject (string) or string (TemplateSubject)

The subject of the template

channel
string or null (InteractionChannel)

The channel where interactions with a borrower occur. For example, an outbound call with a borrower is considered voice.

Enum: "voice" "email" "fax" "text" "chat" "mail" "gui" "document"
language
string (language) = 2 characters
Default: "en"

The ISO 639-1 two character code of the email language.

productId
string or null (LoanTypeIdNullable) LT-[A-Z0-9]{4}-[A-Z0-9]{4}

The Loan Type ID to which this template is associated. By configuring a Loan Type for a Template Descriptor it is possible to use completely different templates for different types of loans.

sensitive
boolean
Default: false

If true, then all interactions and documents created from this template will have the sensitive field set to true. Such interaction and documents cannot have their content viewed except with a special permission (interaction:read.sensitive).

Usually this would be used to prevent employees without need to access private information from accessing it.

enabled
boolean
Default: true

If true, then this template is disabled. Attempts to send messages with this template will be rejected. (Return 400 responses from the API.)

name
string [ 1 .. 100 ]

An optional human-friendly name for templates. Only the Custom1-Custom20 family of subjects can have a custom name.

Responses
200

OK

400

Bad request

put/communicator/templatedescriptors/{descriptorId}
Request samples
application/json
{
  • "subject": "annualPrivacyPolicyNotice",
  • "channel": "voice",
  • "language": "en",
  • "productId": "LT-AAAA-BBBB",
  • "sensitive": false,
  • "enabled": true,
  • "name": "string"
}
Response samples
application/json
{
  • "id": "TD-AAAA-BBBB",
  • "companyId": "CP-AAAA-BBBB",
  • "activeVersionId": "string",
  • "subject": "annualPrivacyPolicyNotice",
  • "channel": "voice",
  • "language": "en",
  • "productId": "LT-AAAA-BBBB",
  • "sensitive": false,
  • "enabled": true,
  • "name": "string"
}

Delete template descriptor

Securityoauth2 or bearerAuth or apiKeyHeader
Request
path Parameters
descriptorId
required
string (TemplateDescriptorId) TD-[A-Z0-9]{4}-[A-Z0-9]{4}

ID of the Template Descriptor.

Example: TD-AAAA-BBBB
Responses
200

OK

404

Not Found

delete/communicator/templatedescriptors/{descriptorId}

List template versions for descriptor

List all template versions for the given template descriptor.

Securityoauth2 or bearerAuth or apiKeyHeader
Request
path Parameters
descriptorId
required
string (TemplateDescriptorId) TD-[A-Z0-9]{4}-[A-Z0-9]{4}

ID of the Template Descriptor.

Example: TD-AAAA-BBBB
query Parameters
limit
integer [ 1 .. 100 ]
Default: 25

The maximum count of results to retrieve.

startingAfter
string

Return results starting after the provided object identifier.

endingBefore
string

Return results ending before the provided object identifier.

Responses
200

OK

get/communicator/templatedescriptors/{descriptorId}/templates
Response samples
application/json
[
  • {
    }
]

List all template versions (Deprecated)

List all template versions.

Deprecated in favor of /v2/communicator/templates.

This dumps all template versions (regardless of active status) without paging.

Securityoauth2 or bearerAuth or apiKeyHeader
Request
query Parameters
companyId
string (CompanyId) CP-[A-Z0-9]{4}-[A-Z0-9]{4}

The Company ID by which to filter.

Example: companyId=CP-AAAA-BBBB
Responses
200

OK

get/communicator/templates
Response samples
application/json
[
  • {
    }
]

Create template version

Create a new template versions.

The new version will not be active until it is activated with the activate endpoint.

Securityoauth2 or bearerAuth or apiKeyHeader
Request
Request Body schema: application/json
required

The new template

descriptorId
string (TemplateDescriptorId) TD-[A-Z0-9]{4}-[A-Z0-9]{4}

ID of the Template Descriptor

status
string (TemplateVersionStatus)
Enum: "draft" "deployed" "deprecated"
subjectLineTemplate
string or null (SubjectLineTemplate)

A valid Jinja template to use for the subject line. This is used, for instance, for the subject line when sending emails.

This is simply ignored when the channel does not need a subject.

The context variables available to this template are the same as the context available to contentTextTemplate

contentTextTemplate
string or null (ContentTextTemplate)

A valid Jinja template to use for the content text body. This is used, for instance, for the body of a plain text email or text message.

contentHtmlTemplate
string or null (ContentHtmlTemplate)

A valid Jinja template to use for the content HTML body. This is used, for instance, for the body of an HTML email.

This is simply ignored when the channel does not need HTML content.

The context variables available to this template are the same as the context available to contentTextTemplate

Responses
200

OK

400

Bad request

post/communicator/templates
Request samples
application/json
{
  • "descriptorId": "TD-AAAA-BBBB",
  • "status": "draft",
  • "subjectLineTemplate": "Hello {{foobar}}",
  • "contentTextTemplate": "Hello {{foobar}}",
  • "contentHtmlTemplate": "Hello,<br/><p>{{foobar}}</p>"
}
Response samples
application/json
{
  • "id": "TV-AAAA-BBBB",
  • "descriptorId": "TD-AAAA-BBBB",
  • "status": "draft",
  • "subjectLineTemplate": "Hello {{foobar}}",
  • "contentTextTemplate": "Hello {{foobar}}",
  • "contentHtmlTemplate": "Hello,<br/><p>{{foobar}}</p>"
}

List all template versions (v2)

List all Templates Versions for all Template Descriptors.

Securityoauth2 or bearerAuth or apiKeyHeader
Request
query Parameters
limit
integer [ 1 .. 100 ]
Default: 25

The maximum count of results to retrieve.

startingAfter
string

Return results starting after the provided object identifier.

endingBefore
string

Return results ending before the provided object identifier.

includeContextVars
boolean
Default: false

If true, include all the context variables for this template.

includeContents
boolean
Default: true

If true, include the template contents, otherwise only return metadata.

subject
Array of strings (InteractionSubject)

Only include templates matching these interaction subjects.

Items Enum: "annualPrivacyPolicyNotice" "autopayAgreement" "autopayAmountChanged" "autopayCanceledBySystem" "autopayEnabled" "autopayEnableReminder" "autopayPaymentCanceled" "autopayPaymentMethodUpdated" "autopayPaymentReminder" "autopayPaymentRescheduled" "cardExpiresReminder" "caseEscalation" "ceaseCommunicationAcknowledgement" "ceaseCommunicationRefuseToPay" "confirmationCode" "contactTakeover" "creditNegativeInfoReported" "creditPositiveInfoReported" "custom1" "custom2" "custom3" "custom4" "custom5" "custom6" "custom7" "custom8" "custom9" "custom10" "custom11" "custom12" "custom13" "custom14" "custom15" "custom16" "custom17" "custom18" "custom19" "custom20" "debtValidationNotice" "debtValidationNoticeArizona" "debtValidationNoticeAutomatic" "debtValidationNoticeNYCYonkers" "debtValidationNoticePuertoRico" "deceasedConfirmationOfPayoff" "deceasedNoticeToRepresentative" "deceasedNotificationUponDeath" "disputeOfDebtConfirmed" "disputeOfDebtSubmitDocumentation" "disputeOfDebtSubmitDocumentationReminder" "disputeOfDebtUnableToConfirm" "disputeOfDebtUnableToResolve" "documentUploadFailed" "downpaymentFailed" "drawFundsDisclosure" "electronicConsentOptOut" "failedSettlementInvestor" "failedSettlementPeach" "freeForm" "freeFormBranded" "futurepayCanceled" "futurepayPaymentDueReminder" "identityTheftIncompleteDocumentation" "identityTheftNotValidated" "identityTheftSubmitDocumentation" "identityTheftSubmitDocumentationFirstReminder" "identityTheftSubmitDocumentationSecondReminder" "identityTheftValidated" "letterReturnedToSender" "loanAccelerated" "loanCanceled" "loanChargedOffUnsecured" "loanDetails" "loanFeeCharged" "loanFreeze" "loanManualPaymentDisclosure" "loanOverdueFifthNotice" "loanOverdueFirstNotice" "loanOverdueFourthNotice" "loanOverdueSecondNotice" "loanOverdueSixthNotice" "loanOverdueThirdNotice" "loanPaidOff" "loanPaymentScheduleChanged" "loanPayoffStatement" "loanRefundProcessed" "loanRightToCurePersonalUnsecured" "loanTermsChangeAgreement" "loanUnfreeze" "locCreditLimitChanged" "locInterestRateChanged" "locLineClosed" "locStatementGenerated" "locStatementRegenerated" "loginFirstPaymentReminder" "microdepositFailed" "microdepositProcessing" "microdepositReminder" "oneTimeCode" "paydayConsumerRightsNotice" "paydayFirstPaymentWithdrawal" "paymentDisputed" "paymentDueDateReminder" "paymentFailed" "paymentMethodAdded" "paymentMethodUpdated" "paymentProcessing" "paymentRescheduled" "paymentReversalFailed" "paymentReversalProcessing" "paymentSuccessful" "payoffStatementDocument" "promiseToPayPeriodKept" "promiseToPayPeriodMissed" "promiseToPayPlanCanceled" "promiseToPayPlanCreated" "promoProgramCanceled" "promoProgramEligibilityAtRisk" "promoProgramExercised" "promoProgramReminder" "reimbursementFailed" "reimbursementProcessed" "reimbursementScheduled" "scraApplicationDenied" "scraBenefitsApplied" "scraBenefitsExpiringNotice" "scraCGFlaggedDocumentRequest" "scraServicemanNotifiedDocumentRequest" "settlementOffer" "settlementOfferFirstReminder" "statement" "statementLOC" "statementGenerated" "statementRegenerated" "unmonitoredEmailAddress" "updateBankAccountConnection"
channel
Array of strings or null (InteractionChannel)

Only include templates matching this set of interaction channels.

Items Enum: "voice" "email" "fax" "text" "chat" "mail" "gui" "document"
Responses
200

OK

get/v2/communicator/templates
Response samples
application/json
{
  • "status": 0,
  • "count": 0,
  • "data": [
    ]
}

Get template version

Securityoauth2 or bearerAuth or apiKeyHeader
Request
path Parameters
templateVersionId
required
string (TemplateVersionId) TV-[A-Z0-9]{4}-[A-Z0-9]{4}

The Template Version ID.

Example: TV-AAAA-BBBB
Responses
200

OK

get/communicator/templates/{templateVersionId}
Response samples
application/json
{
  • "id": "TV-AAAA-BBBB",
  • "descriptorId": "TD-AAAA-BBBB",
  • "status": "draft",
  • "subjectLineTemplate": "Hello {{foobar}}",
  • "contentTextTemplate": "Hello {{foobar}}",
  • "contentHtmlTemplate": "Hello,<br/><p>{{foobar}}</p>"
}

Update template version

Securityoauth2 or bearerAuth or apiKeyHeader
Request
path Parameters
templateVersionId
required
string (TemplateVersionId) TV-[A-Z0-9]{4}-[A-Z0-9]{4}

The Template Version ID.

Example: TV-AAAA-BBBB
Request Body schema: application/json
required
descriptorId
string (TemplateDescriptorId) TD-[A-Z0-9]{4}-[A-Z0-9]{4}

ID of the Template Descriptor

status
string (TemplateVersionStatus)
Enum: "draft" "deployed" "deprecated"
subjectLineTemplate
string or null (SubjectLineTemplate)

A valid Jinja template to use for the subject line. This is used, for instance, for the subject line when sending emails.

This is simply ignored when the channel does not need a subject.

The context variables available to this template are the same as the context available to contentTextTemplate

contentTextTemplate
string or null (ContentTextTemplate)

A valid Jinja template to use for the content text body. This is used, for instance, for the body of a plain text email or text message.

contentHtmlTemplate
string or null (ContentHtmlTemplate)

A valid Jinja template to use for the content HTML body. This is used, for instance, for the body of an HTML email.

This is simply ignored when the channel does not need HTML content.

The context variables available to this template are the same as the context available to contentTextTemplate

Responses
200

OK

400

Bad request

put/communicator/templates/{templateVersionId}
Request samples
application/json
{
  • "descriptorId": "TD-AAAA-BBBB",
  • "status": "draft",
  • "subjectLineTemplate": "Hello {{foobar}}",
  • "contentTextTemplate": "Hello {{foobar}}",
  • "contentHtmlTemplate": "Hello,<br/><p>{{foobar}}</p>"
}
Response samples
application/json
{
  • "id": "TV-AAAA-BBBB",
  • "descriptorId": "TD-AAAA-BBBB",
  • "status": "draft",
  • "subjectLineTemplate": "Hello {{foobar}}",
  • "contentTextTemplate": "Hello {{foobar}}",
  • "contentHtmlTemplate": "Hello,<br/><p>{{foobar}}</p>"
}

Delete template version

Securityoauth2 or bearerAuth or apiKeyHeader
Request
path Parameters
templateVersionId
required
string (TemplateVersionId) TV-[A-Z0-9]{4}-[A-Z0-9]{4}

The Template Version ID.

Example: TV-AAAA-BBBB
Responses
200

OK

404

Not Found

delete/communicator/templates/{templateVersionId}

Activate template version

Set's the given template version as active.

A template descriptor can have exactly one "active" version. The active template version is what's used to generate the content of the messages.

Securityoauth2 or bearerAuth or apiKeyHeader
Request
path Parameters
templateVersionId
required
string (TemplateVersionId) TV-[A-Z0-9]{4}-[A-Z0-9]{4}

The Template Version ID.

Example: TV-AAAA-BBBB
Responses
200

OK

put/communicator/templates/{templateVersionId}/activate

Render template version preview

Render the template contents of the given Template Version using the given context.

The three contents are returned in a single JSON response, they are contentHtml, contentText and subjectLine.

Securityoauth2 or bearerAuth or apiKeyHeader
Request
path Parameters
templateVersionId
required
string (TemplateVersionId) TV-[A-Z0-9]{4}-[A-Z0-9]{4}

The Template Version ID.

Example: TV-AAAA-BBBB
Request Body schema: application/json
required

Context data

personId
required
string (AnyId) ^ext-|^[A-Z][A-Z0-9]-[A-Z0-9]+-[A-Z0-9]+|^\d+...

Peach's unique or lender's external identifier.

context
object
Responses
200

OK

post/communicator/templates/{templateVersionId}/preview
Request samples
application/json
{
  • "personId": "string",
  • "context": { }
}
Response samples
application/json
{
  • "subjectLine": "string",
  • "contentHtml": "string",
  • "contentText": "string"
}

Render template version

Render a file (text, html or pdf) from this Template Version and download it.

Only the content matching the fmt query parameter is returned in the file.

The rendered template file is then downloaded as an attachment. (i.e., a response is sent with the header Content-Disposition: attachment.)

Note: that a Document Descriptor is NOT created.

Securityoauth2 or bearerAuth or apiKeyHeader
Request
path Parameters
templateVersionId
required
string (TemplateVersionId) TV-[A-Z0-9]{4}-[A-Z0-9]{4}

The Template Version ID.

Example: TV-AAAA-BBBB
query Parameters
fmt
string
Default: "html"

The desired output format.

Enum: "text" "html" "pdf"
Request Body schema: application/json
required

Template selectors and the data

subject
string (InteractionSubject)

The subject of the interaction. The subject identifies the category of the content in the message.

Most subjects have an associated implicit theme. e.g., loanOverdueFirstNotice has a theme of opsCollDebt. For these subjects it is not necessary to specify a theme.

Some subjects like freeForm and custom<N> do not have an implicit theme. When using these subjects you must specify a theme.

Note that locStatementGenerated and locStatementRegenerated are deprecated. They will be automatically converted into statementGenerated and statementRegenerated respectively. You should should switch to those subjects directly.

Enum: "annualPrivacyPolicyNotice" "autopayAgreement" "autopayAmountChanged" "autopayCanceledBySystem" "autopayEnabled" "autopayEnableReminder" "autopayPaymentCanceled" "autopayPaymentMethodUpdated" "autopayPaymentReminder" "autopayPaymentRescheduled" "cardExpiresReminder" "caseEscalation" "ceaseCommunicationAcknowledgement" "ceaseCommunicationRefuseToPay" "confirmationCode" "contactTakeover" "creditNegativeInfoReported" "creditPositiveInfoReported" "custom1" "custom2" "custom3" "custom4" "custom5" "custom6" "custom7" "custom8" "custom9" "custom10" "custom11" "custom12" "custom13" "custom14" "custom15" "custom16" "custom17" "custom18" "custom19" "custom20" "debtValidationNotice" "debtValidationNoticeArizona" "debtValidationNoticeAutomatic" "debtValidationNoticeNYCYonkers" "debtValidationNoticePuertoRico" "deceasedConfirmationOfPayoff" "deceasedNoticeToRepresentative" "deceasedNotificationUponDeath" "disputeOfDebtConfirmed" "disputeOfDebtSubmitDocumentation" "disputeOfDebtSubmitDocumentationReminder" "disputeOfDebtUnableToConfirm" "disputeOfDebtUnableToResolve" "documentUploadFailed" "downpaymentFailed" "drawFundsDisclosure" "electronicConsentOptOut" "failedSettlementInvestor" "failedSettlementPeach" "freeForm" "freeFormBranded" "futurepayCanceled" "futurepayPaymentDueReminder" "identityTheftIncompleteDocumentation" "identityTheftNotValidated" "identityTheftSubmitDocumentation" "identityTheftSubmitDocumentationFirstReminder" "identityTheftSubmitDocumentationSecondReminder" "identityTheftValidated" "letterReturnedToSender" "loanAccelerated" "loanCanceled" "loanChargedOffUnsecured" "loanDetails" "loanFeeCharged" "loanFreeze" "loanManualPaymentDisclosure" "loanOverdueFifthNotice" "loanOverdueFirstNotice" "loanOverdueFourthNotice" "loanOverdueSecondNotice" "loanOverdueSixthNotice" "loanOverdueThirdNotice" "loanPaidOff" "loanPaymentScheduleChanged" "loanPayoffStatement" "loanRefundProcessed" "loanRightToCurePersonalUnsecured" "loanTermsChangeAgreement" "loanUnfreeze" "locCreditLimitChanged" "locInterestRateChanged" "locLineClosed" "locStatementGenerated" "locStatementRegenerated" "loginFirstPaymentReminder" "microdepositFailed" "microdepositProcessing" "microdepositReminder" "oneTimeCode" "paydayConsumerRightsNotice" "paydayFirstPaymentWithdrawal" "paymentDisputed" "paymentDueDateReminder" "paymentFailed" "paymentMethodAdded" "paymentMethodUpdated" "paymentProcessing" "paymentRescheduled" "paymentReversalFailed" "paymentReversalProcessing" "paymentSuccessful" "payoffStatementDocument" "promiseToPayPeriodKept" "promiseToPayPeriodMissed" "promiseToPayPlanCanceled" "promiseToPayPlanCreated" "promoProgramCanceled" "promoProgramEligibilityAtRisk" "promoProgramExercised" "promoProgramReminder" "reimbursementFailed" "reimbursementProcessed" "reimbursementScheduled" "scraApplicationDenied" "scraBenefitsApplied" "scraBenefitsExpiringNotice" "scraCGFlaggedDocumentRequest" "scraServicemanNotifiedDocumentRequest" "settlementOffer" "settlementOfferFirstReminder" "statement" "statementLOC" "statementGenerated" "statementRegenerated" "unmonitoredEmailAddress" "updateBankAccountConnection"
channel
string

Templates with the same subject can have multiple versions per channel. For example: paymentFailed can have email and text message (aka SMS) versions.

Enum: "email" "text" "mail" "gui" "document"
personId
required
string

The unique identifier of the Borrower. Can be Peach or a lender's external identifier. The borrower attributes will be used as dynamic fields in the template.

loanId
string

The unique identifier of the Loan. Can be Peach or lender's external identifier. The loan attributes will be used as dynamic fields in the template.

caseId
string

The unique identifier of the Case. Can be Peach or lender's external identifier. The case attributes will be used as dynamic fields in the template.

object or autopayAmountChanged (object) or autopayCanceledBySystem (object) or autopayEnabled (object) or autopayEnableReminder (object) or autopayPaymentCanceled (object) or autopayPaymentMethodUpdated (object) or autopayPaymentReminder (object) or autopayPaymentRescheduled (object) or cardExpiresReminder (object) or ceaseCommunicationAcknowledgement (object) or ceaseCommunicationRefuseToPay (object) or confirmationCode (object) or contactTakeover (object) or customX (object) or debtValidationNotice (object) or debtValidationNoticeArizona (object) or debtValidationNoticeAutomatic (object) or debtValidationNoticeNYCYonkers (object) or debtValidationNoticePuertoRico (object) or deceasedConfirmationOfPayoff (object) or deceasedNoticeToRepresentative (object) or deceasedNotificationUponDeath (object) or disputeOfDebtSubmitDocumentation (object) or disputeOfDebtConfirmed (object) or disputeOfDebtSubmitDocumentationReminder (object) or disputeOfDebtUnableToConfirm (object) or disputeOfDebtUnableToResolve (object) or autopayAgreement (object) or drawFundsDisclosure (object) (ContextObject)
overrideTemplateId
string or null (OverrideTemplateId)

The template version ID (like TV-AAAA-BBBB) or template descriptor ID (like TD-AAAA-BBBB) to use.

If a template descriptor is given, then the current template descriptor's activeVersionId is used.

This should be used in special cases where you do not want to use the implicit template selected by the subject and channel fields.

Responses
200

OK

post/communicator/templates/{templateVersionId}/render
Request samples
application/json
{
  • "subject": "annualPrivacyPolicyNotice",
  • "channel": "email",
  • "personId": "string",
  • "loanId": "string",
  • "caseId": "string",
  • "context": { },
  • "overrideTemplateId": "TV-AAAA-BBBB"
}

List context vars for template version

List all context variables used in the given template version.

If a template looks like:

Hello {{name}},

Your loan {{loanName}} is due on {{dueDate}}.

Thanks,
{{companyName}}

{{SOME_MACRO()}}

The context variables are name, loanName, dueDate and companyName as well as whatever context variables are defined in SOME_MACRO() (but SOME_MACRO itself is NOT a context variable). Note that this means sometimes a Template Version may contain many context variables since all possible context variables are included in this list.

Securityoauth2 or bearerAuth or apiKeyHeader
Request
path Parameters
templateVersionId
required
string (TemplateVersionId) TV-[A-Z0-9]{4}-[A-Z0-9]{4}

The Template Version ID.

Example: TV-AAAA-BBBB
Responses
200

OK

get/communicator/templates/{templateVersionId}/vars
Response samples
application/json
[
  • "string"
]

Export all template descriptors and versions

Export all template descriptors and template versions for a company. The export is in JSON format. It can be used with the import endpoint to restore templates.

Securityoauth2 or bearerAuth or apiKeyHeader
Request
query Parameters
companyId
required
string

The company to export templates

activeOnly
boolean
Default: true

Export only active templates

Responses
200

OK

get/communicator/templates/export
Response samples
application/json
[
  • null
]

Import exported template descriptors and versions

Import exported template descriptors and template versions for a company. The exported data should come from the /communicator/templates/export endpoint.

The import will create new template descriptor if a matching one does not exist and will create new template versions if a matching one does not exist. This is often used to "promote" templates from a testing environment to a production environment.

Securityoauth2 or bearerAuth or apiKeyHeader
Request
query Parameters
companyId
required
string

The company to import templates for

allowActivate
boolean
Default: true

If an imported version data has new content and is marked active, activate the newly created template version.

Request Body schema: application/json
required

The exported template data

Array
any
Responses
204

Successfully imported

post/communicator/templates/import
Request samples
application/json
[
  • null
]