Push Notification Providers
MessagePipe currently supports Firebase Cloud Messaging (FCM) for push notifications across Android, iOS and Web. Additional providers including OneSignal and APNs are coming soon.
Setup Overview
- Create a push config for your project
- Add FCM as a provider with your Firebase service account credentials
- Integrate the required APIs and start sending push notifications
Push Config
Create Push Config
POST /push-config?projectId={projectId}
Content-Type: application/json
Authorization: Bearer your-jwt-token
{
"enabled": true
}
enabled defaults to true if omitted. Only one push config can exist per project.
Get Push Config
GET /push-config?projectId={projectId}
Authorization: Bearer your-jwt-token
Update Push Config
PUT /push-config?projectId={projectId}
Content-Type: application/json
Authorization: Bearer your-jwt-token
{
"enabled": false
}
Managing Providers
Add a Provider
POST /push-config/providers?projectId={projectId}
Content-Type: application/json
Authorization: Bearer your-jwt-token
{
"provider": "fcm",
"name": "My FCM Provider",
"priority": 1,
"enabled": true,
"config": {
"projectId": "your-firebase-project-id",
"clientEmail": "firebase-adminsdk-xxx@your-project.iam.gserviceaccount.com",
"privateKey": "-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----\n"
}
}
| Field | Required | Description |
|---|---|---|
provider | Yes | Provider type. Currently only fcm |
name | Yes | Custom label for the provider instance |
priority | Yes | Failover priority (lower number = higher priority) |
enabled | No | Defaults to true |
config | Yes | Provider credentials (see below) |
FCM Configuration
Obtain these values from your Firebase console under Project Settings → Service Accounts → Generate new private key:
| Field | Description |
|---|---|
projectId | Your Firebase project ID |
clientEmail | Service account email |
privateKey | Full private key including BEGIN/END markers |
Get All Providers
GET /push-config/providers?projectId={projectId}
Authorization: Bearer your-jwt-token
Update a Provider
PUT /push-config/providers/{providerConfigId}
Content-Type: application/json
Authorization: Bearer your-jwt-token
provider type cannot be changed after creation. All other fields are optional.
Delete a Provider
DELETE /push-config/providers/{providerConfigId}
Authorization: Bearer your-jwt-token
Update Provider Priorities in Bulk
PUT /push-config/providers/priorities?projectId={projectId}
Content-Type: application/json
Authorization: Bearer your-jwt-token
{
"providers": [
{ "id": "provider-uuid-1", "priority": 1 },
{ "id": "provider-uuid-2", "priority": 2 }
]
}
Provider Schemas
Fetch the required config fields for any supported provider:
GET /push-config/provider-schemas
Authorization: Bearer your-jwt-token
For a specific provider:
GET /push-config/provider-schemas/fcm
Authorization: Bearer your-jwt-token