Push to All

This API can be used to send notifications to all subscribers of your website.

Notification Payload Example

curl -X POST \
 - H "Authentication-Token: {API_TOKEN}" \
 - H "Content-Type: application/json" \
 -d '{
 "campaign_name" : "{CAMPAIGN_NAME}",
 "title" : "{NOTIFICATION_TITLE}",
 "message" : "{NOTIFICATION_MESSAGE}",
 "icon_url" : "{ICON_URL}",
 "badge_icon_url" : "{BADGE_ICON_URL}",
 "banner_url" : "{BANNER_URL}",
 "landing_url" : "{LANDING_URL}",
 "actions" : [
 {
 "text" : "{BUTTON_1_TEXT}",
 "url" : "{BUTTON_1_URL}",
 "icon" : "{BUTTON_1_ICON}"
 },
 {
 "text" : "{BUTTON_2_TEXT}",
 "url" : "{BUTTON_2_URL}",
 "icon" : "{BUTTON_2_ICON}"
 }],
 "utm_source" : "{UTM_SOURCE}",
 "utm_medium" : "{UTM_MEDIUM}",
 "utm_campaign" : "{UTM_CAMPAIGN}",
 "req_interaction" : {true/false},
 "override_tag" : "{CAMPAIGN_TAG_NAME}",
 "ttl" : {TTL_SECONDS},
 "target" : {
 "type" : "all"
 }
 }' "https://apis.izooto.com/v1/notifications"
curl -X POST \
 - H "Authentication-Token: {API_TOKEN}" \
 - H "Content-Type: application/json" \
 -d '{
 "campaign_name" : "{CAMPAIGN_NAME}",
 "title" : "{NOTIFICATION_TITLE}",
 "message" : "{NOTIFICATION_MESSAGE}",
 "icon_url" : "{ICON_URL}",
 "badge_icon_url" : "{BADGE_ICON_URL}",
 "banner_url" : "{BANNER_URL}",
 "landing_url" : "{LANDING_URL}",
 "actions" : [
 {
 "text" : "{BUTTON_1_TEXT}",
 "url" : "{BUTTON_1_URL}",
 "icon" : "{BUTTON_1_ICON}"
  "id":"{BUTTON_1_ACTION_ID}"
 },
 {
 "text" : "{BUTTON_2_TEXT}",
 "url" : "{BUTTON_2_URL}",
 "icon" : "{BUTTON_2_ICON}"
 "id":"{BUTTON_2_ACTION_ID}"
 }],
 "utm_source" : "{UTM_SOURCE}",
 "utm_medium" : "{UTM_MEDIUM}",
 "utm_campaign" : "{UTM_CAMPAIGN}",
 "ttl" : {TTL_SECONDS},
 "target" : {
 "type" : "all"
 },
 "additional_params":{
    "{KEY_1}":"{VALUE_1}",
    "{KEY_2}":"{VALUE_2}",
    "{KEY_3}":"{VALUE_3}",
    "{KEY_4}":"{VALUE_4}",
    "{KEY_5}":"{VALUE_5}"
},
"open_in_app" :{TRUE/FALSE}
}' "https://apis.izooto.com/v1/notifications"


Parameters Definition

Name

Description

Type

Required

Supported On

Authentication-token

API token for your site

String

Yes

Campaign Name

Campaign Title

String

Yes

Web Push:
Chrome, Firefox, Safari, Opera and Edge

App Push:
Android

Titile

Notification Title

String

Yes

Web Push:
Chrome,
Firefox,
Safari,
Opera and
Edge

App Push:
Android

Message

Message on Notification

String

Yes

Web Push:
Chrome,
Firefox,
Safari,
Opera and
Edge

App Push:
Android

Icon Upload

File Size <= 20kb
(Dimensions: 100 X 100)

JPG, JPEG, PNG formats only.

Note: Safari uses a default bell Icon

Yes

Web Push:
Chrome 50+,
Firefox 44+,
Opera 42+,
Edge 17+

icon_url

Notification icon URL
(HTTPS URL Only)
(Dimensions: 100 X 100)

String

Yes

Web Push:
Chrome 50+,
Firefox 44+,
Opera 42+,
Edge 17+

App Push:
Android

badge_icon_url

Badge icon URL
File Size <= 20kb
(HTTPS URL Only)
(Dimensions: 72 X 72)

String
PNG formats only

No

Web Push:
Chrome 50+,
Firefox 44+,
Opera 42+,
Edge 17+

App Push:
Android

banner_url

