SPA Email Templates

SPA: Creates a new Email Template

Creates a new email template for the authenticated user's client.

POST/api/spa/email-templates

Authorizations

X-AUTH-TOKEN
stringheaderrequired

Value for the X-AUTH-TOKEN header parameter.

Request Body

application/json
required

The new EmailTemplate resource

{
  "id": 12345,
  "identifier": "key1",
  "description": "Invoice for contract <<contract.number>>",
  "comment": "This is a special email template",
  "to": "<<customer.firstname>>.<<customer.surname>>@output.rocks",
  "cc": "<<customer.firstname>>",
  "bcc": "<<customer.surname>>",
  "fromName": "<<customer.firstname>>",
  "replyTo": "<<customer.surname>>",
  "subject": "Your Balance is <<customer.balance>>",
  "body": "<div style=\"padding-bottom: 30px\"> Hi <<customer.firstname>>, <br>\n                          This is a sample HTML-Template to show you, how to use the power of Output.Rocks ;)\n                          </div>",
  "text": "Email text <<customer.firstname>>",
  "textPath": "string",
  "color": "#083E5D",
  "path": "string",
  "maxBlockedAmount": 10,
  "paused": false,
  "bounceHandling": false,
  "bounceRerenderEnabled": false,
  "bounceRerenderTemplateIdentifier": "string",
  "bounceRerenderFormat": "pdf",
  "bounceRerenderWebhookIdentifier": "string",
  "bounceRerenderMailServerIdentifier": "string",
  "bounceRerenderExternalIdPattern": "string",
  "bounceRerenderMetadata": [
    "string"
  ],
  "fileName": "<<or.expression.timestamp({\"format\":\"Y-m-d-H-i-s\"})>>_sample",
  "customId": "<<contract.id>>",
  "attachmentIdentifiers": [
    "invoice",
    "document"
  ],
  "emailAttachmentIdentifiers": [
    "email-1",
    "email-2"
  ],
  "validatorIdentifiers": [
    "address_validator",
    "product_validator"
  ],
  "standardEmailIdentifier": "user@example.com",
  "createdBy": "user1@company.com",
  "updatedBy": "user1@company.com",
  "createdAt": "2024-08-23T00:00:00+00:00",
  "updatedAt": "2024-08-23T00:00:00+00:00",
  "client": {},
  "subClient": {},
  "brandIdentifier": "default",
  "active": true,
  "activeFrom": "2024-01-01",
  "versionGroup": "123e4567-e89b-12d3-a456-426614174000",
  "versionNumber": 1,
  "supersededAt": "2024-08-23T00:00:00+00:00",
  "changeSummaryDe": "string",
  "changeSummaryEn": "string",
  "summaryStatus": "pending",
  "groupIdentifier": "my_group",
  "groupCondition": "data['contract']['balance'] > 0",
  "reviewCondition": "data['contract']['id'] > 1000",
  "subClientDefault": false,
  "legacy": true,
  "subClientId": 3,
  "subClientDescription": "Branch Office A",
  "subClientColor": "#083E5D"
}

Response

201application/json

EmailTemplate resource created

id
integer

Identifier generated by Output.Rocks.

Example: 12345

identifier
stringrequired

Unique identifier

Example: "key1"

description
string

EmailTemplate description / title. <<>>-Syntax can be used for dynamical generation.

Example: "Invoice for contract <<contract.number>>"

comment
string

Comments and notes

Example: "This is a special email template"

to
string

Email to <<>>-Syntax can be used for dynamical generation.

Example: "<<customer.firstname>>.<<customer.surname>>@output.rocks"

cc
string

Optional value in <<>>-Syntax can be used for dynamical generation.

Example: "<<customer.firstname>>"

bcc
string

Optional value in <<>>-Syntax can be used for dynamical generation.

Example: "<<customer.surname>>"

fromName
string

Optional value in <<>>-Syntax can be used for dynamical generation.

Example: "<<customer.firstname>>"

replyTo
string

Optional value in <<>>-Syntax can be used for dynamical generation.

Example: "<<customer.surname>>"

