Brand styles
List the brand style palettes available to your account and apply them to an email.
A brand style is a palette — one font and six colours — that an email can be styled with. This endpoint returns every palette available to your account in a single call: your own brand styles, the default the editor falls back to, and the built-in presets.
Get the brand styles
If you want to get every palette an email can be styled with, use this GET request
GET https://connect.mailerlite.com/api/brand-stylesSections
brand is your account's own palette, as set under Account settings → Brand styles. It is null until at least one font or colour is changed from its default; once one is, the fields left alone are filled in from the same defaults the editor uses, so the palette is always complete.
default is the palette the editor applies to an email when your account has no brand styles of its own.
presets are the built-in palettes, in the order the editor lists them. The list grows as presets are added.
Identifying a palette
identifier is the stable handle for a palette. It is account for your brand styles, default-brand for the default, and preset- followed by the preset's own name for a preset, for example preset-business-casual.
name is the palette's English display label; the editor shows it translated. It is there to be displayed, not matched on — it can be reworded at any time, and two palettes may share a name.
One further identifier exists in the editor, template, meaning "the palette this email's template was built with". It is never returned here, because it belongs to one email rather than to your account.
Values
Every colour is lowercase hexadecimal, for example #2cb191, and every font_family is an unquoted CSS font stack, for example Inter, sans-serif. Both are normalised on the way out. Your account's stored values are not changed by reading them.
Response
Response code: 200 OK{
"data": {
"brand": {
"identifier": "account",
"name": "Your brand styles",
"font_family": "Inter, sans-serif",
"primary_color": "#123456",
"secondary_color": "#000000",
"heading_color": "#000000",
"text_color": "#515856",
"border_color": "#eaeced",
"background_color": "#ffffff"
},
"default": {
"identifier": "default-brand",
"name": "Default brand styles",
"font_family": "Inter, sans-serif",
"primary_color": "#2cb191",
"secondary_color": "#000000",
"heading_color": "#000000",
"text_color": "#767c87",
"border_color": "#d4d4d4",
"background_color": "#ffffff"
},
"presets": [
{
"identifier": "preset-business-casual",
"name": "Business casual",
"font_family": "Inter, sans-serif",
"primary_color": "#444de8",
"secondary_color": "#1f1f21",
"heading_color": "#000000",
"text_color": "#666666",
"border_color": "#24246e",
"background_color": "#fafafa"
},
{
"identifier": "preset-retro",
"name": "Retro",
"font_family": "Inter, sans-serif",
"primary_color": "#61dc78",
"secondary_color": "#ff9b56",
"heading_color": "#ffffff",
"text_color": "#ffffff",
"border_color": "#22225b",
"background_color": "#090935"
}
]
}
}Applying a palette
Apply a palette to an email with PATCH /emails/{email_id}/settings:
- A preset: send its
identifierasbrand.style, for examplepreset-business-casual. The email then reads back asbrand.mode: custom. - Your brand styles: send
brand.mode: account. - The default: send its
font_family,background_color,text_colorandborder_colorwithbrand.mode: custom.
{
"etag": "42",
"brand": { "style": "preset-business-casual" }
}See the Brand section of Emails for how brand.mode and individual colours interact.