Skip to content

Get a published post

GET
/api/v1/newsletter/published/{slug}
curl --request GET \
--url https://digize.com/api/v1/newsletter/published/example \
--header 'x-api-key: <x-api-key>'

One post on the web by its slug, for the site’s post page: its web HTML, blocks and SEO fields, cut at the paywall for free readers, in full for a paid reader whose token is passed as reader. Null when no published post has that slug.

Needs the newsletter:read permission.

slug
required
string
>= 1 characters <= 80 characters
reader

A reader token from newsletter.readers.verify: a paid reader gets paid posts in full.

string
<= 1000 characters

A reader token from newsletter.readers.verify: a paid reader gets paid posts in full.

Done

Media typeapplication/json
Any of:
object
id
required
string
slug
required
string
url
required

Its address on the site, from the post URL pattern in Newsletter › Settings; null without one.

string | null
title
required
string
subtitle
required
string
seo
required
object
title
required

The title, unless an SEO title was set.

string
description
required

The SEO description, the subtitle, or the first words.

string
thumbnailUrl
required
string | null
tags
required
Array<string>
authors
required
Array<object>
object
id
required
string
name
required
string
access
required
string
Allowed values: all free paid
publishedAt
required
string format: date-time
html
required

The post’s web HTML: semantic tags with nl- classes (nl-image, nl-button, nl-embed, nl-paywall…) for the site to style. Cut at the paywall for free readers.

string
blocks
required

The blocks behind the HTML, cut the same way, for a site that renders its own.

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
paywalled
required

Whether something was held back for paid readers.

boolean
excerpt
required

The first words, for an archive or a feed.

string

Example

{
"access": "all",
"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"
}
}