Blog

Branding and white-labeling email notifications

Aydrian HowardAydrian HowardAugust 05, 2020
Courier Live: Branding and white-labeling email notifications-header

During our July 29th Courier Live, I was joined by our Head of Customer Success, Nate Munger. Together we discussed our new Brands feature set and walked through using it to send an email.

Check out the video below to watch us:

  • Create a Brand using the Courier Designer
  • Create a Brand using the Courier Brands API using our Python SDK
  • Create a Booking Confirmation notification to use with our new brands
  • Send the notification using multiple brands with the Python SDK

Be sure to Like the video and Subscribe to our YouTube channel.

Grab the Code

During this stream, we used Python to create our Foxhub brand.

import pprint
from trycourier import Courier
from trycourier.exceptions import CourierAPIException
pp = pprint.PrettyPrinter(indent=2)
client = Courier()
brand_settings = {
'colors': {
'primary': "#f02700",
'secondary': "#ff5f39",
'tertiary': "#000000"
},
'email': {
'header': {
'barColor': "#f02700",
'logo': {
'href': "https://foxhub.io",
'image': "https://i.imgur.com/j3FDeA2.png"
}
},
'footer': {
'markdown': "Follow us on Social!",
'social': {
'facebook': {
'url': "https://facebook.com/foxhub"
},
'twitter': {
'url': "https://twitter.com/foxhub"
}
}
}
}
}
brand_snippets = {
'items': [
{
'format': "handlebars",
'name': "tagline",
'value': """<!-- block title -->
<style>
.hero {
font-size: 24px;
}
</style>
<div class="hero">Doing done well</div>"""
}
]
}
try:
resp = client.create_brand(
id="FOXHUB",
name="Foxhub",
settings=brand_settings,
snippets=brand_snippets
)
pp.pprint(resp)
except CourierAPIException as err:
print(err.message)

Check out this Gist to see this script and others used during the stream.

Is there something you’d like to see us do using Courier? Let us know and it might be the subject of our next Courier Live. We stream a new Courier Live every Wednesday at noon Pacific. Follow us on Twitch to be notified when we go live.

-Aydrian