List post templates
GET
/api/v1/newsletter/templates
const url = 'https://digize.com/api/v1/newsletter/templates';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/templates \ --header 'x-api-key: <x-api-key>'The built-in starting layouts, then the templates saved from the workspace’s posts. Start a post from one with newsletter.posts.create and its templateId.
Needs the newsletter:read permission.
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”Done
Media typeapplication/json
object
data
required
Array<object>
object
id
required
string
name
required
string
description
required
string
builtIn
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
createdBy
required
string | null
Example
{ "data": [ { "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" }}