Skip to main content
GET
/
notifications
/
{id}
/
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 response = await client.notifications.retrieveContent('id');

console.log(response);
{
  "version": "2022-01-01",
  "elements": [
    {
      "id": "elem_channel_1",
      "type": "channel",
      "checksum": "abc123def456",
      "locales": {
        "es": {
          "checksum": "es_abc123"
        },
        "fr": {
          "checksum": "fr_abc123"
        }
      },
      "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

id
string
required

Notification template ID (nt_ prefix).

Query Parameters

version
string

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

Response

Template content retrieved.

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