Update an issue
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
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"}'const response = await fetch('https://public-api.sessionboard.com/v1/organization/{orgId}/marketing/newsletter/issues/{issueId}', { method: 'PUT', headers: { "x-access-token": "<api-token>", "Content-Type": "application/json" }, body: JSON.stringify({ "subject": "<string>", "preheader": "<string>", "blocks": [], "layout": "single" }),});
const data = await response.json();console.log(data);import requests
response = requests.request( "PUT", "https://public-api.sessionboard.com/v1/organization/{orgId}/marketing/newsletter/issues/{issueId}", headers={ "x-access-token": "<api-token>", "Content-Type": "application/json" }, json={ "subject": "<string>", "preheader": "<string>", "blocks": [], "layout": "single" },)
print(response.json())<?php
$curl = curl_init();
curl_setopt_array($curl, [ CURLOPT_URL => "https://public-api.sessionboard.com/v1/organization/{orgId}/marketing/newsletter/issues/{issueId}", CURLOPT_RETURNTRANSFER => true, CURLOPT_CUSTOMREQUEST => "PUT", CURLOPT_POSTFIELDS => '{ "subject": "<string>", "preheader": "<string>", "blocks": [], "layout": "single"}', CURLOPT_HTTPHEADER => [ "x-access-token: <api-token>", "Content-Type: application/json", ],]);
$response = curl_exec($curl);curl_close($curl);
echo $response;package main
import ( "fmt" "io" "net/http" "strings")
func main() { req, _ := http.NewRequest("PUT", "https://public-api.sessionboard.com/v1/organization/{orgId}/marketing/newsletter/issues/{issueId}", strings.NewReader(`{ "subject": "<string>", "preheader": "<string>", "blocks": [], "layout": "single"}`)) req.Header.Add("x-access-token", "<api-token>") req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))}HttpRequest request = HttpRequest.newBuilder() .uri(URI.create("https://public-api.sessionboard.com/v1/organization/{orgId}/marketing/newsletter/issues/{issueId}")) .header("x-access-token", "<api-token>") .header("Content-Type", "application/json") .method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"subject\": \"<string>\",\n \"preheader\": \"<string>\",\n \"blocks\": [],\n \"layout\": \"single\"\n}")) .build();
HttpResponse<String> response = HttpClient.newHttpClient() .send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());Try it
Response headers
Authorizations
x-access-tokenstringheaderOrganization API token. Generate from Organization Settings → API Tokens.
AuthorizationBearer <token>headerorOAuth 2.1 access token. Obtained via the OAuth PKCE flow at
/oauth/token.
Send one of these. See Authentication.
Path parameters
orgIdstringpathrequiredYour organization ID. Any other organization returns
404.issueIdstringpathrequiredThe issue
Request body
subjectstringpreheaderstringblocksany[]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.
payloadobjectReturned 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
issueobjectwhat_changedWhatChangedWhat one edit changed, in plain words.
summaryis 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_changesbooleansummarystring[]addedobject[]Show child attributes
wherestring | null- Example
"on the home page"
whatstring | null- Example
"FAQ"
block_idstring | nullkindstring | nulltextstring | null
changedobject[]Show child attributes
wherestring | nullwhatstring | nullblock_idstring | nullkindstring | nullfieldsobject[]Show child attributes
fieldstringlabelstringbeforestring | nullafterstring | null
more_fieldsinteger
removedobject[]Show child attributes
wherestring | nullwhatstring | nullblock_idstring | nullkindstring | nulltextstring | null
movedobject[]Show child attributes
wherestring | nullwhatstring | nullblock_idstring | nullfromintegertointeger
keptEditKeptHow to get back to what was there before this edit.
Show child attributes
keptbooleanversion_idstring | nullversioninteger | nullhowstringOne sentence saying where the earlier version is and how to restore it.
restoreobject | nullThe call that undoes this edit.
Show child attributes
toolstring- Example
"restore_site_version"
argsobject
reaches_peoplestring
403
SCOPE_REQUIRED— the token lacksread:marketing(reads) orwrite: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>" }}