Skip to main content

Push Notification

Examples for sending push notifications.

Order Status Update​

await client.sendPush({
identifiers: { id: 'user123' },
transactional_message_id: 'ORDER_SHIPPED',
message_data: {
order_id: 'ORD-789',
tracking_number: 'TRK123456',
carrier: 'FedEx',
estimated_delivery: '2025-11-05',
deep_link: '/orders/ORD-789'
}
});

New Message Notification​

await client.sendPush({
identifiers: { id: 'user123' },
transactional_message_id: 'NEW_MESSAGE',
title: 'New message from Sarah',
body: 'Hey! Are you free this weekend?',
message_data: {
sender_id: 'user456',
sender_name: 'Sarah',
message_id: 'msg_789',
conversation_id: 'conv_123',
deep_link: '/messages/conv_123'
}
});