Discord Notifications

Send Discord Notifications from Your Code

Deliver alerts, errors, and events to any Discord channel from your backend, CI/CD pipeline, or cron job. No webhook URL management, no secrets scattered across services. Just one API call.

One API call. That's it.
curl --request POST \
  --url https://api.notificationsbot.com/events \
  -H 'authorization: Bearer YOUR_API_KEY' \
  -H 'content-type: application/json' \
  --data '{
  "title": "Deploy succeeded",
  "message": "v2.4.1 deployed to production. All health checks passing.",
  "channel_code": "my_app",
  "group_codes": ["devops"],
  "metadata": {
    "environment": "production",
    "commit": "a1b2c3d",
    "duration": "47s"
  }
}'

How It Works

Three steps to your first Discord notification

1

Create a Channel and Add a Discord Subscriber

Sign up, create a notification channel in the dashboard, and add a subscriber with your Discord webhook URL. NotificationsBot stores it securely so you never need to hardcode it in your services.

2

Get Your API Key

Generate an API key from your dashboard. Use it in the Authorization header of your requests. If it ever leaks, rotate it in one click without touching your Discord webhooks.

3

Send an HTTP POST

Make a single POST to api.notificationsbot.com/events with your title and message. It arrives in your Discord channel within seconds. That's the entire integration.

What Developers Send to Discord

Common use cases that teams set up in under 5 minutes

Server Monitoring Alerts

CPU at 95%, disk almost full, memory leak detected. Get these alerts in your Discord server the moment they happen, not when a user complains. Wire up your monitoring scripts to send events through the API.

CI/CD Pipeline Notifications

Build passed, tests failed, deploy completed. Post the result of every pipeline run to a dedicated Discord channel so your team knows the state of every branch without checking GitHub.

Error Tracking for Dev Teams

Catch unhandled exceptions, failed API calls, and database connection drops. Send the stack trace, error code, and affected user ID straight to Discord where your on-call engineer will see it immediately.

Business Metrics and Milestones

New signup, 1000th order, revenue milestone hit. Celebrate wins with your team in real time. Send metric events from your backend when key thresholds are crossed.

Uptime Monitoring Alerts

Know the second your site goes down. NotificationsBot even has a built-in health checker that pings your URLs every 60 seconds and sends a Discord alert when something stops responding.

Scheduled Announcements

Schedule maintenance windows, deploy reminders, or recurring reports. Use the scheduled_at field to deliver notifications at a future time without building your own scheduler.

Code Examples

Send a Discord notification in any language. It's just an HTTP POST.

cURL
curl --request POST \
  --url https://api.notificationsbot.com/events \
  -H 'authorization: Bearer YOUR_API_KEY' \
  -H 'content-type: application/json' \
  --data '{
  "title": "Payment failed",
  "message": "Stripe charge for customer cus_abc123 failed. Reason: card_declined. Amount: $49.00",
  "channel_code": "my_saas_app",
  "group_codes": ["billing_alerts"],
  "metadata": {
    "customer_id": "cus_abc123",
    "amount": 4900,
    "error": "card_declined"
  }
}'
Python
import requests

response = requests.post(
    "https://api.notificationsbot.com/events",
    headers={
        "Authorization": "Bearer YOUR_API_KEY",
        "Content-Type": "application/json",
    },
    json={
        "title": "Payment failed",
        "message": (
            "Stripe charge for customer cus_abc123 failed. "
            "Reason: card_declined. Amount: $49.00"
        ),
        "channel_code": "my_saas_app",
        "group_codes": ["billing_alerts"],
        "metadata": {
            "customer_id": "cus_abc123",
            "amount": 4900,
            "error": "card_declined",
        },
    },
)

print(response.status_code)  # 200
Node.js
const response = await fetch(
  "https://api.notificationsbot.com/events",
  {
    method: "POST",
    headers: {
      "Authorization": "Bearer YOUR_API_KEY",
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      title: "Payment failed",
      message:
        "Stripe charge for customer cus_abc123 failed. " +
        "Reason: card_declined. Amount: $49.00",
      channel_code: "my_saas_app",
      group_codes: ["billing_alerts"],
      metadata: {
        customer_id: "cus_abc123",
        amount: 4900,
        error: "card_declined",
      },
    }),
  }
);

console.log(response.status); // 200

NotificationsBot vs. Raw Discord Webhooks

Why teams stop managing webhook URLs directly

Concern Raw Discord Webhooks NotificationsBot
Secret management Webhook URLs are secrets. If one leaks, anyone can post to your channel. You need to regenerate the URL and update every service that uses it. Your services only hold an API key. If it leaks, rotate it in one click. Your Discord webhook URL stays safe in the dashboard, never exposed to code.
Hardcoded URLs Every service, script, and cron job has a webhook URL baked in. Moving to a different Discord channel means updating code everywhere. Zero webhook URLs in your codebase. Change the destination channel by updating a subscriber in the dashboard. No deploys required.
Rerouting notifications Want to send alerts to a second channel or add Slack? Rewrite the integration in every service. Add a new subscriber in the dashboard. Same API call, new destination. Add Telegram, Slack, or email subscribers without touching code.
Delivery logs Discord gives you no delivery receipts. If a message doesn't show up, good luck debugging. Full event history with delivery status, timestamps, and metadata. See exactly what was sent, when, and whether it was delivered.
Multi-channel support Discord only. Every new platform means a new integration from scratch. One API call delivers to Discord, Telegram, Slack, and custom webhooks. Add a subscriber for each platform, no code changes needed.
Scheduled notifications Build your own scheduler with cron jobs, queues, and retry logic. Pass a scheduled_at timestamp in your API call. We handle the timing and delivery for you.

Start Sending Discord Notifications in 5 Minutes

Free tier includes 100 events per month, one channel, and one subscriber. No credit card required. Upgrade when you need more.

Create your free account

Works with Discord, Telegram, Slack, and custom webhooks.