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}",
"utm_term": "{UTM_TERM}",
"utm_content": "{UTM_CONTENT}",
"req_interaction" : {true/false},
"override_tag" : "{CAMPAIGN_TAG_NAME}",
"ttl" : {TTL_SECONDS},
"target" : {
"type" : "all"
}
}' "https://apis.izooto.com/v1/notifications"
curl --request POST \
--url https://apis.izooto.com/v1/notifications \
--header 'Authentication-Token:YOUR_REST_API_KEY' \
--header 'content-type: application/json' \
--data '{
"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}",
"id":"{BUTTON_1_ACTION_ID}"
},
{
"text" : "{BUTTON_2_TEXT}",
"url" : "{BUTTON_2_URL}",
"id":"{BUTTON_2_ACTION_ID}"
}
],
"utm_source" : "{UTM_SOURCE}",
"utm_medium" : "{UTM_MEDIUM}",
"utm_campaign" : "{UTM_CAMPAIGN}",
"utm_term": "{UTM_TERM}",
"utm_content": "{UTM_CONTENT}",
"ttl" : {TTL_SECONDS},
"override_tag" : "{OVERRIDE_TAG}",
"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}
}
curl --request POST \
--url https://apis.izooto.com/v1/notifications \
--header 'Authentication-Token:YOUR_REST_API_KEY' \
--header 'content-type: application/json' \
--data '{
"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}",
"id":"{BUTTON_1_ACTION_ID}"
},
{
"text" : "{BUTTON_2_TEXT}",
"url" : "{BUTTON_2_URL}",
"id":"{BUTTON_2_ACTION_ID}"
}
],
"utm_source" : "{UTM_SOURCE}",
"utm_medium" : "{UTM_MEDIUM}",
"utm_campaign" : "{UTM_CAMPAIGN}",
"utm_term": "{UTM_TERM}",
"utm_content": "{UTM_CONTENT}",
"ttl" : {TTL_SECONDS},
"override_tag" : "{OVERRIDE_TAG}",
"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}
}
Fixed Values for UTM Parameters!
The values for
utm_source
andutm_medium
is set toizooto
andpush_notifications
respectively, by default, for both web and app push. This cannot be changed. If you use a different value in your payload, it will be ignored and the default values will be used.
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, iOS |
Titile | Notification Title | String | Yes | Web Push: Chrome, Firefox, Safari, Opera and Edge App Push: Android, iOS |
Message | Message on Notification | String | Yes | Web Push: Chrome, Firefox, Safari, Opera and Edge App Push: Android, iOS |
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 Only applicable for Web and Android Push | 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, iOS |
badge_icon_url Only applicable for Web and Android Push | 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, iOS |
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, iOS |
landing_url | Landing Page URL | String | Yes | Web Push: Chrome, Firefox, Safari, Opera and Edge App Push: Android, iOS |
actions > text | Button Text | String | No | Web Push: Chrome 56+, Opera 57+, Edge 17+ App Push: Android, iOS |
actions > url | Button Landing URL | String | No | Web Push: Chrome 56+, Opera 57+, Edge 17+ App Push: Android, iOS |
actions > icon Only applicable for Web and Android Push | 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, iOS |
actions > id | Button Action ID | String | No | App Push: Android, iOS |
utm_source (value set to izooto; cannot be changed) | UTM Source | String | No | Web Push: Chrome, Firefox, Safari, Opera, Edge App Push: Android, iOS |
utm_medium (value set to push_notifications; cannot be changed) | UTM Medium | String | No | Web Push: Chrome, Firefox, Safari, Opera, Edge App Push: Android, iOS |
utm_campaign | UTM Campaign | String | No | Web Push: Chrome, Firefox, Safari, Opera, Edge App Push: Android, iOS |
utm_term | UTM Term | String | No | Web Push: Chrome, Firefox, Safari, Opera, Edge App Push: Android, iOS |
utm_content | UTM Content | String | No | Web Push: Chrome, Firefox, Safari, Opera, Edge App Push: Android, iOS |
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, iOS |
target > type | Notification Audience. Use "Topic" for Android. | String | Yes | Web Push: Chrome, Firefox, Opera, App Push: Android, iOS |
additional_params | Custom Key-Value pairs used to open native screens inside app | String | No | App Push: Android, iOS |
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_notifications",
"utm_campaign" : "promotion",
"utm_term": "term",
"utm_contemt": "content",
"req_interaction" : true,
"override_tag" : "My Tag",
"ttl" : 86400,
"target" : {
"type" : "all"
}
}' "https://apis.izooto.com/v1/notifications"
curl --request POST \
--url https://apis.izooto.com/v1/notifications \
--header 'Authentication-Token:YOUR_REST_API_KEY' \
--header 'content-type: application/json' \
--data '{
"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",
"id":"Launch_Activity"
},
{
"text" : "Local News",
"url" : "https://yourdomain.com/local-news",
"id":"Launch_Activity"
}
],
"utm_source" : "izooto",
"utm_medium" : "push_notifications",
"utm_campaign" : "promotion",
"utm_term": "term",
"utm_contemt": "content",
"ttl" : 86400,
"override_tag" : "Test_Tag",
"target" : {
"type" : "all"
},
"additional_params":{
"News_Activity":"87162",
"Home_Activity":"Home",
"Video_Activity":"aksjdhakjdh",
"ID":"1923879",
"Live_TV":"1982312938"
},
"open_in_app" :true
}'
curl --request POST \
--url https://apis.izooto.com/v1/notifications \
--header 'Authentication-Token:YOUR_REST_API_KEY' \
--header 'content-type: application/json' \
--data '{
"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",
"id":"Launch_Activity"
},
{
"text" : "Local News",
"url" : "https://yourdomain.com/local-news",
"id":"Launch_Activity"
}
],
"utm_source" : "izooto",
"utm_medium" : "push_notifications",
"utm_campaign" : "promotion",
"utm_term": "term",
"utm_contemt": "content",
"ttl" : 86400,
"override_tag" : "Test_Tag",
"target" : {
"type" : "all"
},
"additional_params":{
"News_Activity":"87162",
"Home_Activity":"Home",
"Video_Activity":"aksjdhakjdh",
"ID":"1923879",
"Live_TV":"1982312938"
},
"open_in_app" :true
}'
Updated 6 months ago
What’s Next