Basic Segment Push API is a service that sends push notifications to a segment over the web using predefined web services and can be used to send push notifications to the created segment.
You can reach the analytics of your segment push notifications sent via Experience > Message > App Push on Inone. Your pushed will be named {campaignName}-API.
You can only use attributes in segmentation rules for this API.
The system authorizes only the 127.0.0.1 IP by default. This IP restricts the requests to the Insider APIs. To use the Mobile APIs, you must delete the default added IP or add your IPs to the IP Address Authorization list.
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 | Segment name to be written on the panel. | String | Yes |
segmentation | Segmentation rules to be created for targeting on App Push. | Object | Yes |
*main_group | Segment rule set object. | Object | Yes |
**condition | Condition to link keys under the object. Values: and/or | String | Yes |
**filter_groups | Object for rule set on segmentation. | Object | Yes |
***condition | Condition to link keys under the object. Values: and/or | String | Yes |
***attr_filters | Object for rule set on segmentation. | Object | Yes |
****condition | Condition to link keys under the object. Values: and/or | String | Yes |
****attrs | Object for rule set on segmentation. | Object | Yes |
*****key | Key is the attribute name to be set on the segment rule. | String | Yes |
*****values | Value for the related attribute to be matched. | Array | Yes |
*****operator | Operators to link logics between key-value. eq: equal ne: not equal cnt: contains dnc: does not contain | 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 Body
The sample body below is for creating a push notification campaign with a campaign name, and segmentation rules (e.g., targeting users on Android), including notification details such as title, content, image, custom sounds for Android/iOS, deep links, and options like test mode and frequency cap override. It also defines advanced push items with headlines, descriptions, images, and deep links, delivered in a carousel format.
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",
"segmentation": {
"segment_name": "Segment Name Here",
"main_group": {
"condition": "and",
"filter_groups": [
{
"condition": "and",
"attr_filters": [
{
"attrs": [
{
"key": "Platform",
"value": ["Android"],
"operator": "eq"
}
]
}
]
}
]
}
},
"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.",
"segment_id": 123
}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. |
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. |
validation_failed: empty segment_name | Segment Name cannot be empty, please check. |
validation_failed: no main_group in segmentation | Main Group is missing, please check. |
validation_failed: empty filter_groups in main_group | Filter Groups in Main Group cannot be empty, please check. |
validation_failed: empty attribute_filters | Attribute Filters cannot be empty, please check. |
validation_failed: empty attributes | Attributes cannot be empty, please check. |
validation_failed: invalid operator | Operator is invalid, please check. |
validation_failed: invalid condition | Condition is invalid, please check. |
validation_failed: invalid attribute key | Attribute Key is invalid, please check. |
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.
The rate limit is 1000 requests per minute.
Each payload can contain only one bulk push campaign.
The default limit shown here is a standard baseline. If your use case requires higher capacity, feel free to reach out to the Insider One team — we can adjust it to fit your needs.