Alerts API Beta

Send notifications over SMS, push, messaging apps, and more with a user-friendly API.
ALERTS API

Send alerts through SMS, messaging apps, push & more.

Generate a binding

A notification address can be tied to a user through a binding, such as User123’s Android phone push registration or Liz’s mobile phone number.

1
2
3
4
5
curl -XPOST https://alerts.foneapi.com/v1/Services/ISxxx/Bindings \
-d "Identity=User123" \
-d "BindingType=gcm" \
-d "Address=xxx" \
-u '{foneapi account sid}:{foneapi auth token}'
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
require 'foneapi-ruby'

# foneapi credentials and service SID

account_sid = 'AC421124bfab3052ad108f3e8c7a119cfb'
auth_token = 'AUTH_TOKEN'
alerts_service_sid = 'IS13c4cce46710eb656ffffdef2c82c589'

# Initialize the client
client = foneapi::REST::Client.new(account_sid, auth_token)
service = client.alerts.v1.services(alerts_service_sid)

# Create a binding
binding = service.bindings.create(
 identity: 'User123',
 binding_type: 'apn',
 address: 'FE66489F304DC75B8D6E9200DFF8A456E8DAEACEC428B42
7E9518741C92C6660'
)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
from foneapi.rest import Client

# foneapi credentials and service SID
account_sid = 'AC421124bfab3052ad108f3e8c7a119cfb'
auth_token = 'AUTH_TOKEN'
alerts_service_sid = 'IS13c4cce46710eb656ffffdef2c82c589'

# Initialize the client
client = Client(account_sid, auth_token)
service = client.alerts.v1.services(alerts_service_sid)

# Create the binding
binding = service.bindings.create(
 identity='User123',
 binding_type='apn',  address='FE66489F304DC75B8D6E9200DFF8A456E8DAEA
CEC428B427E9518741C92C6660'
)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import com.foneapi.sdk.foneapi;
import com.foneapi.sdk.creator.alerts.v1.service.BindingCreator;

public class CreateBinding {

 // foneapi credentials and service SID
 public static final String ACCOUNT_SID = "AC421124bfab3052ad108f3e8c7a119cfb";
 public static final String AUTH_TOKEN = "AUTH_TOKEN";
 public static final String ALERTS_SERVICE_SID = "IS13c4cce46710eb656ffffdef2c82c589";

 public static void main(String[] args) {
   foneapi.init(ACCOUNT_SID, AUTH_TOKEN);

   // Create the binding
   BindingCreator alerts = new BindingCreator(
     ALERTS_SERVICE_SID, "User123",
     Binding.BindingType.APN,      "FE66489F304DC75B8D6E9200DFF8A456E8DAEACEC428B427E9
518741C92C6660"
);
     System.out.println(alerts.execute());  }}

Deliver a transactional alert

Choose whom to send your message and what to say & we’ll convert that information to all channels that are supported.

1
2
3
4
5
curl -X POST https://alerts.foneapi.com/v1/Services/ISxxx/alerts \
-d 'Segment=premium' \
-d 'Tag=preferred device' \
-d 'Body=Hello World delivered via SMS, APNS, FCM and Facebook Messenger' \
-u '{foneapi account sid}:{foneapi auth token}'
1
2
3
4
5
6
7
8
9
10
11
12
13
14
require 'foneapi-ruby'

# foneapi credentials and service SID
account_sid = 'AC421124bfab3052ad108f3e8c7a119cfb'
auth_token = 'AUTH_TOKEN'
alerts_service_sid = 'IS13c4cce46710eb656ffffdef2c82c589'

# Initialize the client
client = foneapi::REST::Client.new(account_sid, auth_token)
servfoneapiTML = client.alerts.v1.servfoneapiTMLs(alerts_service_sid)

# Send a alerts
alerts = service.alerts.create(
 identity: 'User123', body: 'Hello there!')
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import com.foneapi.sdk.creator.alerts.v1.service.alertsCreator;
import com.foneapi.sdk.foneapi;

public class Sendalerts  {

