
Configure and Brand It
Everything on the page comes from the Preferences Editor: the subscription topics and sections users see, and the brand it uses for its logo, colors, and typography. Update the brand and the page follows. Your changes stay in a draft until you publish. Use Preview Page in the editor to open the page in draft mode, then Publish. See previewing and publishing for the full flow.Add a Preferences Link
Add a link to the preference center in your notifications with thepreferences variable. Courier renders it as a secure, per-user link, so include to.user_id in your send request and each recipient gets their own. Place it inside a notification’s content for contextual access, or once in your brand footer so it appears on every message.
Write the variable in the format for your editing context:
- Content blocks (Text, Markdown, Quote, List):
{{$.urls.preferences}} - Handlebars (Template blocks, email templates, brand templates):
{{var "urls.preferences"}} - Elemental JSON (action buttons, links):
{$.urls.preferences}
Add an Unsubscribe Link
Theunsubscribe variable gives users a one-click opt-out from the subscription topic tied to that notification, removing them from all of the topic’s templates and delivery channels. Write it the same way as the preferences link:
- Content blocks (Text, Markdown, Quote, List):
{{$.urls.unsubscribe}} - Handlebars (Template blocks, email templates, brand templates):
{{var "urls.unsubscribe"}} - Elemental JSON (action buttons, links):
{$.urls.unsubscribe}
Channel selection
If you enable channel selection on a topic in the Preferences Editor, users can pick which channels (email, SMS, push, and more) they want for it. Their choices appear in thecustom_routing array from the User Preferences API:
Template send conditions don’t override a user’s
custom_routing. To drop a channel when required data is missing, use variable guardrails.FAQ
Do I need to write any code to use the hosted preference center?
Do I need to write any code to use the hosted preference center?
No. You configure and brand the page in the Preferences Editor and link to it from your notifications. To render preferences inside your own app instead, use embedded preferences.
How do I change how the page looks?
How do I change how the page looks?
The page uses your default brand. Edit the brand’s logo, colors, and typography, and the preference center updates to match.
Can users choose which channels they receive?
Can users choose which channels they receive?
Yes, if you enable channel selection on a topic in the Preferences Editor. Each user’s choices are saved to the topic’s
custom_routing.Where does the preference URL come from?
Where does the preference URL come from?
Courier generates a secure, per-user URL from the
urls.preferences variable at send time. You never construct it yourself; just include to.user_id in the send so it resolves to the right recipient.Why is my preference or unsubscribe link empty?
Why is my preference or unsubscribe link empty?
A notification link needs
to.user_id in the send. An unsubscribe link also needs the template to have a subscription topic assigned; without one, the URL resolves to an empty string.