---
title: "Create a preference section"
method: POST
path: "/preferences/sections"
tags: ["Preference Topics"]
---

# Create a preference section

`POST /preferences/sections`

Creates a workspace preference and returns its generated id. Add subscription topics to it afterwards with the topics endpoint.

## Headers

- `Idempotency-Key` string
- `x-idempotency-expiration` string

## Request body

- WorkspacePreferenceCreateRequest — Request body for creating a workspace preference.
  - `name` string, required — Human-readable name for the workspace preference.
  - `description` string, nullable — Optional description shown under the section on the hosted preferences page.
  - `routing_options` ChannelClassification[], nullable — Default channels for the workspace preference. Defaults to empty if omitted.
  - `has_custom_routing` boolean, nullable — Whether the workspace preference defines custom routing for its topics.

## Response `201`

Created

- WorkspacePreferenceGetResponse — A workspace preference in your workspace, including its topics.
  - `id` string, required — The workspace preference id.
  - `name` string, required — Human-readable name.
  - `description` string, nullable — Optional description shown under the section on the hosted preferences page.
  - `routing_options` ChannelClassification[], required — Default channels for the workspace preference. May be empty.
  - `has_custom_routing` boolean, required — Whether the workspace preference defines custom routing for its topics.
  - `created` string, required — ISO-8601 timestamp of when the workspace preference was created.
  - `creator` string, nullable — Id of the creator.
  - `updated` string, nullable — ISO-8601 timestamp of the last update.
  - `updater` string, nullable — Id of the last updater.
  - `topics` WorkspacePreferenceTopicGetResponse[], required — The topics contained in this workspace preference.
    - `id` string, required — The preference topic id.
    - `name` string, required — Human-readable name.
    - `description` string, nullable — Optional description shown under the topic on the hosted preferences page.
    - `default_status` 'OPTED_OUT' | 'OPTED_IN' | 'REQUIRED', required
    - `routing_options` ChannelClassification[], required — Default channels delivered for this topic. May be empty.
    - `allowed_preferences` AllowedPreference[], required — Preference controls a recipient may customize. May be empty.
    - `include_unsubscribe_header` boolean, required — Whether a list-unsubscribe header is included on emails for this topic.
    - `topic_data` object, required — Arbitrary metadata associated with the topic.
    - `created` string, required — ISO-8601 timestamp of when the topic was created.
    - `creator` string, nullable — Id of the creator.
    - `updated` string, required — ISO-8601 timestamp of the last update.
    - `updater` string, nullable — Id of the last updater.

## Other responses

- `400` — Bad Request

## Changes

- **2026-07-29** `f76bed79a913` — 4 info
  - api tag `Preference Topics` added
  - api tag `Workspace Preferences` removed
  - added the new optional `header` request parameter `Idempotency-Key`
  - added the new optional `header` request parameter `x-idempotency-expiration`
- **2026-07-09** `49e3cc128b6c` — 3 info
  - added the new optional request property `description`
  - added the optional property `description` to the response with the `201` status
  - added the optional property `topics/items/description` to the response with the `201` status
- **2026-06-26** `61131080b185` — 3 info
  - api operation id `preferenceSections_create` removed and replaced with `workspacePreferences_create`
  - api tag `Workspace Preferences` added
  - api tag `Preference Sections` removed
- **2026-06-24** `124a60dd716b` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/trycourier/apis/courier/changes/preferences/sections/post.md)

---

[API](https://skmtc.dev/trycourier/apis/courier.md) · [All operations](https://skmtc.dev/trycourier/apis/courier/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/trycourier/courier/revisions/cb8586034158/schema)
