📞 Send Automated Call Notifications

Prerequisites

Overview

Automated voice call notifications provide immediate, direct communication with your users through phone calls. NotificationAPI makes it easy to send personalized voice messages with features like proper phone number formatting, delivery tracking, and global reach—all without needing a third-party service like Twilio.

This guide covers everything you need to know about sending automated call notifications, from basic setup to advanced features.

TIP

You DON’T need another 3rd-party like Twilio. Through our partnerships, we allocate and manage any required telecom infrastructure for you.

Step 1: Verify Your Call Notification

If you haven’t already configured a call notification, follow our Configure Notification guide to create one with the Call channel enabled.

Once configured, note the Notification Type - you’ll need this in your code (e.g., urgent_alert, security_verification, appointment_reminder).

Step 2: Install the SDK

Install the node package using one of the following package managers:

npm install notificationapi-node-server-sdk
yarn add notificationapi-node-server-sdk
pnpm add notificationapi-node-server-sdk
pip install notificationapi_python_server_sdk
composer require notificationapi/notificationapi-php-server-sdk
go get github.com/notificationapi-com/notificationapi-go-server-sdk
dotnet add package NotificationAPI --version 0.5.0

Add the following dependency to your Maven project:

<dependency>
    <groupId>com.notificationapi</groupId>
    <artifactId>notificationapi-java-server-sdk</artifactId>
    <version>0.2.0</version>
</dependency>

For optimal functionality, you’ll also need:

<dependency>
    <groupId>org.apache.httpcomponents</groupId>
    <artifactId>httpclient</artifactId>
    <version>4.5.14</version>
</dependency>
<dependency>
    <groupId>com.fasterxml.jackson.core</groupId>
    <artifactId>jackson-databind</artifactId>
    <version>2.15.2</version>
</dependency>

Add the NotificationAPI class to your application - see the full Ruby implementation.

Step 3: Send a Basic Call Notification

Here’s how to send a basic automated call notification:

import notificationapi from 'notificationapi-node-server-sdk';

// Initialize (default US region)
// For CA region: add 'https://api.ca.notificationapi.com' after CLIENT_SECRET
// For EU region: add 'https://api.eu.notificationapi.com' after CLIENT_SECRET
notificationapi.init('YOUR_CLIENT_ID', 'YOUR_CLIENT_SECRET');

// Send call notification
notificationapi.send({
  type: 'urgent_alert',
  to: {
    id: 'user123',
    number: '+16175551212' // Required for call notifications (E.164 format)
  },
  parameters: {
    firstName: 'John',
    alertType: 'Security Alert'
  }
});
import asyncio
from notificationapi_python_server_sdk import notificationapi

# Initialize (default US region)
notificationapi.init("YOUR_CLIENT_ID", "YOUR_CLIENT_SECRET")

async def send_call():
    await notificationapi.send({
        "type": "urgent_alert",
        "to": {
            "id": "user123",
            "number": "+16175551212"  # Required for call notifications (E.164 format)
        },
        "parameters": {
            "firstName": "John",
            "alertType": "Security Alert"
        }
    })

# Run the async function
asyncio.run(send_call())
use NotificationAPI\NotificationAPI;

// Initialize
$notificationapi = new NotificationAPI('YOUR_CLIENT_ID', 'YOUR_CLIENT_SECRET');

// Send call notification
$notificationapi->send([
    "type" => "urgent_alert",
    "to" => [
        "id" => "user123",
        "number" => "+16175551212"  // Required for call notifications (E.164 format)
    ],
    "parameters" => [
        "firstName" => "John",
        "alertType" => "Security Alert"
    ]
]);
package main

import (
    notificationapi "github.com/notificationapi-com/notificationapi-go-server-sdk"
)

func main() {
    // Initialize
    notificationapi.Init("YOUR_CLIENT_ID", "YOUR_CLIENT_SECRET", "https://api.notificationapi.com")

    // Prepare parameters
    parameters := make(map[string]interface{})
    parameters["firstName"] = "John"
    parameters["alertType"] = "Security Alert"

    // Send call notification
    notificationapi.Send(
        notificationapi.SendRequest{
            Type: "urgent_alert",
            To: notificationapi.User{
                Id:     "user123",
                Number: "+16175551212",  // Required for call notifications (E.164 format)
            },
            Parameters: parameters,
        },
    )
}
using NotificationApi.Server;
using NotificationApi.Server.Models;

// Initialize
var notificationApi = new NotificationApiServer("YOUR_CLIENT_ID", "YOUR_CLIENT_SECRET");

// Create user
var user = new NotificationUser("user123")
{
    TelephoneNumber = "+16175551212"  // Required for call notifications (E.164 format)
};

// Create parameters
var parameters = new Dictionary<string, object>
{
    { "firstName", "John" },
    { "alertType", "Security Alert" }
};

