Skip to content

List post templates

GET
/api/v1/newsletter/templates
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.

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>
default: <= 2000 items
object
text
required
string
<= 20000 characters
marks
Array<string>
<= 5 items
Allowed values: bold italic underline strike code
href
string
>= 1 characters <= 2000 characters
type
required
string
Allowed value: paragraph
show
required
object
on
required
string
default: both
Allowed values: both email web
tiers
required
string
default: all
Allowed values: all free paid
createdBy
required
string | null
updatedAt
required
Any of:
string format: date-time

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
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
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
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
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
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
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
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
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
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}