 // foneapi credentials and service SID
 public static final String ACCOUNT_SID = "AC421124bfab3052ad108f3e8c7a119cfb";
 public static final String AUTH_TOKEN = "AUTH_TOKEN";
 public static final String ALERTS_SERVICE_SID = "IS13c4cce46710eb656ffffdef2c82c589";
 public static void main(String[] args) {    foneapi.init(ACCOUNT_SID, AUTH_TOKEN);

   // Send the alerts
   alertsCreator alerts = new alertsCreator(ALERTS_SERVICE_SID);
 alerts.setIdentity("Alice");
alerts.setBody("Hello there!");
System.out.println(alerts.execute());  }}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
from foneapi.rest import Client

# foneapi credentials and service SID
account_sid = 'AC421124bfab3052ad108f3e8c7a119cfb'
auth_token = 'AUTH_TOKEN'
notify_service_sid = 'IS13c4cce46710eb656ffffdef2c82c589'

# Initialize the client
client = Client(account_sid, auth_token)
service = client.alerts.v1.services(notify_service_sid)

# Send the alerts
alerts = service.alerts.create(
 identity='User123', body='Hello there!')

Bulk SMS can be sent using one API request

Choose whom to send your message and what to say & we’ll convert that information to all channels that are supported.

1
2
3
4
5
//alerts..com/v1/Services/ISxxx/alerts \
-d 'Segment=premium' \
-d 'Tag=preferred device' \
-d 'Body=Hello World delivered via SMS, APNS, FCM and Facebook Messenger' \
-u '{foneapi account sid}:{foneapi auth token}'
1
2
3
4
5
6
//alerts.foneapi.com/v1/Services/ISxxx/alerts \
-d 'Segment=premium' \
-d 'Tag=preferred device' \
-d 'Body=Hello World delivered via SMS, APNS, FCM and Facebook Messenger' \
-u '{foneapi account sid}:{foneapi auth token}'
1
2
3
4
5
6
7
8
9
10
11
12
13
14
from foneapi.rest import Client

# foneapi credentials and service SID
account_sid = 'AC421124bfab3052ad108f3e8c7a119cfb'
auth_token = 'AUTH_TOKEN'
alerts_service_sid = 'IS13c4cce46710eb656ffffdef2c82c589'

# Initialize the client
client = Client(account_sid, auth_token)
service = client.alerts.v1.services(alerts_service_sid)

# Send the notification
notification = service.alerts.create(
 segment='premium', tag='preferred device', body='Hello there!')
1
2
3
4
5
6
7
8
9
10
11
12
13
14
from foneapi.rest import Client

# foneapi credentials and service SID
account_sid = 'AC421124bfab3052ad108f3e8c7a119cfb'
auth_token = 'AUTH_TOKEN'
alerts_service_sid = 'IS13c4cce46710eb656ffffdef2c82c589'

# Initialize the client
client = Client(account_sid, auth_token)
service = client.alerts.v1.services(alerts_service_sid)

# Send the alerts
alerts = service.alerts.create(
 segment='premium', tag='preferred device', body='Hello there!')
ALERTS SDK SOON

Sign up to push notifications

Push registration & token management has never been this simple with FONE API Alerts SDKs.

Pick your preferred channel

Conveniently add more or take out tags from contacts.

Receipt for delivery

Acquire events every time push notifications are delivered. You can also adjust logic dependent on delivery success via programs.

Acknowledgement

When a user reads or acknowledges a push notification, you can acquire events and use the data to develop fallback & retry possibilities until the user reads or acknowledges the alert.

See examples of
Alerts Use Cases

THE FONE API EDGE

Redundancy

Automated failover ensures that you have 99.95% uptime SLA without the need for a maintenance window.

Scalability

Use existing apps to new markets by configuring features for compliance and localization.

Multi-channel

Use a single platform for voice, SMS, video, authentication, chat and more.

Without hassles

Get free support, have the freedom to scale your business, market faster with pay-as-you-go.

Create your Account to Start Building
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.