message object that defines who the message is for, what it should say, and how it should be sent.Here are the core components:
to— Identifies the recipient (email address, phone number, or Courier User object).content— Defines the message content, either inline or through a saved template.routing— Specifies which channels to use and how Courier should deliver the message.data— Provides variables that personalize your message or populate template fields.
Sending Messages with Templates
Templates are an easy way to create, update, and manage notification content in Courier without changing your code. Thetemplate parameter accepts either a template ID or a template alias. Template IDs are permanent unique identifiers, while aliases are human-readable names you can give a template (eg welcome-email).
Sending to Users
Send to a Courier User by specifying theiruser_id in the to field. Courier automatically looks up the user’s stored identifiers (email, phone, push tokens, chat handles) and applies your routing rules to deliver the message through the best available channels.
Use profile variables from the user object in your templates or channel conditions to personalize message content and control which channels are used.
Sending to Multiple Channels
You can send a single message across multiple channels using routing rules. In this example, Courier will try each channel in order until the message is successfully deliveresingle— Send through the best available channel for the user, such as email or SMS.priority— Try channels in the listed order until one succeeds. Ideal for fallback delivery (for example, try push first, then email).all— Send through every listed channel at once so users receive the message everywhere they’re active.
What Channels does Courier Support?
Courier supports sending through multiple channel types. Each channel can connect to one or more providers that you configure in your workspace.email— SendGrid, Mailgun, AWS SES, and moresms— Twilio, MessageBird, Plivo, and morepush— Firebase FCM, Apple Push, and morechat— Slack, Microsoft Teams, and moreinbox— Courier Inbox for in-app notifications for web and mobile
Sending to Multiple Users
Send the same message to multiple recipients in a single API call by using an array in theto field:
data object applies to all recipients. For user-specific personalization, ensure your template uses profile-based variables ({{profile.variable}}).
Related Resources
Send API Reference
Complete API documentation and parameters
Message Logs
Track delivery status and troubleshoot issues
Pro Tip: Start with simple sends and gradually add complexity. Use Courier’s message logs to monitor delivery success and identify areas for optimization.