import Courier from '@trycourier/courier';
const client = new Courier({
apiKey: process.env['COURIER_API_KEY'], // This is the default and can be omitted
});
const brand = await client.brands.update('brand_id', { name: 'name' });
console.log(brand.id);{
"id": "<string>",
"name": "<string>",
"created": 123,
"updated": 123,
"published": 123,
"settings": {
"colors": {
"primary": "<string>",
"secondary": "<string>"
},
"email": {
"templateOverride": {
"enabled": true,
"mjml": {
"enabled": true,
"backgroundColor": "<string>",
"blocksBackgroundColor": "<string>",
"footer": "<string>",
"head": "<string>",
"header": "<string>",
"width": "<string>"
},
"backgroundColor": "<string>",
"blocksBackgroundColor": "<string>",
"footer": "<string>",
"head": "<string>",
"header": "<string>",
"width": "<string>",
"footerBackgroundColor": "<string>",
"footerFullWidth": true
},
"head": {
"inheritDefault": true,
"content": "<string>"
},
"footer": {
"content": "<string>",
"inheritDefault": true
},
"header": {
"logo": {
"href": "<string>",
"image": "<string>"
},
"inheritDefault": true,
"barColor": "<string>"
}
},
"inapp": {
"widgetBackground": {
"topColor": "<string>",
"bottomColor": "<string>"
},
"colors": {
"primary": "<string>",
"secondary": "<string>"
},
"icons": {
"bell": "<string>",
"message": "<string>"
},
"borderRadius": "<string>",
"disableMessageIcon": true,
"fontFamily": "<string>",
"placement": "top"
}
},
"snippets": {
"items": [
{
"name": "<string>",
"value": "<string>"
}
]
},
"version": "<string>"
}Replace an existing brand with the supplied values.
import Courier from '@trycourier/courier';
const client = new Courier({
apiKey: process.env['COURIER_API_KEY'], // This is the default and can be omitted
});
const brand = await client.brands.update('brand_id', { name: 'name' });
console.log(brand.id);{
"id": "<string>",
"name": "<string>",
"created": 123,
"updated": 123,
"published": 123,
"settings": {
"colors": {
"primary": "<string>",
"secondary": "<string>"
},
"email": {
"templateOverride": {
"enabled": true,
"mjml": {
"enabled": true,
"backgroundColor": "<string>",
"blocksBackgroundColor": "<string>",
"footer": "<string>",
"head": "<string>",
"header": "<string>",
"width": "<string>"
},
"backgroundColor": "<string>",
"blocksBackgroundColor": "<string>",
"footer": "<string>",
"head": "<string>",
"header": "<string>",
"width": "<string>",
"footerBackgroundColor": "<string>",
"footerFullWidth": true
},
"head": {
"inheritDefault": true,
"content": "<string>"
},
"footer": {
"content": "<string>",
"inheritDefault": true
},
"header": {
"logo": {
"href": "<string>",
"image": "<string>"
},
"inheritDefault": true,
"barColor": "<string>"
}
},
"inapp": {
"widgetBackground": {
"topColor": "<string>",
"bottomColor": "<string>"
},
"colors": {
"primary": "<string>",
"secondary": "<string>"
},
"icons": {
"bell": "<string>",
"message": "<string>"
},
"borderRadius": "<string>",
"disableMessageIcon": true,
"fontFamily": "<string>",
"placement": "top"
}
},
"snippets": {
"items": [
{
"name": "<string>",
"value": "<string>"
}
]
},
"version": "<string>"
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
A unique identifier associated with the brand you wish to update.