Feature

Automatic Retry System for Failed Notifications

Networks fail. Servers go down. Rate limits get hit. One-Ping handles all of it automatically with intelligent retries, exponential backoff, and fallback channels -- so your notifications always get through.

Why Automatic Retries Matter

In a perfect world, every notification would be delivered on the first attempt. In reality, things go wrong all the time. The Telegram API might be temporarily overloaded. Your email provider could hit a rate limit. A Slack webhook URL might temporarily return a 500 error. A Discord server might be experiencing downtime.

Without automatic retries, each of these failures means a lost notification. Your customer never gets their order confirmation. Your team misses the server alert. Your user does not receive the verification code. For critical notifications, a single point of failure is unacceptable.

One-Ping's retry system is built into the core of the platform. When a notification delivery fails, One-Ping automatically retries with exponential backoff, giving the downstream service time to recover. And if retries are exhausted on one channel, the fallback channel system kicks in to deliver your message through an alternative path. All of this happens transparently -- you send one API call, and One-Ping handles the rest.

Enabled by default. Automatic retries are turned on for every notification you send. You can disable them per request by setting "retry": false in your API call, but we recommend keeping them enabled for maximum reliability.

How Retry Works: Exponential Backoff

When a notification delivery attempt fails, One-Ping does not immediately retry. Instead, it uses exponential backoff -- waiting progressively longer between each attempt. This approach gives the failing service time to recover and avoids overwhelming it with rapid-fire requests that could make the problem worse.

Attempt Delay Total Time Elapsed What Happens
1st (original) Immediate 0 seconds Notification sent to channel
2nd (1st retry) 15 seconds 15 seconds Retry with same payload
3rd (2nd retry) 1 minute ~1 minute 15 seconds Retry with same payload
4th (3rd retry) 5 minutes ~6 minutes 15 seconds Final retry attempt

After the 3rd retry (4th total attempt), if the notification still has not been delivered, One-Ping marks it as failed. At this point, if you have configured fallback channels, the fallback system takes over. If not, a notification.failed event is sent to your webhook endpoint and the failure is logged in your dashboard.

What Triggers a Retry

Not every failure warrants a retry. One-Ping distinguishes between transient errors (which are likely to succeed on retry) and permanent errors (which will not). Here is what triggers and does not trigger automatic retries.

Retried Automatically

  • Timeout -- channel did not respond within the deadline
  • Server error (5xx) -- downstream service had an internal error
  • Rate limited (429) -- too many requests to the channel
  • Connection reset -- network interruption during delivery
  • DNS resolution failure -- temporary DNS issue
  • Service unavailable (503) -- channel is temporarily down

Not Retried

  • Invalid recipient -- email address or phone number does not exist
  • Authentication error -- your channel credentials are wrong
  • Channel not configured -- you have not set up this channel
  • Message rejected -- content violates channel policies
  • Account suspended -- your channel account is disabled
  • Permanent bounce -- email mailbox does not exist

This distinction is important because retrying permanent errors wastes time and delays fallback channels from kicking in. One-Ping's retry logic is smart enough to skip retries for errors that will never succeed, moving directly to the fallback path if one is configured.

Fallback Channels: Your Safety Net

Retries handle transient failures on a single channel. But what if the entire channel is down for an extended period? What if the Telegram API is experiencing a major outage that lasts longer than your retry window? That is where fallback channels come in.

With One-Ping, you can specify backup channels that activate when the primary channel fails after all retry attempts. If your Telegram notification cannot be delivered, send it via Email instead. If Slack is unreachable, fall back to Discord. Your message gets through regardless of individual channel availability.

Configuring Fallback Channels via the API

curl -X POST https://api.one-ping.com/send \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "message": "Server CPU at 95% - immediate attention required",
    "channels": ["telegram"],
    "recipient": "+34612345678",
    "fallback_channels": ["email", "sms"],
    "retry": true
  }'

In this example, One-Ping will first try to deliver via Telegram. If all 3 retry attempts fail, it automatically sends the notification via Email. If Email also fails after retries, it falls back to SMS. The fallback chain is processed in the order you specify in the fallback_channels array.

