import Courier from '@trycourier/courier';
const client = new Courier({
apiKey: process.env['COURIER_API_KEY'], // This is the default and can be omitted
});
const notificationGetContent = await client.notifications.retrieveContent('id');
console.log(notificationGetContent.blocks);{
"blocks": [
{
"id": "<string>",
"type": "action",
"alias": "<string>",
"context": "<string>",
"content": "<string>",
"locales": {},
"checksum": "<string>"
}
],
"channels": [
{
"id": "<string>",
"type": "<string>",
"content": {
"subject": "<string>",
"title": "<string>"
},
"locales": {},
"checksum": "<string>"
}
],
"checksum": "<string>"
}import Courier from '@trycourier/courier';
const client = new Courier({
apiKey: process.env['COURIER_API_KEY'], // This is the default and can be omitted
});
const notificationGetContent = await client.notifications.retrieveContent('id');
console.log(notificationGetContent.blocks);{
"blocks": [
{
"id": "<string>",
"type": "action",
"alias": "<string>",
"context": "<string>",
"content": "<string>",
"locales": {},
"checksum": "<string>"
}
],
"channels": [
{
"id": "<string>",
"type": "<string>",
"content": {
"subject": "<string>",
"title": "<string>"
},
"locales": {},
"checksum": "<string>"
}
],
"checksum": "<string>"
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Show child attributes
action, divider, image, jsonnet, list, markdown, quote, template, text Show child attributes