Send via API
Prerequisites
- Sign up for a Courier account
- Add an integration
- Get your API key
Step 1: Install the SDK
Step 2: Initialize the SDK
Import the Courier client and initialize it with your authorization token:Step 3: Send a Message
Send a basic notification message:Message Properties
The message object contains these main properties:to: Identifies the recipient (email address, phone number, etc.)content: The notification’s title and bodydata: Variables to populate message templatesrouting: Controls which channel(s) deliver the message
Send using a reuseable template
Courier’s Template Designer lets you create reuseable templates and populate it with dynamic data.Step 1: Create a Template
Navigate to the Designer and select “New” to get the option to create a new template.
Create Your First Template
Step 2: Add Channels
Click ”+ Add Channel” to add email, SMS, push, or chat channels to your notification template.
Add Notification Channels
Step 3: Design Content
Use content blocks to build your notification. Add text, images, buttons, and other elements that automatically adapt to each channel.
Design Notification Content
Step 4: Publish and Send
Click “Publish Changes” to make your notification available, then use the Send API to trigger it from your application.Next Steps
Choose your path to learn more:Design with Visual Interface
Create rich notifications with drag-and-drop designer
Send from Designer
Generate code snippets and test designed notifications
Design with API
Build notification templates programmatically
Integration Setup
Connect to notification providers
User Preferences
Let users control template settings
Platform Overview
Understand Courier’s full feature set
Pro Tip: You can mix approaches! Design your notification templates visually with the Designer, then use the generated code snippets to send them programmatically from your application.