iOS, Android, और web के लिए push notifications।
Token-management abstraction, per-device opt-in, native rich payloads, segment targeting. Same auth, same idempotency, same webhooks as every other Bird channel, because the same engineering team built them all.
import { BirdClient } from "@messagebird/sdk";
const bird = new BirdClient({ apiKey: process.env.BIRD_API_KEY! });
// Send by device token...
const { data, error } = await bird.push.send({
to: "token_aPa91Hb...XzQ",
title: "Your driver is two minutes away",
body: "Tap to see the live map.",
data: { ride_id: "ride_2891" },
}).safe();
// ...or by user_id — we fan out to every opted-in device.
await bird.push.send({
to: { user_id: "usr_4hQ2m" },
title: "Your code is 482917",
body: "Enter it on the login screen.",
data: { kind: "otp" },
});
if (error) throw error;
console.log(data.id);
// → "push_2nQ81oP3..."
npm install से पहली send तक 5 मिनट
जिस भाषा का आप पहले से इस्तेमाल करते हैं, उसी से notification भेजें।
हर प्रमुख runtime में SDKs। अपने mobile या web client से एक token register करें; अपने backend से token या user_id के जरिए भेजें।
import { BirdClient } from "@messagebird/sdk";
const bird = new BirdClient({ apiKey: process.env.BIRD_API_KEY! });
const { data, error } = await bird.push.send({
to: "token_aPa91Hb",
title: "Hello",
body: "From Bird Push",
data: { kind: "demo" },
}).safe();दस primitives जो APNs और FCM को एक endpoint में बदल देते हैं।
Real APNs and FCM under the hood. No third-party push aggregator in the middle. We just hide the platform quirks behind one shape.
- 01
एक call से iOS, Android, और web
एक bird.push.send। हम हर registered device के लिए APNs, FCM, और W3C Push Protocol पर fan out करते हैं।
- 02
Token-management abstraction
bird.push.tokens.register से एक token register करें। हम platform, locale, और last-seen को track करते हैं ताकि आपको न करना पड़े।
- 03
token या user_id के जरिए भेजें
किसी एक device को address करें, या
{ user_id }पास करें और हम उनके हर opted-in device पर fan out कर देते हैं। - 04
Per-device opt-in state
हर registered token अपना खुद का opt-in state रखता है। एक को revoke करें बिना दूसरों पर असर डाले।
- 05
Native rich payloads
Title, body, image, action buttons, deep-link URL, custom data: mapped to APNs alert and FCM notification correctly.
- 06
Silent / background notifications
content_available: true पास करें और हम हर platform के हिसाब से APNs background और FCM data-only के जरिए सही routing करते हैं।
- 07
Segment targeting
registration के समय users को tag करें; bird.push.send से tag के जरिए address करें। किसी third-party CDP integration की जरूरत नहीं।
- 08
Delivery और open receipts
push.delivered, push.opened, push.dismissed के लिए events। हर दूसरे channel जैसा ही HMAC envelope।
- 09
Token lifecycle संभाला गया
जब APNs / FCM कोई unregistered token लौटाता है, हम उसे dead mark कर देते हैं और भेजना रोक देते हैं। कोई manual cleanup नहीं।
- 10
वही auth, वही error envelope
Push, SMS, Email, WhatsApp, Voice के लिए एक API key। इन सबके लिए एक error type registry।
हम Push क्यों बनाते हैं
क्योंकि push को आपके SMS, आपके email, और आपके verifications से अलग vendor में नहीं रहना चाहिए।
Every product team ends up with the same stack: APNs for iOS, FCM for Android, a service worker for web, and a database table tracking which user has which tokens with which opt-in state. We built that table, then we built it again, then we exposed it as bird.push.tokens.register and bird.push.send. Same auth, same idempotency, same error envelope as Email and SMS, so the OTP that fails on push falls back to SMS in the same request.
import { BirdClient } from "@messagebird/sdk";
const bird = new BirdClient({ apiKey: process.env.BIRD_API_KEY! });
// Send by device token...
const { data, error } = await bird.push.send({
to: "token_aPa91Hb...XzQ",
title: "Your driver is two minutes away",
body: "Tap to see the live map.",
data: { ride_id: "ride_2891" },
}).safe();
// ...or by user_id — we fan out to every opted-in device.
await bird.push.send({
to: { user_id: "usr_4hQ2m" },
title: "Your code is 482917",
body: "Enter it on the login screen.",
data: { kind: "otp" },
});
if (error) throw error;
console.log(data.id);
// → "push_2nQ81oP3..."
हर state change एक webhook है।
HMAC-signed payloads, replay-protected, idempotent. The same envelope on every Bird channel: learn one, you've learned them all.
{
"type": "push.delivered",
"id": "evt_9pT81y...",
"created_at": "2026-05-19T15:42:01.221Z",
"data": {
"push_id": "push_2nQ81oP3",
"user_id": "usr_4hQ2m",
"platform": "ios",
"device": "iPhone15,2",
"latency_ms": 218
}
}
Retry schedule: 5s, 30s, 5m, 30m, 2h, 6h, 12h। आखिरी attempt के बाद dead-letter; हर dead-lettered event को dashboard या API से replay किया जा सकता है।
push.queuedAPI ने accept किया और send के लिए queue कर दिया।push.sentAPNs / FCM / W3C Push server को सौंप दिया गया।push.deliveredProvider confirmed delivery to the device (when available: APNs is best-effort).push.openedUser ने notification tap किया (अगर आपका app इसे instrument करता है)।push.dismissedUser ने खोले बिना dismiss कर दिया (अगर आपका app इसे instrument करता है)।push.failedस्थायी failure (token unregistered, app हटा दिया गया)। token अपने आप disable हो जाता है।
अगर आपने SMS integrate किया है, तो आपने Push integrate कर लिया।
Same auth, same idempotency contract, same error envelope, same webhook shape. The difference is the transport, not how you call it.
Push.
await bird.push.send({
to: { user_id: "usr_4hQ2m" },
title: "Your code",
body: `Code: ${code}`,
});
एक call। हम APNs, FCM, और web पर user के हर opted-in device पर fan out कर देते हैं।
SMS.
await bird.sms.send({
from: "Bird",
to: "+15005550006",
text: `Your code is ${code}.`,
category: "authentication",
});
Same envelope, same idempotency contract. Fall back when push fails, or address SMS directly.