Shreya Gupta
July 03, 2023

Table of contents
You’ve got to stop sending password reset emails. Everyone does it and it’s not cool anymore. Many of your users don’t want to log into their email or open the mail app just to get access to a code that they have to manually copy and paste into your app — it’s a waste of time. Most phones support autofilling codes sent via SMS, which might make SMS the preferred channel for these users. However, you also can’t assume that this is how everyone will behave. You need to let your user decide how they receive their notifications, which means giving them the option between SMS, email, or whatever other channel they prefer.
Generalizing user behavior can lead to unnecessary reduction in user engagement on your app, which will eventually lead to decreased user retention. Preferences matter, and they’re easy to set up. Let’s walk through two ways in which you can implement an amazing password reset notification experience for your users, by communicating with them via their preferred channels.
Here’s how you might be sending password reset emails today using the Courier SDK:
Copied!
pip install trycourier
Copied!
from trycourier import Courierclient = Courier(auth_token="<API_KEY>")resp = client.send_message(message={"to": {"email": "example@email.com",},"content": {"title": "Hi!","body": "You have requested to log in. Your access code is {{code}}. Use this link to reset your password: {{link}}.",},"data": {"link": "<insert_link_here>","code": "283hf2"}})print(resp['requestId'])
For best practices, make sure to use environment variables to store your API keys!
By adding your user’s phone_number and setting the routing.method to all, you can send via email and SMS. When this API call is made, your user will receive both an email and an SMS, and they can access the message from the most convenient option.
Copied!
from trycourier import Courierclient = Courier(auth_token="<API_KEY>")resp = client.send_message(message={"to": {"email": "example@email.com","phone_number": "123-456-7890"},"content": {"title": "Hi!","body": "You have requested to log in. Your access code is {{code}}. Use this link to reset your password: {{link}}.",},"data": {"link": "<insert_link_here>","code": "283hf2"},"routing": {"method": "single","channels": ["email", "sms"],},})print(resp['requestId'])
To send password reset notifications via all channels, just replace the "single" with "all" in the routing object.
With a Preferences Center, you can enable your users to share specifically how they want to receive their notifications. Courier is a notifications infrastructure that provides a customizable out-of-the-box Preferences Center.
Notifications designed in Courier can be tagged with Subscription Topics that allow you to categorize them. Learn more >.


{$.urls.preferences}
The following code will make an API call to Courier to send the Notification Template we just created.
template property.to object (learn more about what profile info you will need for each channel).Copied!
from trycourier import Courierclient = Courier(auth_token="<API_KEY>")resp = client.send_message(message={"to": {"email": "example@email.com","phone_number": "123-456-7890"},"template": "0ZP3AH34H945QHPNZ2S0NF7X1RNB","data": {"link": "<insert_link_here>","code": "283hf2"},"routing": {"method": "single","channels": ["email", "sms"],},})print(resp['requestId'])
This API call is very similar to the code in the first method we used to send. However, since the Notification Template is attached to a Subscription Topic, your app will now automatically respect your user’s preferences instead of sending messages on all channels.

Let’s rethink our approach to password reset notifications. The traditional method of sending password reset notifications via emails is no longer convenient or efficient for many users. By assuming that everyone will follow the same behavior pattern, you risk alienating a significant portion of your user base.
To provide an exceptional user experience, you must empower your users to choose how they receive their notifications. Whether it's through SMS, email, or any other preferred channel, offering this flexibility demonstrates that you value their time and preferences.

Transactional, Product, and Marketing Notifications: What Are the Differences?
Understanding the difference between transactional, product, and marketing notifications is essential for developers building notification infrastructure. Transactional notifications confirm user actions and require no opt-in. Product notifications drive feature adoption through education. Marketing notifications promote sales and require explicit consent. This guide explains the legal requirements, best practices, and when to use each notification type to build compliant systems users trust.Retry
By Kyle Seyler
October 23, 2025

How to Add Toast Notifications with the New Courier Toasts SDK
Learn how to add real-time, customizable toast notifications to your app with the Courier Toasts SDK. This quick tutorial shows how to integrate toasts using Web Components or React and sync them with your notification center for a seamless, modern UX.
By Dana Silver
October 20, 2025

What is the Twilio Messaging API?
Twilio's Messaging API enables developers to send and receive SMS, MMS, WhatsApp, and RCS messages at scale across 180+ countries. While Twilio excels at reliable message delivery through carrier networks, modern applications need more than single-channel messaging. Courier acts as a provider-agnostic orchestration layer that activates messaging across Twilio and other channels from a single platform. You get intelligent routing, user preference management, and fallback logic without vendor lock-in.
By Kyle Seyler
October 03, 2025
© 2025 Courier. All rights reserved.