Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
import Courier from '@trycourier/courier';
const client = new Courier({
apiKey: 'My API Key',
});
const brand = await client.brands.create({ name: 'name' });
console.log(brand.id);{
"id": "<string>",
"name": "<string>",
"published": 123,
"created": 123,
"updated": 123,
"settings": {
"colors": {
"primary": "<string>",
"secondary": "<string>"
},
"email": {
"templateOverride": {
"backgroundColor": "<string>",
"blocksBackgroundColor": "<string>",
"enabled": true,
"footer": "<string>",
"head": "<string>",
"header": "<string>",
"width": "<string>",
"mjml": {
"backgroundColor": "<string>",
"blocksBackgroundColor": "<string>",
"enabled": true,
"footer": "<string>",
"head": "<string>",
"header": "<string>",
"width": "<string>"
},
"footerBackgroundColor": "<string>",
"footerFullWidth": true
},
"head": {
"inheritDefault": true,
"content": "<string>"
},
"footer": {
"content": "<string>",
"inheritDefault": true
},
"header": {
"inheritDefault": true,
"barColor": "<string>",
"logo": {
"href": "<string>",
"image": "<string>"
}
}
},
"inapp": {
"borderRadius": "<string>",
"disableMessageIcon": true,
"fontFamily": "<string>",
"placement": "top",
"widgetBackground": {
"topColor": "<string>",
"bottomColor": "<string>"
},
"colors": {
"primary": "<string>",
"secondary": "<string>"
},
"icons": {
"bell": "<string>",
"message": "<string>"
}
}
},
"snippets": {
"items": [
{
"name": "<string>",
"value": "<string>"
}
]
},
"version": "<string>"
}import Courier from '@trycourier/courier';
const client = new Courier({
apiKey: 'My API Key',
});
const brand = await client.brands.create({ name: 'name' });
console.log(brand.id);{
"id": "<string>",
"name": "<string>",
"published": 123,
"created": 123,
"updated": 123,
"settings": {
"colors": {
"primary": "<string>",
"secondary": "<string>"
},
"email": {
"templateOverride": {
"backgroundColor": "<string>",
"blocksBackgroundColor": "<string>",
"enabled": true,
"footer": "<string>",
"head": "<string>",
"header": "<string>",
"width": "<string>",
"mjml": {
"backgroundColor": "<string>",
"blocksBackgroundColor": "<string>",
"enabled": true,
"footer": "<string>",
"head": "<string>",
"header": "<string>",
"width": "<string>"
},
"footerBackgroundColor": "<string>",
"footerFullWidth": true
},
"head": {
"inheritDefault": true,
"content": "<string>"
},
"footer": {
"content": "<string>",
"inheritDefault": true
},
"header": {
"inheritDefault": true,
"barColor": "<string>",
"logo": {
"href": "<string>",
"image": "<string>"
}
}
},
"inapp": {
"borderRadius": "<string>",
"disableMessageIcon": true,
"fontFamily": "<string>",
"placement": "top",
"widgetBackground": {
"topColor": "<string>",
"bottomColor": "<string>"
},
"colors": {
"primary": "<string>",
"secondary": "<string>"
},
"icons": {
"bell": "<string>",
"message": "<string>"
}
}
},
"snippets": {
"items": [
{
"name": "<string>",
"value": "<string>"
}
]
},
"version": "<string>"
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.