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.UconnectedIT.com/v1/Services/ISxxx/Bindings \
-d "Identity=User123" \
-d "BindingType=gcm" \
-d "Address=xxx" \
-u '{UconnectedIT account sid}:{UconnectedIT auth token}'
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
require 'Uconnectedit-ruby'
# Uconnectedit credentials and service SID
account_sid = 'AC421124bfab3052ad108f3e8c7a119cfb'
auth_token = 'AUTH_TOKEN'
alerts_service_sid = 'IS13c4cce46710eb656ffffdef2c82c589'
# Initialize the client
client = Uconnectedit::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: 'FE66489F304DC75B8D6E9200DFF8A456E8DAEACEC428B427E9518741C92C6660')
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
from UconnectedIT.rest import Client
# UconnectedIT 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='FE66489F304DC75B8D6E9200DFF8A456E8DAEACEC428B427E9518741C92C6660')
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
import com.UconnectedIt.sdk.UconnectedIt;
import com.UconnectedIt.sdk.creator.alerts.v1.service.BindingCreator;
public class CreateBinding {
// UconnectedIt 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) {
UconnectedIt.init(ACCOUNT_SID, AUTH_TOKEN);
// Create the binding
BindingCreator alerts = new BindingCreator(
ALERTS_SERVICE_SID, "User123",
Binding.BindingType.APN,
"FE66489F304DC75B8D6E9200DFF8A456E8DAEACEC428B427E9518741C92C6660");
System.out.println(alerts.execute());
}
}
|
Deliver a transactional alert
Choose whom to send your message and what to say & we’ll convert that to all channels that are supported.
1
2
3
4
5
|
curl -X POST https://alerts.UconnectedIt.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 '{UconnectedIt account sid}:{UconnectedIt auth token}'
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
require 'UconnectedIT-ruby'
# UconnectedIt credentials and service SID
account_sid = 'AC421124bfab3052ad108f3e8c7a119cfb'
auth_token = 'AUTH_TOKEN'
alerts_service_sid = 'IS13c4cce46710eb656ffffdef2c82c589'
# Initialize the client
client = UconnectedIt::REST::Client.new(account_sid, auth_token)
servUcITML = client.alerts.v1.servUcITMLs(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
19
20
|
import com.UconnectedIT.sdk.creator.alerts.v1.service.alertsCreator;
import com.UconnectedIT.sdk.UconnectedIT;
public class Sendalerts {
// UconnectedIT 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) {
UconnectedIT.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 UconnectedIt.rest import Client
# UconnectedIt 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 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 '{UconnectedIT account sid}:{UconnectedIT auth token}'
|
1
2
3
4
5
|
//alerts.UconnectedIT.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 '{UconnectedIT account sid}:{UconnectedIT auth token}'
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
from UconnectedIT.rest import Client
# UconnectedIT 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 UconnectedIT.rest import Client
# UconnectedIT 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!')
|