
When you need to send important alerts from your web or mobile app, SMS is a good fit for time-sensitive notifications, like a fraud warning or a payment issue. It also pairs well with other channels, such as email, Slack, or push notifications. That layered approach lets you pick the right channel for each notification and fall back to another one when the first can't be delivered.
SMS APIs like Twilio and Bird let you send a text with a few lines of code, but they don't handle the logic around an automated SMS. That's the job of an SMS notification system like Courier.
You'll need extra logic around your notifications if you want to:
Without an SMS notification system, you're building and maintaining all of that logic yourself.
Courier adds four things on top of SMS delivery:
This example uses Courier, with Twilio as the SMS provider, in a Node.js app. If you work in another language, the send your first message guide covers the other SDKs.
Twilio offers a free trial with no credit card required, so this example uses Twilio as the SMS provider. Start by signing up for Twilio. Once you're in the Twilio console, follow its prompts to get a phone number, then send yourself a test SMS to check that Twilio works. Trial accounts can only text verified numbers, so verify the phone you'll test with.
Next, find your Account SID, Auth Token, and Twilio phone number in the console's Account Info panel. You'll need them to connect Twilio to Courier.

Sign up for Courier, open Integrations, and add Twilio. Enter your Account SID, Auth Token, and either a Messaging Service SID or your Twilio phone number, then select Save. The Twilio integration docs cover each field.
Integrations are per environment, so connect Twilio in the same environment as the API key you'll send with.
This example is an e-commerce package delivery notification. Open Templates, select Add template, choose Design Studio v2, and name it "Package delivery." Select the SMS channel tab, then pick Twilio in the routing selector.
Add a Text block with this message. Type {{ to insert each variable:
Your parcel with reference {{data.packageRef}} is estimated for delivery between {{data.startTime}} and {{data.endTime}} today. Not going to be in? {{data.rescheduleUrl}}Select Publish, then copy the template ID from the top of the editor. The Design Studio docs cover the editor in more detail.
You need Node.js 20 or later. Create a directory called package-notification and install the Courier Node.js SDK inside it:
mkdir package-notification
cd package-notification
npm init -y
npm install @trycourier/courierNow you'll write the code that texts your phone through Courier, with Twilio as the SMS provider. It stores a phone number on the recipient's profile, then sends your template to that user.
Inside package-notification, create a file called send-sms.mjs and add this code:
import Courier from "@trycourier/courier";
const courier = new Courier({ apiKey: process.env.COURIER_API_KEY });
await courier.profiles.create("user_123", {
profile: { phone_number: "<PHONE_NUMBER>" },
});
const { requestId } = await courier.send.message({
message: {
to: { user_id: "user_123" },
template: "<NOTIFICATION_TEMPLATE_ID>",
data: {
packageRef: "<PACKAGE_REFERENCE>",
startTime: "10:00",
endTime: "11:00",
rescheduleUrl: "<RESCHEDULE_OR_SAFE_PLACE_URL>",
},
routing: {
method: "single",
channels: ["sms"],
},
},
});
console.log(requestId);<PHONE_NUMBER> with your own phone number in E.164 format (a plus sign, the country code, then the number, like +12025550156), so you can test that the SMS sends.<NOTIFICATION_TEMPLATE_ID> with the template ID you copied.data with your own. They fill the template's {{data.*}} variables.Then set your Courier API key and run the script:
export COURIER_API_KEY="<COURIER_API_KEY>"
node send-sms.mjsYou'll get a text like this:

The same notification can go out on other channels, too. Add an email channel to the template, set routing to { method: "all", channels: ["sms", "email"] }, and the user gets the delivery update as both a text and an email.
Journeys move multi-step notification logic out of your code and onto a visual canvas in Courier. A journey runs once per user. It starts from a trigger (API Invoke, Webhook, Twilio Segment, or Audience), then runs its nodes in order: send, delay, branch, throttle, fetch data, and more. You publish it, and your code or your event stream starts the runs.
Some things you can build with it:
delay: { until: "Mo-Fr 09:00-17:00" } to the Send API (delay and schedule a send).Here, you'll build a journey that sends an order confirmation SMS when an Order Completed event arrives from Twilio Segment, using Courier's Segment integration.
In Twilio Segment, add Courier as a destination and paste in your Courier API key. The Segment integration docs cover the connection. Send a test event from the destination's Event Tester and confirm it shows up in Courier.
Each event's userId has to match a Courier user with a phone_number on their profile, the same way you stored one in Step 5.
Open Journeys, select New Journey, name it "Order confirmation," and choose the Segment trigger. Select Order Completed as the source event.
The event's properties become the journey's data, so fields like order_id and total are available to every node.
Drag a Send node onto the canvas after the trigger and choose SMS. Select + Create to write its template inline:
Your order #{{order_id}} is confirmed. Total: {{total}}. Thanks for shopping with us.Journey templates read trigger data without a prefix, so it's {{order_id}}, not {{data.order_id}}. The send node delivers to the user who entered the journey, at their profile's phone_number, through the Twilio integration you connected.
To text larger orders something different, add a Branch node before the send. Set Path 1 to data.total greater than 100 and give it a send node with its own template. The Default path keeps the standard confirmation.
Publish each send node's template first, then select Publish on the journey. Publishing the journey doesn't publish its templates, and a run only sends a template's published version.
Fire an Order Completed event from your app, or replay one from Twilio Segment. Open the journey's Logs tab and check that a run appeared with the event's properties as its data. Then find the message itself in Logs.
If your events don't come through Twilio Segment, build the journey with the API Invoke trigger instead and start each run with the invoke API. Copy the journey ID from the editor:
import Courier from "@trycourier/courier";
const courier = new Courier({ apiKey: process.env.COURIER_API_KEY });
const { runId } = await courier.journeys.invoke("<JOURNEY_ID>", {
user_id: "user_123",
data: { order_id: "ORD-9042", total: 49.99 },
});
console.log(runId);Search for the returned runId in the journey's Logs tab to step through the run node by node.
You've sent an SMS through Courier with Twilio, and built a journey that texts an order confirmation whenever a Twilio Segment event arrives.
You can start on Courier's free Developer plan, which includes 10,000 sends a month, and Twilio's free trial. Courier integrates with many SMS providers, so you don't have to decide right away which one to use. When you're ready to send more notifications, sign up or contact us to talk through your use case.

How to Use Claude Code on Mobile to Design, Test, and Ship Multichannel Notifications
A walkthrough of using Claude Code's mobile app with Courier's MCP server and CLI to design, test, and ship a multichannel product announcement from a phone. Covers the full workflow: drafting the content outline, creating notification templates using Courier's elemental format, building channel-specific variants for email, Slack, push, and SMS, customizing brand styling through the API, iterating on design with test sends, getting team approval, and publishing with custom routing rules. The whole thing took a couple hours, mostly cold start and design iterations.

Transactional vs. product vs. marketing notifications
Transactional notifications confirm something the user did or something that happened to their account. Product notifications help users get value from features they already have. Marketing notifications sell. The consent rules differ by channel: marketing email is opt-out under CAN-SPAM, marketing texts need prior express written consent under the FCC's TCPA rules, and every push notification is gated by the operating system's notification permission.

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.