subject
string

Email subject <<>>-Syntax can be used for dynamical generation.

Example: "Your Balance is <<customer.balance>>"

body
string

Email body <<>>-Syntax can be used for dynamical generation.

Example: "<div style=\"padding-bottom: 30px\"> Hi <<customer.firstname>>, <br>\n This is a sample HTML-Template to show you, how to use the power of Output.Rocks ;)\n </div>"

text
string

Email text <<>>-Syntax can be used for dynamical generation.

Example: "Email text <<customer.firstname>>"

textPath
string | null
color
string

HTML color code to be used on Dashboard-charts and statistics.

Example: "#083E5D"

path
string | null
maxBlockedAmount
integer

Maximum amount of accepted errors. EmailTemplate will be paused in case of reaching this limit

Example: 10

paused
boolean

Paused flag. Default: false

Available options: truefalse

Example: false

bounceHandling
boolean

BounceHandling flag. Default: false

Available options: truefalse

Example: false

bounceRerenderEnabled
boolean

Available options: truefalse

Example: false

bounceRerenderTemplateIdentifier
string | null
bounceRerenderFormat
enum<string> | null

Available options: pdfdocdocxodtrtfhtmltxt

bounceRerenderWebhookIdentifier
string | null
bounceRerenderMailServerIdentifier
string | null
bounceRerenderExternalIdPattern
string | null
bounceRerenderMetadata
string | null[] | null
fileName
string

Target file name without extension <<>>-Syntax can be used for dynamical generation.

Example: "<<or.expression.timestamp({\"format\":\"Y-m-d-H-i-s\"})>>_sample"

customId
string

Optional value in <<>>-Syntax to be extracted and stored on each rendered document.

Example: "<<contract.id>>"

attachmentIdentifiers
string[]

Identifier list of attachments, used in current email template

Example: ["invoice","document"]

emailAttachmentIdentifiers
string[]

Identifier list of emailAttachments, used in current email template

Example: ["email-1","email-2"]

validatorIdentifiers
string[]

Identifier list of validators, to be executed on current template

Example: ["address_validator","product_validator"]

standardEmailIdentifier
string | null
createdBy
string

User, created this entry

Example: "user1@company.com"

updatedBy
string

User, updated this entry

Example: "user1@company.com"

createdAt
string<date-time>

UTC date time of entry creation

Example: "2024-08-23T00:00:00+00:00"

updatedAt
string<date-time>

UTC date time of last entry update

Example: "2024-08-23T00:00:00+00:00"

client
object
subClient
object
brandIdentifier
stringrequired

Example: "default"

active
boolean

Active flag. Default: true

Available options: truefalse

Example: true

activeFrom
string<date-time>

Date to activate the entry. Default: today

Example: "2024-01-01"

versionGroup
string<uuid>

Immutable lineage key shared by all versions of this configuration entry.

versionNumber
integer

Monotonic version counter within the version group. Display/audit only, not part of resolution.

Example: 1

supersededAt
string<date-time>

Moment from which this version is superseded by a newer version of the same version group. Null while the version is (or is scheduled to become) the current one.

changeSummaryDe
string

AI generated German summary of the changes introduced by this version.

changeSummaryEn
string

AI generated English summary of the changes introduced by this version.

summaryStatus
enum<string>

Generation status of the AI change summary.

Available options: pendingdonefailed

groupIdentifier
string

Optional group identifier to be used with group conditions

Example: "my_group"

groupCondition
string

Group condition.

Example: "data['contract']['balance'] > 0"

reviewCondition
string

Review condition.

Example: "data['contract']['id'] > 1000"

subClientDefault
boolean

Default for environmental tenants (sub-clients)

Available options: truefalse

Example: false

legacy
boolean

Available options: truefalse

subClientId
integer

SubClient ID. Provided on instances with enabled sub-client module only.

Example: 3

subClientDescription
string

SubClient description. Provided on instances with enabled sub-client module only.

Example: "Branch Office A"

subClientColor
string

SubClient display colour. Provided on instances with enabled sub-client module only.

Example: "#083E5D"