Api referenceNewsletters

Update a newsletter (Preview)

Preview · Available to selected organizations. Update named publishing settings. An enabled archive requires an opt-in topic and a hosted slug. Null clears the slug when the archive is disabled.

PATCH
/v1/newsletters/{id}

Update named publishing settings. An enabled archive requires an opt-in topic and a hosted slug. Null clears the slug when the archive is disabled.

Authorization

apiKey
headerx-api-key<token>

Path Parameters

id*string
Match^nl_[0-9a-hjkmnp-tv-z]{16,24}$

Header Parameters

idempotency-key?|null

Request Body

application/json
  1. body
archiveEnabled?boolean|null
publicationSlug?|null|null

Response Body

Newsletter

application/json
  1. response
id*NewsletterId
Match^nl_[0-9a-hjkmnp-tv-z]{16,24}$
topicId*TopicId
Match^unsub_[0-9a-hjkmnp-tv-z]{16,24}$
namespaceId*|null
name*string
description*string|null
issueProjectId*|null
archiveEnabled*boolean
publicationSlug*|null
createdAt*string
updatedAt*string
Example Request
import { createClient } from "samva";const samva = createClient({ apiKey: process.env.SAMVA_API_KEY! });const result = await samva.newsletters.update({  "id": "example"});
Example Response
{  "id": "string",  "topicId": "string",  "namespaceId": "string",  "name": "string",  "description": "string",  "issueProjectId": "string",  "archiveEnabled": true,  "publicationSlug": "string",  "createdAt": "string",  "updatedAt": "string"}