Skip to main content

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

  1. Go to Firebase Console
  2. Click "Add Project" or select an existing project
  3. Follow the setup wizard to create your Firebase project

Step 2: Generate Firebase Service Account Key

  1. In Firebase Console, go to Project Settings (gear icon)
  2. Navigate to Service Accounts tab
  3. Click Generate new private key
  4. A JSON file will be downloaded to your computer
  5. Keep this file secure - it contains sensitive credentials

Step 3: Configure Push Provider in Sendmator

  1. Go to Push Settings in your Sendmator dashboard
  2. Click Add Push Provider
  3. Select Firebase Cloud Messaging (FCM)
  4. Upload the JSON file you downloaded from Firebase
  5. 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 devices
  • ios - iOS devices
  • web - Web browsers

Next Steps

Need help? Contact support for push setup assistance.