import Courier from '@trycourier/courier';
const client = new Courier({
apiKey: process.env['COURIER_API_KEY'], // This is the default and can be omitted
});
const baseTemplateTenantAssociation = await client.tenants.templates.retrieve('template_id', {
tenant_id: 'tenant_id',
});
console.log(baseTemplateTenantAssociation.id);{
"id": "<string>",
"created_at": "<string>",
"updated_at": "<string>",
"published_at": "<string>",
"version": "<string>",
"data": {
"routing": {
"method": "all",
"channels": [
"<string>"
]
},
"content": {
"version": "<string>",
"elements": [
{
"type": "text",
"content": "<string>",
"align": "left",
"channels": [
"<string>"
],
"ref": "<string>",
"if": "<string>",
"loop": "<string>",
"text_style": "text",
"color": "<string>",
"bold": "<string>",
"italic": "<string>",
"strikethrough": "<string>",
"underline": "<string>",
"locales": {},
"format": "markdown"
}
]
}
}
}import Courier from '@trycourier/courier';
const client = new Courier({
apiKey: process.env['COURIER_API_KEY'], // This is the default and can be omitted
});
const baseTemplateTenantAssociation = await client.tenants.templates.retrieve('template_id', {
tenant_id: 'tenant_id',
});
console.log(baseTemplateTenantAssociation.id);{
"id": "<string>",
"created_at": "<string>",
"updated_at": "<string>",
"published_at": "<string>",
"version": "<string>",
"data": {
"routing": {
"method": "all",
"channels": [
"<string>"
]
},
"content": {
"version": "<string>",
"elements": [
{
"type": "text",
"content": "<string>",
"align": "left",
"channels": [
"<string>"
],
"ref": "<string>",
"if": "<string>",
"loop": "<string>",
"text_style": "text",
"color": "<string>",
"bold": "<string>",
"italic": "<string>",
"strikethrough": "<string>",
"underline": "<string>",
"locales": {},
"format": "markdown"
}
]
}
}
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Id of the tenant for which to retrieve the template.
Id of the template to be retrieved.
The template's id
The timestamp at which the template was created
The timestamp at which the template was last updated
The timestamp at which the template was published
The version of the template
The template's data containing it's routing configs and Elemental content
Show child attributes