Skip to main content
GET
/
preferences
/
sections
/
{section_id}
/
topics
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 preferenceTopicListResponse = await client.preferenceSections.topics.list('section_id');

console.log(preferenceTopicListResponse.results);
{
  "results": [
    {
      "id": "<string>",
      "name": "<string>",
      "routing_options": [],
      "allowed_preferences": [],
      "include_unsubscribe_header": true,
      "topic_data": {},
      "created": "<string>",
      "updated": "<string>",
      "creator": "<string>",
      "updater": "<string>"
    }
  ]
}

Authorizations

Authorization
string
header
required

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

Path Parameters

section_id
string
required

Id of the preference section.

Response

Topics contained in a preference section.

results
PreferenceTopicGetResponse · object[]
required