Skip to main content
GET
/
journeys
/
{templateId}
/
templates
/
{notificationId}
/
content
JavaScript
import Courier from '@trycourier/courier';

const client = new Courier({
  apiKey: process.env['COURIER_API_KEY'], // This is the default and can be omitted
});

const notificationContentGetResponse = await client.journeys.templates.retrieveContent('x', {
  templateId: 'x',
});

console.log(notificationContentGetResponse.elements);
{
  "version": "2022-01-01",
  "elements": [
    {
      "id": "elem_channel_1",
      "type": "channel",
      "checksum": "abc123def456",
      "elements": [
        {
          "id": "elem_meta_1",
          "type": "meta",
          "checksum": "meta_abc123"
        },
        {
          "id": "elem_text_1",
          "type": "text",
          "checksum": "text_abc123"
        }
      ]
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

templateId
string
required

Journey id

Minimum string length: 1
notificationId
string
required

Notification template id

Minimum string length: 1

Query Parameters

version
string

Accepts draft, published, or a version string (e.g., v001). Defaults to published.

Response

Scoped notification content

Elemental content response for V2 templates. Contains versioned elements with content checksums.

version
string
required

Content version identifier.

Example:

"2022-01-01"

elements
ElementWithChecksums · object[]
required