// Send call notification
await notificationApi.Send(new SendNotificationData("urgent_alert", user)
{
    Parameters = parameters
});
import com.notificationapi.NotificationAPIClient;
import java.util.HashMap;
import java.util.Map;

// Initialize
NotificationAPIClient client = new NotificationAPIClient("YOUR_CLIENT_ID", "YOUR_CLIENT_SECRET");

// Create parameters
Map<String, Object> parameters = new HashMap<>();
parameters.put("firstName", "John");
parameters.put("alertType", "Security Alert");

// Create user
Map<String, Object> user = new HashMap<>();
user.put("id", "user123");
user.put("number", "+16175551212");  // Required for call notifications (E.164 format)

// Create notification request
Map<String, Object> request = new HashMap<>();
request.put("type", "urgent_alert");
request.put("to", user);
request.put("parameters", parameters);

// Send call notification
client.send(request);
# Initialize
notificationapi = NotificationAPI.new("YOUR_CLIENT_ID", "YOUR_CLIENT_SECRET")

# Send call notification
notificationapi.send({
  type: "urgent_alert",
  to: {
    id: "user123",
    number: "+16175551212"  # Required for call notifications (E.164 format)
  },
  parameters: {
    firstName: "John",
    alertType: "Security Alert"
  }
})

Phone Number Formatting

When sending call notifications, phone numbers must be formatted correctly:

  • Format: E.164 standard with country code (e.g., +16175551212)
  • US/Canada numbers: We also accept unformatted numbers:
    • (415) 555-1212
    • 415-555-1212
    • 4155551212
WARNING

For international numbers outside US/Canada, always use the E.164 format with the + prefix and country code.

Sender Phone Numbers

Free Accounts

  • Shared number: +16505501770
  • Dedicated phone number: Assigned exclusively to your account
  • Default area code: +1 (650), but can be changed to other area codes, short codes, or toll-free numbers
  • Custom numbers: We can help transfer existing numbers to our care

Advanced Features

Personalization with Parameters

Use parameters to personalize your voice messages by customizing both the call template in the dashboard and the parameters you send from your code.

Editing Your Call Template

Hello {{firstName}}, this is a reminder about your appointment with {{doctorName}}
on {{appointmentDate}} at {{appointmentTime}}. Please call if you need to reschedule.
Thank you!

Sending with Parameters

Then use the corresponding parameters in your code:

notificationapi.send({
  type: 'appointment_reminder',
  to: {
    id: 'user123',
    number: '+16175551212'
  },
  parameters: {
    firstName: 'Sarah',
    appointmentDate: 'March 15th',
    appointmentTime: '2:30 PM',
    doctorName: 'Dr. Smith'
  }
});

Delivery Tracking and Monitoring

NotificationAPI provides comprehensive delivery monitoring:

  • Real-time status updates via webhooks
  • Delivery reports in the dashboard
  • Automatic retry logic for failed calls
  • Rate limiting to prevent spam

Your Own Telecom Team

When you use NotificationAPI for call notifications, you get access to our telecom expertise:

Regulatory Compliance

More and more countries and telecom companies are joining forces to prevent phone calls spam. We help our customers navigate these regulations and stay compliant, by registering your numbers, submitting necessary documentations, verifying your business in different juristictions, applying for elevated access, and more.

Delivery Monitoring

We also monitor your call activity and will reach out to you directly if we detect an alarming rate of failure. You can also rely on our team for best practices, reviewing your automated calling script, or to help you troubleshoot a calling issu

Number Management

We can also navigate the transfer of any existing numbers to our care, so your team can focus on your software and core product.

Frequently Asked Questions (FAQs)

Do I need a Twilio account or other third-party service?

No! NotificationAPI provides complete telecom infrastructure through our partnerships. You don’t need Twilio, Vonage, or any other voice service provider.

What phone number will recipients see when they receive calls?

  • Free accounts: Calls will come from our shared number +16505501770
  • Paid accounts: Calls will come from your dedicated phone number, which defaults to a +1 (650) area code but can be customized

What countries and regions are supported for call notifications?

NotificationAPI supports call notifications to most countries worldwide. Contact our support team for specific country availability and any special requirements.

How long can my voice message be?

Voice messages can typically be up to 5 minutes long, though we recommend keeping them under 60 seconds for better user experience and delivery rates.

How do I handle failed call deliveries?

NotificationAPI automatically retries failed calls and provides detailed delivery status via:

  • Dashboard logs: View delivery status and failure reasons
  • Webhooks: Receive real-time status updates in your application
  • APIs: Query delivery status programmatically

Can I schedule call notifications for later?

Yes! You can schedule call notifications using the scheduledDate parameter. See our Scheduled Notifications documentation for more information.

Are there rate limits for call notifications?

Yes, rate limits help ensure optimal delivery and prevent spam:

  • Free accounts: Limited calls per day
  • Paid accounts: Higher limits based on your plan
  • Enterprise: Custom rate limits available

Contact our team if you need higher limits for your use case.