Send bulk app pushes
- 28 Feb 2024
- 3 Minutes to read
Send bulk app pushes
- Updated on 28 Feb 2024
- 3 Minutes to read
Article Summary
Share feedback
Thanks for sharing your feedback!
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
Headers
Header | Sample Value | Description |
---|---|---|
Content-Type | application/json | This header specifies the media type of the resource. |
Body Parameters
Parameter | Description | Data Type | Required |
---|---|---|---|
api_key | Your API Key. Refer to API Authentication Tokens to get your API key. | String | Yes |
campaign_name | Name of the push campaign. | String | Yes |
segment_name | Name of the segment the push notification is sent to. It should match with the segments on the Mobile Panel. | String | Yes |
title | Title of the push notification. For instance, it can be your App name. | String | Yes |
content | Content of the push notification. | String | Yes |
deeplink | Key/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. | Object | No |
notification_image | URL of the image in the rich push notification. If advanced_push_items is in use, notification_image will not be displayed. | String | No |
android_sound | Name of the custom sound file in your app to play a custom sound on Android devices. | String | No |
ios_sound | Name of the custom sound file in your app to play a custom sound on iOS devices. | String | No |
test_push | true will send the push notification only to the test devices. | Boolean | No |
advanced_push_items | Array of Advanced Push Items object. | Array | No |
preferred_type | It is required only to send Advanced Pushes. E.g. carousel, slider. | String | No |
override_global_freq_cap | true will override global frequency capping limit. | Boolean | No |
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
Message | Definition |
---|---|
Error Creating Campaign | Some parameters are missing in the campaign. Check all the required parameters. |
No API Key Provided | The API key is a required parameter. |
No Title Provided | Push notification title is a required parameter. It should be sent in the payload. |
No Content Provided | Push content is a required parameter. It should be sent in the payload. |
No Partner Found With API Key | The API Key sent in the payload does not match the API key at Insider. Please contact Insider for more information. |
Bad IP | The IP the push payload is sent from is not whitelisted. |
No Segment Matched | The 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 Slider | If preferred_type key is in use in the request body, it can either be carousel or slider |
Invalid Advanced Push Payload | All 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?