Create a letter template
Writes a new letter template from email and chat content you supply. Every placeholder in that content is checked against the channels you name, and the whole call fails if one of them is not offered. Requires the letter_templates:write permission.
Authorization
AuthorizationstringrequiredBody
application/json
At least one of emailBody and chatContent must be filled in — a template with neither is rejected.
namestringThe name shown to the property manager. Up to 250 characters.
letterTemplateGroupIdstringFile the template under this group. A 64-bit number sent as a string. Leave it out to keep the template ungrouped.
communicationChannelsenum<string>[]requiredThe kinds of recipient this template can be addressed to. Each value decides which placeholders the content may use — a lease template can use {{rent_amount}}, a vendor template cannot. When several are listed, only the placeholders every one of them offers are allowed.
emailSubjectstringSubject line for the email form of this template. Up to 500 characters. Placeholders are allowed and are validated the same way as the body.
emailBodystringThe email body, as HTML. No length limit.
chatContentstringThe chat message body, as plain text. Up to 5000 characters.
Response
200 · The template that was created.
idstringrequiredThe letter template. A 64-bit number sent as a string — do not parse it as a JavaScript number.
letterTemplateGroupIdstringThe group this template is filed under. Absent while the template is ungrouped.
namestringThe name shown to the property manager. Absent when the template was created without one.
communicationChannelsenum<string>[]requiredThe kinds of recipient this template can be addressed to.
emailSubjectstringSubject line used when the template is sent as an email. Absent when the template is chat-only.
emailBodystringThe email body, as HTML, with placeholders still in {{key}} form. Absent when the template is chat-only.
chatContentstringThe chat message body, as plain text, with placeholders still in {{key}} form. Absent when the template is email-only.
sourceFileIdstringThe uploaded Word file this template was imported from. Present only on imported templates, and it is what isImported filters on.
createdstring · date-timerequiredWhen the template was created, in the company's timezone and with no offset.
updatedstring · date-timerequiredWhen the template was last changed, in the company's timezone and with no offset.
400 · `communicationChannels` is empty, both `emailBody` and `chatContent` are blank, or the content uses a placeholder the named channels do not offer. The `detail` names the offending placeholders.
401 · The access token is missing, expired, or not a property-manager token.
403 · The token is valid but the caller does not hold the `letter_templates:write` permission.
404 · `letterTemplateGroupId` names a group that does not exist, or belongs to another company.
Errors come back as application/problem+json. See Errors for the shape.