Guide

How to Send Multi-Channel Notifications with One API

Deliver notifications to Telegram, Email, Slack, Discord, WhatsApp, and SMS simultaneously with a single API call. One ping. All channels. Zero complexity.

The Problem with Single-Channel Notifications

Most applications start with one notification channel -- usually email. But as your user base grows, you realize that not everyone checks email promptly. Some users prefer Telegram. Your internal team lives in Slack. Your customers want WhatsApp. Suddenly, you are maintaining separate integrations for each channel, each with its own API, authentication, error handling, and rate limiting. This is exactly the problem One-Ping solves.

With One-Ping, you write one API call and your notification reaches every channel you specify. No more managing six different SDKs. No more duplicating notification logic across channels. One integration handles everything.

The core idea: Instead of building and maintaining separate integrations for Telegram, Email, Slack, Discord, WhatsApp, and SMS, you configure them once in One-Ping and send to all of them with a single HTTP request.

Step-by-Step Setup

Create a One-Ping Account and Get Your API Key

Sign up at app.one-ping.com/register. The free tier includes 100 messages per month, which is plenty for testing and small projects. Once logged in, navigate to the API Keys section of your dashboard and create a new key. Give it a descriptive name like "Production App" or "Development". Copy the key and store it securely -- you will use it in all your API calls.

Configure Your Notification Channels

Go to the Channels section of your dashboard. Here you will set up each channel you want to use. For Telegram, you need a bot token and chat ID. For Slack, you need an incoming webhook URL. For email, you need SMTP credentials or a SendGrid/Resend API key. For Discord, you need a webhook URL. Each channel has a simple configuration form with a test button so you can verify the connection immediately. Configure as many or as few channels as you need.

Send Your First Multi-Channel Notification

This is where the magic happens. Make a single POST request to the One-Ping API with an array of channels, and the notification goes everywhere at once. The channels array accepts any combination of configured channels. One-Ping handles the delivery to each channel in parallel, so all recipients get the message at nearly the same time. See the code examples below for the exact syntax.

Add Channel-Specific Formatting

Different channels have different formatting capabilities. Slack supports Block Kit with sections and buttons. Telegram supports HTML formatting. Email supports full HTML templates. One-Ping's metadata field lets you pass channel-specific formatting that only applies to that particular channel. The base message field serves as the universal fallback that all channels can render, while the metadata provides enhanced formatting for channels that support it.

Set Up Fallback Strategies

For critical notifications, you want guarantees. One-Ping supports fallback channels: if the primary channel fails (e.g., Slack webhook is down), the notification automatically falls back to an alternative channel (e.g., email or SMS). Configure your fallback preferences in the dashboard or per-request via the API. This ensures important messages are never lost.

The Multi-Channel API Call

Here is what a multi-channel notification looks like in practice. This single request sends a notification to Telegram, Email, and Slack simultaneously.

cURL

# Send to Telegram + Email + Slack in one request
curl -X POST https://api.one-ping.com/send \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "message": "New order #1234 from John Doe - $49.99",
    "channels": ["telegram", "email", "slack"],
    "recipient": "+34612345678",
    "metadata": {
      "email": {
        "subject": "New Order #1234",
        "to": "[email protected]"
      },
      "telegram": {
        "chat_id": "123456789"
      }
    }
  }'

JavaScript

const sendNotification = async (orderData) => {
  const response = await fetch('https://api.one-ping.com/send', {
    method: 'POST',
    headers: {
      'Authorization': `Bearer ${process.env.ONEPING_API_KEY}`,
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      message: `New order #${orderData.id} - $${orderData.total}`,
      channels: ['telegram', 'email', 'slack'],
      metadata: {
        email: {
          subject: `New Order #${orderData.id}`,
          to: '[email protected]',
          html: `<h2>Order #${orderData.id}</h2>
                 <p>Customer: ${orderData.customer}</p>
                 <p>Total: $${orderData.total}</p>`
        },
        slack: {
          blocks: [{
            type: 'section',
            fields: [
              { type: 'mrkdwn', text: `*Order:* #${orderData.id}` },
              { type: 'mrkdwn', text: `*Total:* $${orderData.total}` }
            ]
          }]
        }
      }
    })
  });

  return response.json();
};

Python

import requests
import os

def send_notification(order):
    response = requests.post(
        'https://api.one-ping.com/send',
        headers={
            'Authorization': f'Bearer {os.environ["ONEPING_API_KEY"]}',
            'Content-Type': 'application/json'
        },
        json={
            'message': f'New order #{order["id"]} - ${order["total"]}',
            'channels': ['telegram', 'email', 'slack'],
            'metadata': {
                'email': {
                    'subject': f'New Order #{order["id"]}',
                    'to': '[email protected]'
                },
                'telegram': {
                    'chat_id': '123456789'
                }
            }
        }
    )
    return response.json()

Channel Configuration Reference

Each channel requires specific credentials and configuration. Here is a quick reference for all supported channels:

Channel Required Config Setup Guide
Telegram Bot token + Chat ID Telegram Guide
Slack Incoming Webhook URL Slack Guide
Email SMTP or API key (SendGrid/Resend) Email Channel
Discord Webhook URL Discord Channel
WhatsApp Business API credentials WhatsApp Channel
SMS Twilio/Vonage credentials SMS Channel

Fallback Strategies

Not all channels are equally reliable at all times. A Slack webhook might be temporarily down, or an email server could be slow. One-Ping's fallback system ensures your critical notifications always get through.

How Fallbacks Work

When you configure a fallback, One-Ping tries to deliver through the primary channel first. If delivery fails (timeout, API error, or invalid recipient), it automatically retries through the fallback channel. You can chain multiple fallbacks for maximum reliability.

// Fallback: Try Slack first, then Telegram, then Email
{
  "message": "Critical: Database connection pool exhausted",
  "channels": ["slack"],
  "fallback": ["telegram", "email"]
}

Parallel vs. Sequential Delivery

By default, when you specify multiple channels in the channels array, One-Ping delivers to all of them in parallel. This is the "broadcast" approach and is ideal for most use cases. The fallback system is sequential -- it only triggers the next channel if the previous one fails. Combine both strategies for different notification types based on their importance.

Best practice: Use parallel delivery (multiple channels array) for important notifications you want everyone to see. Use fallback delivery for critical alerts where you need guaranteed delivery through at least one channel.

Best Practices for Multi-Channel Notifications

Common Multi-Channel Patterns

Here are proven patterns used by One-Ping customers for different notification scenarios:

Critical Alerts

Slack + Telegram + SMS. Ensure someone sees it immediately, even if they are away from their desk. Used for server outages, security incidents, and payment failures.

Team Updates

Slack + Email. Covers both real-time awareness and async catch-up. Ideal for new signups, completed tasks, and deployment summaries.

Customer Notifications

Email + WhatsApp. Professional email for receipts and detailed information, WhatsApp for timely updates like shipping and appointment reminders.

Developer Monitoring

Telegram + Discord. Quick, developer-friendly channels for error logs, build results, and API usage alerts without the noise of company Slack.

Ready to simplify your notifications?

Start free with 100 messages/month. No credit card required.

Get started free