Skip to content

Update an issue

PUT/v1/organization/{orgId}/marketing/newsletter/issues/{issueId}

US Region: https://public-api.sessionboard.com · EU Region: https://public-api-eu.sessionboard.com

Subject, preheader, layout and blocks of a draft or scheduled issue (a sent issue cannot change). Sends nothing. Requires write:marketing; refused for a key restricted to particular events. Also at PUT /v1/marketing/newsletter/issues/{issueId}.

Request example

Terminal window
curl --request PUT \
--url 'https://public-api.sessionboard.com/v1/organization/{orgId}/marketing/newsletter/issues/{issueId}' \
--header 'x-access-token: <api-token>' \
--header 'Content-Type: application/json' \
--data '{
"subject": "<string>",
"preheader": "<string>",
"blocks": [],
"layout": "single"
}'

Try it

Authorization

Your token stays in this page. It is sent only to the region above and is never saved; it is gone when you leave or reload the page.

Path parameters
Body application/json
PUT

Authorizations

  • x-access-tokenstringheader

    Organization API token. Generate from Organization Settings → API Tokens.

  • AuthorizationBearer <token>headeror

    OAuth 2.1 access token. Obtained via the OAuth PKCE flow at /oauth/token.

Send one of these. See Authentication.

Path parameters

  • orgIdstringpathrequired

    Your organization ID. Any other organization returns 404.

  • issueIdstringpathrequired

    The issue

Request body

application/json

  • subjectstring
  • preheaderstring
  • blocksany[]

    Blocks: heading, text, clip, quote, episode, button, image (the whole list, in order)

  • layoutstring
    Allowed values
    "single", "feature", "digest"
{
"subject": "<string>",
"preheader": "<string>",
"blocks": [],
"layout": "single"
}

Responses

200application/json

payload.issue with the edited issue, plus what_changed and kept. The issue as it was is kept as a version before every edit; restore it with POST …/issues/{issueId}/versions/{versionId}/restore.

  • payloadobject

    Returned by every edit to an existing Marketing asset (event pages, Sites, lifecycle email proposals, newsletter issues, campaign drafts): what changed, how to undo it, and whether anything reaches people.

    Show child attributes
    • issueobject
    • what_changedWhatChanged

      What one edit changed, in plain words. summary is one sentence per change ("Changed Hero heading on the home page: “Old” → “New”"); the lists carry the same changes as data. Text is plain (HTML removed) and clipped to 200 characters; a block lists at most 8 changed fields and says how many more there were.

      Show child attributes
      • has_changesboolean
      • summarystring[]
      • addedobject[]
        Show child attributes
        • wherestring | null
          Example
          "on the home page"
        • whatstring | null
          Example
          "FAQ"
        • block_idstring | null
        • kindstring | null
        • textstring | null
      • changedobject[]
        Show child attributes
        • wherestring | null
        • whatstring | null
        • block_idstring | null
        • kindstring | null
        • fieldsobject[]
          Show child attributes
          • fieldstring
          • labelstring
          • beforestring | null
          • afterstring | null
        • more_fieldsinteger
      • removedobject[]
        Show child attributes
        • wherestring | null
        • whatstring | null
        • block_idstring | null
        • kindstring | null
        • textstring | null
      • movedobject[]
        Show child attributes
        • wherestring | null
        • whatstring | null
        • block_idstring | null
        • frominteger
        • tointeger
    • keptEditKept

      How to get back to what was there before this edit.

      Show child attributes
      • keptboolean
      • version_idstring | null
      • versioninteger | null
      • howstring

        One sentence saying where the earlier version is and how to restore it.

      • restoreobject | null

        The call that undoes this edit.

        Show child attributes
        • toolstring
          Example
          "restore_site_version"
        • argsobject
    • reaches_peoplestring

403

  • SCOPE_REQUIRED — the token lacks read:marketing (reads) or write:marketing (writes).
  • ORG_WIDE_TOKEN_REQUIRED — the token is restricted to particular events; this operation reads the whole organization.
  • FORBIDDEN — the organization's plan does not include Marketing, or the token's user cannot change goals (writes need an organization admin or the organization settings permission).

404

Not found in your organization.

Response examples

{
"payload": {
"issue": {},
"what_changed": {
"has_changes": true,
"summary": [
"<string>"
],
"added": [
{
"where": "on the home page",
"what": "FAQ",
"block_id": "<string>",
"kind": "<string>",
"text": "<string>"
}
],
"changed": [
{
"where": "<string>",
"what": "<string>",
"block_id": "<string>",
"kind": "<string>",
"fields": [
{
"field": "<string>",
"label": "<string>",
"before": "<string>",
"after": "<string>"
}
],
"more_fields": 123
}
],
"removed": [
{
"where": "<string>",
"what": "<string>",
"block_id": "<string>",
"kind": "<string>",
"text": "<string>"
}
],
"moved": [
{
"where": "<string>",
"what": "<string>",
"block_id": "<string>",
"from": 123,
"to": 123
}
]
},
"kept": {
"kept": true,
"version_id": "<string>",
"version": 123,
"how": "<string>",
"restore": {
"tool": "restore_site_version",
"args": {}
}
},
"reaches_people": "<string>"
}
}