Email

With the Email endpoints you can manage Custom Domains and Notification Templates.

CustomDomainDto Object

Property

Type

Description

id

string

The id of the custom domain object.

domain

string

The domain name.

dns

DnsDto

Contains the DNS records that must be added to your domain.

valid

boolean

The indicator of the DNS records validity.

DnsDto Object

Property

Type

Description

mailCname

RecordDto

Record that must be added to your domain.

dkim1

RecordDto

Record that must be added to your domain.

dkim2

RecordDto

Record that must be added to your domain.

RecordDto Object

Property

Type

Description

valid

boolean

The indicator of the DNS record validity.

type

string

The type of the record that must be added to your domain.

host

string

The type of the record that must be added to your domain.

data

string

The value of the record that must be added to your domain.

CustomDomainRequestBody Object

Property

Type

Description

domain

string

The domain name.

NotificationTemplateResponseDto Object

Property

Type

Description

id

string

The id of the template.

isActive

boolean

Start sending this template to your customers.

isCustom

boolean

Boolean flag indicates customized template.

type

TypeDto

It holds the type related properties.

settings

SettingsDto

It holds the settings related properties.

content

ContentDto

It holds the content related properties.

TypeDto Object

Property

Type

Description

isScheduleCustom

boolean

Boolean flag indicates customized schedule.

isTriggerCustom

boolean

Boolean flag indicates customized trigger.

name

string

Name of the template.

schedule

number[]

Sets how many days after an impact creation a signup nudging email is sent out to your customer.

template

string

The name of the template. It can be: 'invitation', 'update', 'nudge'.

trigger

string[]

The name of the triggers. It can be:
'offsetPerOrder', 'offsetPerProduct',
'offsetBySpend',
'offsetByStoreRevenue',
'offsetByPercentageOrder',
'offsetPerSubscription',
'offsetPerReview',
'offsetByApi'.

SettingsDto Object

Property

Type

Description

alias

string

This is the name display for the specified sender email address.

from

EmailDto

The email address used for sending emails.

isAliasCustom

boolean

Boolean flag indicates customized alias.

isFromCustom

boolean

Boolean flag indicates customized sender email address.

isPreheaderCustom

boolean

Boolean flag indicates customized preheader.

isSubjectCustom

boolean

Boolean flag indicates customized subject.

preheader

string

The preheader is the text following the subject line when an email is previewed.

schedule

ScheduleDto

You can choose to send your template continuously starting at the selected start date or only during a specific date range.

subject

string

Your subject line is one of the first things that your customers read and is a key driver in successful open rates.

EmailDto Object

Property

Type

Description

domain

string

The domain name used for sending emails based on this template.

name

string

The name part of the email address.

ScheduleDto Object

Property

Type

Description

startDate

string

The start date of the scheduled email sending.

isEndDateCustom

boolean

Boolean flag indicates customized schedule end date.

endDate

string

The end date of the scheduled email sending.

ContentDto Object

Property

Type

Description

body

string

Use our pre-defined email body or customise it to fit your brand. Add dynamic data by using the variables provided.

headerImage

string

Add your own logo to the top of the email or use our pre-defined header image. If you use your own header image please ensure it is maximum 1370 x 700, or has a 2:1 aspect ratio.

isBodyCustom

boolean

Boolean flag indicates customized body.

isFooterHidden

boolean

Hide our email footer explaining the benefits of Greenspark.

isFooterHiddenCustom

boolean

Boolean flag indicates customized hidden footer setting.

isHeaderImageCustom

boolean

Boolean flag indicates customized header image.

isTotalImpactHidden

boolean

Hide your total impact so far within your emails.

isTotalImpactHiddenCustom

boolean

Boolean flag indicates customized hidden total impact setting.

TestNotificationTemplateRequestDto Object

Property

Type

Description

customerEmail

string

Test recipient email address.

notificationTemplate

NotificationTemplateRequestDto

Notification template to test.

NotificationTemplateRequestDto Object

Property

Type

Description

isActive

boolean

Start sending this template to your customers.

type

TypeRequestBody

It holds the type related properties.

settings

SettingsRequestBody

It holds the settings related properties.

content

ContentRequestBody

It holds the content related properties.

TypeRequestBody Object

Property

Type

Description

name

string

maxLength: 100

Name of the template

template

string

The type of the template.

'invitation', 'update', 'nudge'

trigger

string[]

Choose the impact action which triggers your email to be sent out.

'offsetPerOrder', 'offsetPerProduct', 'offsetBySpend', 'offsetByStoreRevenue', 'offsetByPercentageOrder', 'offsetPerSubscription', 'offsetPerReview',
'offsetByApi'

schedule

number[]

Sets how many days after an impact creation a signup nudging email is sent out to your customer.

integer
maximum: 365
minimum: 0

SettingsRequestBody Object

Property

Type

Description

from

EmailRequestBody

The email address used for sending emails.

alias

string

maxLength: 100

This is the name display for the specified sender email address.

subject

string

maxLength: 100

Your subject line is one of the first things that your customers read and is a key driver in successful open rates.

preheader

string

maxLength: 100

The preheader is the text following the subject line when an email is previewed.

schedule

ScheduleRequestBody

You can choose to send your template continuously starting at the selected start date or only during a specific date range.

EmailRequestBody Object

Property

Type

Description

name

string

maxLength: 100

The domain name used for sending emails based on this template.

domain

string

The name part of the email address.

ScheduleRequestBody Object

Property

Type

Description

startDate

string

The start date of the scheduled email sending.

ISO8601 date and time string.

endDate

string

The end date of the scheduled email sending.

ISO8601 date and time string.

ContentRequestBody Object

Property

Type

Description

headerImage

string

maxLength: 50000

Add your own logo to the top of the email or use our pre-defined header image. If you use your own header image please ensure it is maximum 1370 x 700, or has a 2:1 aspect ratio. You can upload it as a base 64 encoded image.

body

string

Use our pre-defined email body or customise it to fit your brand. Add dynamic data by using the variables provided.

isFooterHidden

boolean

Hide our email footer explaining the benefits of Greenspark.

isTotalImpactHidden

boolean

Hide your total impact so far within your emails.