iZooto

Push to an Audience

Send targeted notifications, use pre-created audiences during communication.

This API can be used to send notification against an audience. You may use 'Get audiences' API described below to get list of audiences along with their IDs. You can push notifications to an audience using the audience ID.

Get Audiences

This API can be used to get the list of audiences created through 'Audience Builder' on iZooto Panel.

API Definition

curl -X GET \
  -H "Authentication-Token: {API_TOKEN}" \
   "https://apis.izooto.com/v1/audience"

Parameters

Name
Type
Required

Authentication-Token

String

Yes

Sample Code

curl -X GET \
  -H "Authentication-Token: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1N2129" \
   "https://apis.izooto.com/v1/audience"

Sample Response

{
"audience": [
{
"id": 1381,
"name": "Frequent-Shoppers",
"reach": 12324
},
{
"id": 1387,
"name": "Mobile-Users",
"reach": 2121
}
]
}

Here id represents the audience ID against which notification has to be pushed, name represents the 'Audience Name' created on panel, and reach represents the total no. of subscribers that belong to the respective audience.

Send notification to an audience

This API can be used to send notification against an audience. You may use 'Get audiences' API described above to get list of audiences along with their IDs. These IDs can be used to push notifications against using 'Push notification to an audience'.

API Definition

curl -X POST \
  -H "Authentication-Token: {API_TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{
    "title" : "{NOTIFICATION_TITLE}",
    "message" : "{NOTIFICATION_MESSAGE}",
    "icon_url" : "{ICON_URL}",
    "banner_url" : "{BANNER_URL}",
    "landing_url" : "{LANDING_URL}",
    "actions" : [
       {
         "text" : "{BUTTON1_TEXT}",
         "url" : "{BUTTON1_URL}"
       },
       {
         "text" : "{BUTTON2_TEXT}",
         "url" : "{BUTTON2_URL}"
       }],
    "utm_source" : "{UTM_SOURCE}",
    "utm_medium" : "{UTM_MEDIUM}",
    "utm_campaign" : "{UTM_CAMPAIGN}",
    "ttl" : {TTL_SECONDS},
    "target" : {
 	"type" : "audience" ,
        "value" : {AUDIENCE_ID}
     }
  }' "https://apis.izooto.com/v1/notifications"

Parameters

Name
Description
Type
Required
Supported On

Authentication-Token

API token for your site

String

Yes

-

title

Notification Title

String

Yes

Chrome, Firefox, Safari

message

Message on Notification

String

Yes

Chrome, Firefox, Safari

icon_url

Notification Icon URL (HTTPS URL only)
(Size: 200x200)

String

Yes

Chrome, Firefox

banner_url

URL of Banner Image (*HTTPS)
(Size: 360x240 for Desktop, 360x200 for Mobile)

String

No, Can't be blank if specified

Only Chrome 56+

landing_url

Landing Page URL

String

Yes

Chrome, Firefox, Safari

actions > text

Button Text

String

No, Can't be blank if specified

Only Chrome 48+

actions > url

Button Landing URL

String

No, Can't be blank if specified

Only Chrome 48+

utm_source

UTM Source

String

No, Can't be blank if specified

Chrome, Firefox, Safari

utm_medium

UTM Medium

String

No, Can't be blank if specified

Chrome, Firefox, Safari

utm_campaign

UTM Campaign

String

No, Can't be blank if specified

Chrome, Firefox, Safari

ttl (Time-to-Live)

Notification Expiry Time

Numeric (seconds)

No, Can't be blank if specified

Chrome, Firefox

audience

ID of the audience segment

Numeric

Yes

-

Sample Code

curl -X POST \
  -H "Authentication-Token: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1N2129" \
  -H "Content-Type: application/json" \
  -d '{
    "title" : "Limited Period Offer",
    "message" : "Go Shopping, Save Big",
    "icon_url" : "https://yourdomain.com/icon.png",
    "banner_url" : "https://yourdomain.com/large-image.png", 
    "landing_url" : "https://yourdomain.com/offers",
    "actions" : [
       {
         "text" : "Buy now",
         "url" : "https://yourdomain.com/buy-now"
       },
       {
         "text" : "Compare",
         "url" : "https://yourdomain.com/compare"
       }],
    "utm_source" : "izooto",
    "utm_medium" : "push-notification",
    "utm_campaign" : "promotion",
    "ttl" : 86400,
    "target" : {
 	"type" : "audience" ,
        "value" : 1381
      }
  }' "https://apis.izooto.com/v1/notifications"

Push to an Audience

Send targeted notifications, use pre-created audiences during communication.