send_push_notification
Broadcast an immediate push notification across Web Push (VAPID), Android (FCM), and iOS (APNs) to active subscribers of a specific app_id. Use this tool for instant real-time delivery; do not use it for future or recurring broadcasts (use schedule_push_notification instead) or on-site HTML popups (use configure_inapp_banner instead). Prerequisite: call list_apps first to obtain app_id. Requires PUSHNOTIF_API_KEY, deducts 1 credit (Rp 0.20) per successfully delivered device (0 credits charged for 404/410 dead tokens, which are auto-pruned), and is irreversible once dispatched; when segment is set to a custom tag (from update_subscriber_tags) instead of 'all', only subscribers carrying that tag receive the broadcast, and omitting url defaults the tap action to the app's registered site_url. Returns JSON { ok, campaign_id, total_targeted, total_delivered, total_gone_pruned, credits_deducted, credits_remaining }.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | Optional HTTPS destination URL opened when the notification is tapped (defaults to app's site_url) | |
| body | Yes | Notification message body text (1 to 240 characters) | |
| title | Yes | Notification headline shown on the lock screen (1 to 100 characters) | |
| app_id | Yes | Target application ID in format app_xxxx (obtain from list_apps) | |
| segment | No | Target audience filter: 'all' (default) or a specific subscriber/merchant tag assigned via data-tags, PushNotif.addTag(), or update_subscriber_tags | |
| icon_url | No | Optional HTTPS URL of a custom notification icon/logo (e.g., per-merchant logo override on a shared App ID) |