Get the welcome and confirmation emails
GET
/api/v1/newsletter/emails
const url = 'https://digize.com/api/v1/newsletter/emails';const options = {method: 'GET', headers: {'x-api-key': '<x-api-key>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://digize.com/api/v1/newsletter/emails \ --header 'x-api-key: <x-api-key>'Newsletter › Settings › Emails: the welcome email new subscribers get (on or off, its subject, preview text and blocks) and the confirmation email’s words.
Needs the newsletter:read permission.
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”Done
Media typeapplication/json
object
welcome
required
object
enabled
required
boolean
subject
required
string
preview
required
string
blocks
required
Array
One of:
object
content
required
Array<object>
object
text
required
string
marks
Array<string>
href
string
type
required
string
show
required
object
on
required
string
tiers
required
string
object
ordered
required
boolean
items
required
Array<Array<object>>
type
required
string
show
required
object
on
required
string
tiers
required
string
object
paragraphs
required
Array<Array<object>>
type
required
string
show
required
object
on
required
string
tiers
required
string
object
label
required
string
href
required
string
align
required
string
type
required
string
show
required
object
on
required
string
tiers
required
string
object
type
required
string
show
required
object
on
required
string
tiers
required
string
object
code
required
string
language
required
string
type
required
string
show
required
object
on
required
string
tiers
required
string
object
header
required
boolean
rows
required
Array<Array<Array<object>>>
type
required
string
show
required
object
on
required
string
tiers
required
string
object
html
required
string
type
required
string
show
required
object
on
required
string
tiers
required
string
object
label
required
string
type
required
string
show
required
object
on
required
string
tiers
required
string
object
title
required
string
text
required
string
button
required
string
showCount
required
boolean
type
required
string
show
required
object
on
required
string
tiers
required
string
object
pollId
required
string
question
required
string
options
required
Array<string>
showResults
required
boolean
type
required
string
show
required
object
on
required
string
tiers
required
string
confirmation
required
The confirmation email’s words; an empty one keeps the default.
object
subject
required
string
heading
required
string
body
required
string
button
required
string
Example
{ "welcome": { "blocks": [ { "content": [], "type": "paragraph", "show": { "on": "both", "tiers": "all" } } ] }}What was sent isn’t valid (invalid).
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details
object
key
additional properties
any
Example
{ "error": { "code": "invalid" }}No key, or one that’s unknown, off or expired.
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details
object
key
additional properties
any
Example
{ "error": { "code": "invalid" }}The key doesn’t have the permission this needs.
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details
object
key
additional properties
any
Example
{ "error": { "code": "invalid" }}Nothing has that id (not_found).
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details
object
key
additional properties
any
Example
{ "error": { "code": "invalid" }}Over the rate limit; see retry-after.
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details
object
key
additional properties
any
Example
{ "error": { "code": "invalid" }}