URL of banner image
(HTTPS)
File Size<=100Kb
(Dimensions: 360 X 240 for Desktop and 360 X 200 for Mobile)

String
Jpg, Jpeg, Png formats only

No

Web Push:
Chrome 50+,
Opera 42+,
Edge 17+

App Push:
Android

landing_url

Landing Page URL

String

Yes

Web Push:
Chrome,
Firefox,
Safari,
Opera and
Edge

App Push:
Android

actions > text

Button Text

String

No

Web Push:
Chrome 56+,
Opera 57+,
Edge 17+

App Push:
Android

actions > url

Button Landing URL

String

No

Web Push:
Chrome 56+,
Opera 57+,
Edge 17+

App Push:
Android

actions > icon

Button Icon URL
File Size <= 20kb
(HTTPS URL Only)
(Dimensions: 24 X 24)

String
Jpg, Jpeg, Png formats only

No

Web Push:
Chrome 56+,
Opera 57+,
Edge 17+

App Push:
Android

actions > id

Button Action ID

String

No

App Push:
Android

utm_source

UTM Source

String

No

Web Push:
Chrome,
Firefox,
Safari,
Opera,
Edge

App Push:
Android

utm_medium

UTM Medium

String

No

Web Push:
Chrome,
Firefox,
Safari,
Opera,
Edge

App Push:
Android

utm_campaign

UTM Campaign

String

No

Web Push:
Chrome,
Firefox,
Safari,
Opera,
Edge

App Push:
Android

req_interaction

Make Notifications Sticky

Boolean

No

Web Push:
Chrome

override_tag

Show Latest Campaign Tag

String
(Max 15 characters)

No

Web Push:
Chrome

ttl (time-to -live)

Notification expiry time

Numeric (seconds)

No

Web Push:
Chrome,
Firefox,
Opera,

App Push:
Android

target > type

Notification Audience.
Use "Topic" for Android.

String

Yes

Web Push:
Chrome,
Firefox,
Opera,

App Push:
Android

additional_params

Custom Key-Value pairs used to open native screens inside app

String

No

App Push:
Android



Sample Code

curl -X POST \        
 - H "Authentication-Token: abc123efgh456ijklmn9786" \
 - H "Content-Type: application/json" \
 -d '{
 "campaign_name" : "Test Campaign"
 "title" : "Limited Period Offer",
 "message" : "Go Shopping, Save Big",
 "icon_url" : "https://yourdomain.com/icon.png",
 "badge_icon_url" : "https://yourdomain.com/badge_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",
 "icon" : "https://yourdomain.com/button_1_icon.png"
 },
 {
 "text" : "Compare",
 "url" : "https://yourdomain.com/compare",
 "icon" : "https://yourdomain.com/button_2_icon.png"
 }],
 "utm_source" : "izooto",
 "utm_medium" : "push_notification",
 "utm_campaign" : "promotion",
 "req_interaction" : true,
 "override_tag" : "My Tag",
 "ttl" : 86400,
 "target" : {
 "type" : "all"
 }
 }' "https://apis.izooto.com/v1/notifications"
curl -X POST \
 - H "Authentication-Token: {API_TOKEN}" \
 - H "Content-Type: application/json" \
 -d '{
 "campaign_name" : "Test Campaign"
 "title" : "Limited Period Offer",
 "message" : "Go Shopping, Save Big",
 "icon_url" : "https://yourdomain.com/icon.png",
 "badge_icon_url" : "https://yourdomain.com/badge_icon.png",
 "banner_url" : "https://yourdomain.com/large-image.png",
 "landing_url" : "https://yourdomain.com/offers",
 "actions" : [
 {
 "text" : "Read More",
 "url" : "https://yourdomain.com/world-news",
 "icon" : "https://yourdomain.com/button_1_icon.png",
  "id":"Launch_Activity"
 },
 {
 "text" : "Local News",
 "url" : "https://yourdomain.com/local-news",
 "icon" : "https://yourdomain.com/button_1_icon.png",
 "id":"Launch_Activity"
 }],
 "utm_source" : "izooto",
 "utm_medium" : "push_notification",
 "utm_campaign" : "promotion",
 "ttl" : 86400,
 "target" : {
 "type" : "all"
 },
 "additional_params":{
    "News_Activity":"87162",
    "Home_Activity":"Home",
    "Video_Activity":"aksjdhakjdh",
    "ID":"1923879",
    "Live_TV":"1982312938"
},
"open_in_app" :true
}' "https://apis.izooto.com/v1/notifications"

Did this page help you?