Connect to the MAZ Dashboard to send push notifications from your CMS

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, client to retry the request with correct parameters

  • 500: Internal Server Error. Client to retry the request until success

Definition of Parameters

  • "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 the desired URL when the notification is clicked. This may also be a valid deep link 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, the default parameter "all" should be used. The 4 possible values:

  1. "all": All of your users (this is the default value).
  2. "sub": Only subscribed users. 
  3. "expired": Users with expired subscriptions.
  4. "no_sub" : Users without a subscription.

  • "ios": A value of "true"  will send this notification to iOS devices. A value of "false"  will exclude iOS devices.

  • "android": A value of "true"  will send this notification to Android devices. A value of "false"  will exclude Android devices.

  • "scheOpt": Schedule your notification to be sent immediately(now) or in the future. The two possible options are:

    "now": Send your notification immediately (this is the default parameter).
    "future": If a notification is scheduled for a future delivery, the "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 this:    
"scheOpt": "future",
"time": {"date": "April 2, 2020", "time": "7:00PM", "time_zone": "+0530"},

 

  • The last three parameters "slug" , "api_token" , and "app_token" are unique to your app. Please reach out to success@mazsystems.com requesting these parameters and we will provide them to you. These are required values.

Sample API Requests

With Schedule option: now

{
   "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

{
   "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>"
}


In case of any queries or concerns, please feel free to reach out to success@mazsystems.com 

Was this article helpful?

0 out of 0 found this helpful