Create new push notifications for your content using the MAZ Push Notifications API and they will appear within the MAZ Dashboard. Use the following parameters in order to send a POST request to the MAZ Push Notification API.
API Endpoint
https://dashboard.mazsystems.com/services/schedule_push_notification
API Request Headers
Content-type: Application/JSON
Accept: Application/JSON
Status Codes
200: Successful request
403: Incorrect Data
500: Internal Server Error
Parameter Description
Parameter | Description |
tracking_name |
The name of your push notification. This is used internally, and will not be displayed to end users. A required parameter. |
notification_text |
The message you would like to send to your users. Ideally, this should not be blank. |
notification_url |
Send your consumer to a desired URL when the notification is clicked. This may also be a valid deeplink URL to content within your app. |
segment |
Choose which cohort of users should receive this notification. The cohorts are divided by types of possible subscribers, so this is ideal if your app offers subscriptions. Otherwise, default parameter
|
ios |
A value of |
android |
A value of |
scheOpt | Schedule your notification to be sent immediately(now) or in the future. The two possible options are: : Send your notification immediately (this is the default parameter). : If a notification is scheduled for a future delivery, "time" parameter will need to be included within the API request. date , time , and time_zone will need to be included exactly in the format shown below. An example would look like:
|
slug | Your app's unique name in our database. |
api_token | Token used for accessing the API |
app_token |
Unique token for your app. |
geo_fencing_all_countries |
|
lcountries |
A list of all country codes, where the notification will be sent. |
Sample API Request
With Schedule option: Now | Geo-Fencing Off
{
"push": {
"tracking_name": "My API Notification",
"notification_text": "You really have to check this out!",
"notification_url": "www.example.com",
"segment": "all",
"ios": "true",
"android": "true"
},
"scheOpt": "now",
"slug": "<your_app_slug>",
"api_token": "<api_token>",
"app_token": "<your_app_token>"
}
With Schedule option: Future | Geo-Fencing Off
{
"push": {
"tracking_name": "My API Notification",
"notification_text": "You really have to check this out!",
"notification_url": "www.example.com",
"segment": "all",
"ios": "true",
"android": "true"
},
"scheOpt": "future",
"time": {"date": "April 22, 2020", "time": "7:00PM", "time_zone": "+0530"},
"slug": "<your_app_slug>",
"api_token": "<api_token>",
"app_token": "<your_app_token>"
}
With Schedule option: | Geo-Fencing On
{
"push":{
"tracking_name":"My API Notification
",
"notification_text":"You really have to check this out!
",
"notification_url":"www.example.com
",
"geo_fencing_all_countries":"true",
"lcountries":[
"DZ",
"AO",
"BJ",
"BW",
],
"segment":"all",
"ios":"true",
"android":"true"
},
"scheOpt":"future",
"time":{
"date":"April 2, 2020",
"time":"7:00PM",
"time_zone":"+0530"
},
"slug":"<slug>
",
"api_token":"<api_token>
",
"app_token":"<app_token>
"
}
Please reach out to success@mazsystems.com to get the API Token, App Token and Slug for your App or if you need more information on this API.