Update a letter's design settings
const url = 'https://api.tryletterhead.com/api/v3/letters/example/settings';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"backgroundColor":"#FFFFFF","textColor":"#222222","linkColor":"#1A73E8","buttonColor":"#1A73E8","buttonTextColor":"#FFFFFF","maxWidthDesktop":"640px","useChannelSettings":{"backgroundColor":false,"buttonColor":false,"linkColor":false}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.tryletterhead.com/api/v3/letters/example/settings \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "backgroundColor": "#FFFFFF", "textColor": "#222222", "linkColor": "#1A73E8", "buttonColor": "#1A73E8", "buttonTextColor": "#FFFFFF", "maxWidthDesktop": "640px", "useChannelSettings": { "backgroundColor": false, "buttonColor": false, "linkColor": false } }'Update a letter’s design settings — colors, fonts, spacing, buttons, links, and whether the letter
follows its channel’s defaults for each of those, field by field. This is the narrower alternative
updateALetter points to when you only need to change styling rather than round-tripping the whole
letter.
The request body is the full settings object; like updateALetter, this replaces the settings
wholesale rather than merging individual fields — fetch the letter first with Retrieve a Letter by
its UUID (its settings field) if you’re changing only part of it.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”The letter’s unique identifier — an alphanumeric string around ten characters, e.g. ludctamgd6.
Request Body required
Section titled “Request Body required ”The letter’s design settings — colors, fonts, spacing, buttons, links, images, and per-field useChannelSettings flags for whether that field follows the channel default instead. Shown here are representative fields; the object carries many more.
object
One boolean per styleable field on this settings object — backgroundColor, buttonColor, linkColor, and more not shown here — controlling whether that field follows the channel’s default instead of the value set above. Shown here are representative keys; every key in the object, not just these three, is required.
object
Example
{ "backgroundColor": "#FFFFFF", "textColor": "#222222", "linkColor": "#1A73E8", "buttonColor": "#1A73E8", "buttonTextColor": "#FFFFFF", "maxWidthDesktop": "640px", "useChannelSettings": { "backgroundColor": false, "buttonColor": false, "linkColor": false }}Responses
Section titled “ Responses ”Settings updated
Still can’t find what you need? Contact support.