Skip to content

The newsletters this site offers

GET
/v1/newsletters/lists
curl --request GET \
--url https://your-tenant-host/v1/newsletters/lists \
--header 'Authorization: Bearer <token>' \
--header 'x-edgekit-site-id: site_example'

The deployed list set for the selected site. A disabled list is left out of the deployed document entirely, so it cannot appear here and there is no flag to filter on. A tenant that has never deployed answers an empty set, the same as a tenant with no newsletters: by design, nothing distinguishes the two.

x-edgekit-site-id
required

The site this request is for, within this tenant. Every official EdgeKit SDK sets it from the client you configured; set it yourself only when calling this API directly.

string
>= 1 characters <= 128 characters

Example

site_example

The site this request is for, within this tenant. Every official EdgeKit SDK sets it from the client you configured; set it yourself only when calling this API directly.

Every deployed list for this site.

Media typeapplication/json
object
lists
required

The deployed set for the selected site. A disabled list is left out of the deployed document entirely, so it cannot appear here and there is no enabled field to read.

Array<object>
object
id
required

The list’s id (UUIDv7). A list is named by its id, never by its slug.

string format: uuid
slug
required

^[a-z][a-z0-9_]*$, unique per site: two sites in one organization can both run a morning_briefing, so it is not unique per tenant.

string
label
required

What a preference centre renders and what the confirmation email says it is confirming. Tenant-authored, staged and deployed.

string
description
required

A sentence, or null. Shown in the confirmation email beside the label; without it, somebody subscribing to two lists gets two identical emails.

string | null

Example

{
"lists": [
{
"id": "01999b1e-7a40-7c2d-9e51-2a4c8d0f6b31",
"slug": "morning_briefing",
"label": "The Morning Briefing"
}
]
}

Invalid request.

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details

Example

{
"error": {
"code": "unauthorized",
"message": "Invalid or missing API key."
}
}

Missing or invalid credential.

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details

Example

{
"error": {
"code": "unauthorized",
"message": "Invalid or missing API key."
}
}

Not allowed.

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details

Example

{
"error": {
"code": "unauthorized",
"message": "Invalid or missing API key."
}
}

Resource not found.

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details

Example

{
"error": {
"code": "unauthorized",
"message": "Invalid or missing API key."
}
}

Request validation failed.

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details

Example

{
"error": {
"code": "unauthorized",
"message": "Invalid or missing API key."
}
}

Unexpected error.

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details

Example

{
"error": {
"code": "unauthorized",
"message": "Invalid or missing API key."
}
}