The newsletters this site offers
const url = 'https://your-tenant-host/v1/newsletters/lists';const options = { method: 'GET', headers: {'x-edgekit-site-id': 'site_example', Authorization: 'Bearer <token>'}};
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://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.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”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.
Example
site_exampleThe 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.
Responses
Section titled “Responses”Every deployed list for this site.
object
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.
object
The list’s id (UUIDv7). A list is named by its id, never by its slug.
^[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.
What a preference centre renders and what the confirmation email says it is confirming. Tenant-authored, staged and deployed.
A sentence, or null. Shown in the confirmation email beside the label; without it, somebody subscribing to two lists gets two identical emails.
Example
{ "lists": [ { "id": "01999b1e-7a40-7c2d-9e51-2a4c8d0f6b31", "slug": "morning_briefing", "label": "The Morning Briefing" } ]}Invalid request.
object
object
Example
{ "error": { "code": "unauthorized", "message": "Invalid or missing API key." }}Missing or invalid credential.
object
object
Example
{ "error": { "code": "unauthorized", "message": "Invalid or missing API key." }}Not allowed.
object
object
Example
{ "error": { "code": "unauthorized", "message": "Invalid or missing API key." }}Resource not found.
object
object
Example
{ "error": { "code": "unauthorized", "message": "Invalid or missing API key." }}Request validation failed.
object
object
Example
{ "error": { "code": "unauthorized", "message": "Invalid or missing API key." }}Unexpected error.
object
object
Example
{ "error": { "code": "unauthorized", "message": "Invalid or missing API key." }}