Send bulk app pushes
  • 28 Feb 2024
  • 3 Minutes to read

    Send bulk app pushes


      Article Summary

      Overview

      Bulk Push API is a service that sends push notifications to a predefined segment over the web using predefined web services and can be used to send bulk push notifications to the selected segment. 

      You can reach the analytics of your bulk push notifications sent via Experience > Message > App Push on Inone. Your pushed will be named {campaignName}-API.

      Endpoint and Headers

      POST https://mobile.useinsider.com/api/v1/push/bulk

      Headers

      HeaderSample ValueDescription
      Content-Typeapplication/jsonThis header specifies the media type of the resource.

      Body Parameters

      ParameterDescriptionData TypeRequired
      api_keyYour API Key. Refer to API Authentication Tokens to get your API key.StringYes
      campaign_nameName of the push campaign.StringYes
      segment_nameName of the segment the push notification is sent to. It should match with the segments on the Mobile Panel.StringYes
      titleTitle of the push notification. For instance, it can be your App name.StringYes
      contentContent of the push notification.StringYes
      deeplinkKey/value pairs to be passed to the application in the push payload. The most common use of deep links is sending the user to the selected landing page when they open the push notification.ObjectNo
      notification_imageURL of the image in the rich push notification. If advanced_push_items is in use, notification_image will not be displayed.StringNo
      android_soundName of the custom sound file in your app to play a custom sound on Android devices.StringNo
      ios_soundName of the custom sound file in your app to play a custom sound on iOS devices.StringNo
      test_pushtrue will send the push notification only to the test devices.BooleanNo
      advanced_push_itemsArray of Advanced Push Items object.ArrayNo
      preferred_typeIt is required only to send Advanced Pushes. E.g. carousel, slider.StringNo
      override_global_freq_captrue will override global frequency capping limit.BooleanNo

      Sample Example

      Sample Body

      Before sending the request, make sure to replace the values in your request body.

      App push notifications are sent to a user's last active device.

      {
         "api_key":"Your API Key goes here",
         "campaign_name":"Insider API Demo",
         "segment_name":"All People",
         "title":"Your push notification title goes here",
         "content":"Your push content goes here.",
         "deeplink":{
            "your_deeplink_key":"value",
            "your_another_deeplink_key":"value"
         },
         "notification_image":"https://your_image_url.jpg",
         "android_sound":"Your custom sound name for Android goes here",
         "ios_sound":"Your custom sound name for iOS goes here",
         "test_push":true,
         "override_global_freq_cap":true,
         "advanced_push_items":[
            {
               "headline":"Title for the item 1",
               "description":"Description for the item 1",
               "image_url":"https://your_image_url.jpg",
               "deep_links":{
                  "your_deeplink_key":"value"
               }
            },
            {
               "headline":"Title for the item 2",
               "description":"Description for the item 2",
               "image_url":"https://your_image_url.jpg",
               "deep_links":{
                  "your_deeplink_key":"value"
               }
            },
            {
               "headline":"Title for the item 3",
               "description":"Description for the item 3",
               "image_url":"https://your_image_url.jpg",
               "deep_links":{
                  "your_deeplink_key":"value"
               }
            }
         ],
         "preferred_type":"carousel"
      }

      Sample Responses

      • 200 Campaign created successfully

      {
          "response": "Campaign Created."
      }
      • 400 Invalid API Key

      {
          "response": "No Partner Found With Api Key."
      }
      • 422 No Push Message Certificate

      {
          "response": "No Push Message Certificate is Provided."
      }

      Fail Records Messages

      MessageDefinition
      Error Creating Campaign

      Some parameters are missing in the campaign. Check all the required parameters.

      No API Key ProvidedThe API key is a required parameter.
      No Title ProvidedPush notification title is a required parameter. It should be sent in the payload.
      No Content ProvidedPush content is a required parameter. It should be sent in the payload.
      No Partner Found With API KeyThe API Key sent in the payload does not match the API key at Insider. Please contact Insider for more information.
      Bad IPThe IP the push payload is sent from is not whitelisted.
      No Segment MatchedThe segment name in the payload does not match any segments on Insider Dashboard.
      AdvancedPushItems should contain at least 3, max. 6 items.If advanced_push_items key is in use in the request body, it should contain at least 3 and max 6 items.
      Preferred Type is Not Carousel or SliderIf preferred_type key is in use in the request body, it can either be carousel or slider
      Invalid Advanced Push PayloadAll the items for the Advanced Push Notification, should have Headline, Description, ImageURL variables defined and image URLs should be using HTTPS protocol.

      Limitations

      • All functions must be executed with a simple HTTPS POST request.
      • The API key should be provided in the request body. If the key is incorrect, no operation will be executed.
      • Each payload can contain only one bulk push campaign.

      Was this article helpful?

      ESC

      Eddy, a super-smart generative AI, opening up ways to have tailored queries and responses