Push Notification Setup
Before you can send push notifications through Sendmator, you need to configure Firebase Cloud Messaging (FCM).
Prerequisites
- Active Sendmator account
- Firebase account
Get Started with Push Notifications
To send push notifications, you need to configure Firebase Cloud Messaging (FCM) for Android, iOS, and Web.
Step 1: Create Firebase Project
- Go to Firebase Console
- Click "Add Project" or select an existing project
- Follow the setup wizard to create your Firebase project
Step 2: Generate Firebase Service Account Key
- In Firebase Console, go to Project Settings (gear icon)
- Navigate to Service Accounts tab
- Click Generate new private key
- A JSON file will be downloaded to your computer
- Keep this file secure - it contains sensitive credentials
Step 3: Configure Push Provider in Sendmator
- Go to Push Settings in your Sendmator dashboard
- Click Add Push Provider
- Select Firebase Cloud Messaging (FCM)
- Upload the JSON file you downloaded from Firebase
- Click Save
Your push notification provider is now configured and ready to use.
Register Device Tokens
To send push notifications to users, you need to register their device tokens with Sendmator.
Use the API to register device tokens when users log in or when your app starts:
curl -X PATCH https://api.sendmator.com/api/v1/contacts/external/user-123/device-token \
-H "X-API-Key: pk_live_your_publishable_key" \
-H "Content-Type: application/json" \
-d '{
"token": "device-fcm-token-here",
"platform": "android",
"app_version": "1.0.0",
"os_version": "13",
"device_model": "Pixel 7"
}'
Platform values:
android- Android devicesios- iOS devicesweb- Web browsers
Next Steps
- Send Push API - Start sending push notifications
- Multi-Channel API - Send across multiple channels
Need help? Contact support for push setup assistance.