Documentation Index
Fetch the complete documentation index at: https://docs.dialect.to/llms.txt
Use this file to discover all available pages before exploring further.
Please note that you can only send push notifications, once youโve completed the registration process for your app as mentioned in the Push Notifications Prerequisites section.
How to Send Push
Simply include PUSH in your channels array:
curl https://alerts-api.dial.to/v2/{appId}/send \
--request POST \
--header 'x-dialect-api-key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"recipient": {
"type": "subscriber",
"walletAddress": "9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM"
},
"channels": ["PUSH", "IN_APP"],
"message": {
"title": "Trade Executed! ๐",
"body": "Your buy order for 10 SOL has been executed at $142.50"
}
}'
const notification = {
recipient: {
type: 'subscriber',
walletAddress: '9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM'
},
channels: ['PUSH', 'IN_APP'],
message: {
title: 'Trade Executed! ๐',
body: 'Your buy order for 10 SOL has been executed at $142.50'
}
};
await fetch(`https://alerts-api.dial.to/v2/${appId}/send`, {
method: 'POST',
headers: {
'x-dialect-api-key': 'YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify(notification)
});
Adding Custom Data
Include custom data for your app to handle deep linking or specific actions:
const pushWithData = {
recipient: {
type: 'subscriber',
walletAddress: 'USER_WALLET_ADDRESS'
},
channels: ['PUSH'],
message: {
title: 'Price Alert! ๐จ',
body: 'SOL reached your target price of $150'
},
data: {
action: 'price_alert',
symbol: 'SOL',
price: '150.00',
alertId: 'alert_123'
}
};
Push Channel Ownership
If you own the push channel (have your own Firebase/FCM setup):
- You can send push notifications directly using
PUSH in channels
- Consider mirroring
IN_APP channel to see interesting push notifications from other projects that you might want to push to your users
If youโre a project without push channel ownership:
- You cannot directly use the
PUSH channel
- This is because push notifications require Firebase Cloud Messaging (FCM) integration and device token management
- Users need to have your specific mobile app installed and configured to receive your push notifications
Complete Push Implementation
For full push notification setup including Firebase configuration, mobile app integration, user subscription management, and message handling, see:
Push Notifications in Inbox Integration โ