import Courier from '@trycourier/courier';
const client = new Courier({
apiKey: process.env['COURIER_API_KEY'], // This is the default and can be omitted
});
const brands = await client.brands.list();
console.log(brands.paging);{
"paging": {
"more": true,
"cursor": "<string>"
},
"results": [
{
"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>"
}
]
}Get the list of brands.
import Courier from '@trycourier/courier';
const client = new Courier({
apiKey: process.env['COURIER_API_KEY'], // This is the default and can be omitted
});
const brands = await client.brands.list();
console.log(brands.paging);{
"paging": {
"more": true,
"cursor": "<string>"
},
"results": [
{
"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 that allows for fetching the next set of brands.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
top, bottom, left, right