Fallback Flow

Primary channel attempted

One-Ping sends your notification to the primary channel (e.g., Telegram). If it succeeds, done. If it fails, the retry system activates.

Retries on primary channel

Up to 3 retry attempts with exponential backoff. If any retry succeeds, done. If all retries fail, the fallback system activates.

First fallback channel

The first channel in your fallback_channels array receives the notification. It goes through the same retry process: up to 3 attempts with exponential backoff.

Subsequent fallbacks or final failure

If the first fallback fails, the next fallback channel is tried. If all fallback channels are exhausted, a notification.failed webhook event is sent and the failure is logged in your dashboard.

Configuration Options

While the retry system works out of the box with sensible defaults, you can customize its behavior per notification or globally in your account settings.

Per-Request Configuration (via API)

Parameter Type Default Description
retry boolean true Enable or disable automatic retries for this notification
fallback_channels array [] Ordered list of backup channels to try if primary channels fail
callback_url string null Receive webhook callbacks for retry and fallback events

Account-Level Settings (via Dashboard)

In your dashboard settings, you can configure default retry behavior that applies to all notifications unless overridden by per-request parameters.

Pro tip: For critical notifications like order confirmations or security alerts, always configure at least one fallback channel. The cost of a duplicate notification on a different channel is far lower than the cost of a missed notification.

Common Retry Scenarios

Here are real-world scenarios where the retry system saves your notifications from being lost.

Telegram API Rate Limit

You are sending a batch of notifications and hit Telegram's rate limit. One-Ping receives a 429 response, waits 15 seconds, retries, and the message goes through on the second attempt. No notifications lost.

Slack Webhook Timeout

Your Slack workspace is experiencing high load, causing webhook timeouts. One-Ping retries three times over about 6 minutes. If Slack recovers, the notification is delivered. If not, the fallback channel (e.g., Email) takes over.

Email Provider Outage

Your SMTP provider has a temporary outage. Retries keep the notification in the queue while the provider recovers. Most email outages resolve within minutes, well within the retry window.

Discord Server Error

Discord returns a 500 error during a brief service disruption. The retry system catches this, waits, and retries. The second or third attempt succeeds once Discord stabilizes, and your alert reaches the team.

Network Interruption

A brief network interruption between One-Ping and the channel provider causes a connection reset. The next retry attempt, seconds later, establishes a clean connection and delivers successfully.

Multi-Channel Fallback

You send a critical server alert to Telegram with Email and SMS fallbacks. Telegram is down. Email delivery fails due to a full inbox. SMS succeeds -- your on-call engineer gets the alert and responds within minutes.

Monitoring Retries in the Dashboard

Every retry attempt is logged and visible in your One-Ping dashboard. When you view a notification that required retries, you can see the complete timeline of delivery attempts, including timestamps, the error that triggered each retry, and which attempt finally succeeded (or if all attempts failed).

The dashboard also provides aggregate retry metrics so you can understand the overall reliability of your notification channels.

Retry Metrics Available

// Example notification timeline in the dashboard

Notification: msg_a1b2c3d4e5
Message: "Server CPU at 95%"
Primary channel: telegram

  10:30:00  ATTEMPT 1  telegram  FAILED  (timeout)
  10:30:15  ATTEMPT 2  telegram  FAILED  (timeout)
  10:31:15  ATTEMPT 3  telegram  FAILED  (503 Service Unavailable)
  10:36:15  ATTEMPT 4  telegram  FAILED  (503 Service Unavailable)
  10:36:16  FALLBACK  email     DELIVERED  (245ms)

Result: Delivered via fallback channel (email)
Total time: 6 minutes 16 seconds

Built-In Reliability, Zero Configuration Required

One-Ping's retry system works out of the box. Every notification you send is protected by intelligent retries and fallback channels. You do not need to write retry logic in your application, manage queues, or build fallback handling. Just send your notification via the API, and One-Ping ensures it gets delivered.

Ready to simplify your notifications?

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

Get started free