Trigger Push Notifications API

Send personalized app notifications instantly with the Trigger API.

This API allows you to trigger notifications for your app users faster, non-UI-dependently. It also allows you to engage users by delivering personalized messages straight to their devices based on specific events or actions.

API Capabilities Overview

  • Use this API to send 1:1 push notifications to your app users
  • The most suitable use cases are transactional communication, such as order updates and transaction-related updates.
  • Define push notification parameters directly in the requests, such as the primary key (user identifier), push token, app ID, notification title, subtitle, and message.
  • Get real-time reports of delivered, clicked, and failed events on your webhook endpoint.
  • This API currently supports only simple text push notifications.

📘

Note

The following features are not supported: Rich media notifications, Push amplification, App inbox, Attribute or event payload-based personalization & bulk messaging capability.

If you have any further questions, contact [email protected]. Refer to this document to retrieve your API key.

HTTP Method

This API uses the POST method to trigger notifications for your app users.

API Endpoint

The Trigger Push Notifications API is available across multiple regions; below are the base URLs for different regions:

Request Headers

Authentication details are required to access the API. Ensure you include the necessary tokens or credentials in your request headers.

Header NameTypeDescriptionExampleRequired?
api-keyStringAPI key for authentication41a1de35948f915f64907ced9eed4f00Yes
Content-TypeStringJSON format for your request payload.application/jsonYes

Request Body

All necessary parameters should be passed in the request body in JSON format.

Body ParameterData TypeDescriptionRequired?
api-keystringAdd the API key provided to you by Netcore in the request header.Yes
dataobjectAdd all API details within the data object.Yes
triggersarray of objectsConfigure push notifications within the triggers array. Only one trigger is allowed in this API version.Yes
tagsarray of stringsAdd tags to categorize messages. Tags will appear in CSV and webhook reports. Each tag can be up to 75 characters, with a maximum of 15 tags.No
channelstringSpecify the communication channel. For example, apn.Yes
channel_configobjectInclude channel-specific configurations like app_ids and ttl in this object.Yes
app_idsarray of stringsProvide the app IDs for targeted apps. You can get app ids from your Netcore panel. If left blank, notifications will be sent to all apps for the user.No
ttlintegerSet the time-to-live for the notification in seconds. The default is 2419200 (28 days).
Acceptable range: 0 to 2419200.
No
contentobjectInclude notification details like template_type, landing_page_type, title, and description.Yes
template_typestringUse Simple for basic text push notifications. Yes
landing_page_typestringUse either home, deep link, or URL.Yes
landing_page_urlstringProvide redirection deep link or URL here.No
titlestringProvide the title of the notification. This field is required if the description is not included.Yes
descriptionstringProvide the body of the notification. This field is required if the title is not included.Yes
osarray of objectsSpecify the target OS platforms for the push notification.Yes
os_namestringName of the OS to be targeted. For example, android or ios.Yes
audience_detailsobjectProvide user targeting details such as contact_type, contact_attribute, and attribute_value.Yes
contact_typestringUse identified for known users.Yes
contact_attributestringSpecify the user identifier type. For identified users, use identity.Yes
attribute_valuearray of stringsProvide the value for the specified contact_attribute. For example, a unique user ID.Yes
notify_callbackobjectInclude webhook configurations and reporting parameters. Ensure that the url field contains a valid URL format, including the scheme, for example, http:// or https://.No
callbackarray of objectsSpecify callback webhook details, including webhook_id and body_params.No
webhook_idstringGet the webhook ID from the Netcore panel for your integration. Only must require webhook_id and body_params.Yes
body_paramsobjectPass custom key-value pairs. These values will appear in webhook reports and can include unique identifiers. Both keys and values must be strings.No

Example Request Body

{
    "data": {
        "triggers": [
            {
                "tags": [
                    "Test"
                ],
                "channel": "apn",
                "channel_config": {
                    "app_ids": [
                        "124281ef157aa412d44e13b84cd409ad"
                    ],
                    "ttl": 86400
                },
                "content": {
                    "template_type": "Simple",
                    "landing_page_type": "home",
                    "landing_page_url": "https://www.google.com",
                    "title": "Demo Title",
                    "description": "Demo Message body description",
                    "os": [
                        {
                            "os_name": "android",
                            "subtitle": "Sample subtitle text"
                        },
                        {
                            "os_name": "ios",
                            "subtitle": "Sample subtitle text"
                        }
                    ]
                },
                "audience_details": {
                    "contact_type": "identified",
                    "contact_attribute": "identity",
                    "attribute_value": [
                        "[email protected]"
                    ]
                }
            }
        ]
    },
    "notify_callback": {
        "callback": [
            {
                "webhook_id": 26,
                "body_params": {
                    "CustomKey1": "Custom value1"
                }
            }
        ]
    }
}

Example API Response

{
    "request_id": "a7add3e4-2206-49f6-927e-3dfd917b906a",
    "code": 200,
    "status": "success",
    "description": "Your request was accepted successfully. It may take a few minutes to process your request."
}
{
    "request_id" : "506611fa-1519-4624-94d2-5b59623de608",
    "code" : 400,
    "status" : "failed",
    "description" : "Validation Failure.",
    "errors" : [
        {
            "field" : "data.triggers[0].ttl",
            "message" : "Value must be integer."
        }
    ]
}

Error Codes

Error CodeDescriptionSuggested Actions
200Successful response. The app push notification has been sent.
400Invalid request parameters.
  • Ensure the following contains one of the allowed values: email, sms, apn, or bpn.
  • data.triggers[0].content.templatetype should not contain more than 10 characters.
  • Use a valid landingpagetype: home, deeplink, or url.
  • Provide a valid contactattribute: identity or token.
  • Ensure the TTL field contains an integer value.
  • Use a valid string value for the tags field.
  • Include the channel field in the request payload.
  • Limit the channel value to 20 characters or fewer.
500An error occurred on the server side.
600Campaign creation failed. Missing or invalid request.

Webhook Response

When your push notification API request is successful, the system will send updates to your specified URL (callback) to inform you about the status of the notifications. There are three types of updates: Delivered, Clicked & Failed.

Delivered

This means the notification was delivered to the device.

{
    "your_panel_name": [
        {
            "webhook_name": "Trigger PN",
            "msgid": "0",
            "channel": "trigger apn",
            "event_params": {
                "foreignkey": "[email protected]"
            },
            "custom_params": {
                "nc_request_id": "01944b1b-126f-7114-91e4-793a951775d7",
                "nc_delivery_time": "2025-01-09 18:17:32.997",
                "trid": "85711-0-367-0-250109181733-CPT",
                "status": "delivered",
                "reason": "delivered",
                "nc_sent_time": "2025-01-09 18:17:33.027",
                "tags": [
                    "Test"
                ],
                "Message Name": "Trigger API Message 123 ",
                "nc_request_time": "2025-01-09 18:17:32.980",
                "nc_app_id": "d613445e731349ede71fdca5de54d641a",
                "token": "ctu4454546543234z:APA91bE9RERdR-kN6ywu3YWrUBkweYQ0LoDCQk45vSWTqvk-Z9MUx-0qSrIB1ADiemslVgB9KC63-i6g-JlPGeIw5RIOC_Mu2Ay0dVC0hX0C_la9lYP3LtE"
            },
            "journey_name": null
        }
    ]
}

Clicked

This means the user has clicked on the received notification.

{
    "your_panel_name": [
        {
            "webhook_name": "Trigger PN",
            "msgid": "0",
            "channel": "trigger apn",
            "event_params": {
                "foreignkey": "[email protected]"
            },
            "custom_params": {
                "nc_request_id": "01944b1c-29a1-789e-a6d0-f5c817010ec8",
                "nc_delivery_time": "2025-01-09 18:18:51.881",
                "trid": "85711-0-367-0-250109181844-CPT",
                "status": "click",
                "reason": "click",
                "nc_sent_time": "2025-01-09 18:18:44.542",
                "tags": [
                    "Test"
                ],
                "Message Name": "Trigger API Message 123",
                "nc_request_time": "2025-01-09 18:18:44.454",
                "nc_app_id": "d613445e731349ede71fdca5de54d641a",
                "token": "ctu4454546543234z:APA91bE9RERdR-kN6ywu3YWrUBkweYQ0LoDCQk45vSWTqvk-Z9MUx-0qSrIB1ADiemslVgB9KC63-i6g-JlPGeIw5RIOC_Mu2Ay0dVC0hX0C_la9lYP3LtE"
            },
            "journey_name": null
        }
    ]
}

Failed

This means when a notification fails to deliver for reasons such as token not found, invalid tokens, uninstalled app, or duplicate notifications.

{
    "your_panel_name": [
        {
            "webhook_name": "Trigger PN",
            "msgid": "0",
            "channel": "trigger apn",
            "event_params": {
                "foreignkey": "[email protected]"
            },
            "custom_params": {
                "nc_request_id": "01944b13-c8d5-74c6-8968-d0a9144f17fd",
                "trid": "85711-0-370-0-250110002017-CPT",
                "status": "failed",
                "reason": "404 :: NOT_FOUND :: Requested entity was not found.",
                "nc_sent_time": "2025-01-09 18:09:35.507",
                "tags": [
                    "Test"
                ],
                "Message Name": "Trigger API Message 123",
                "nc_request_time": "2025-01-09 18:09:35.416",
                "nc_app_id": "d613445e731349ede71fdca5de54d641a",
                "token": "ctu4454546543234z:APA91bE9RERdR-kN6ywu3YWrUBkweYQ0LoDCQk45vSWTqvk-Z9MUx-0qSrIB1ADiemslVgB9KC63-i6g-JlPGeIw5RIOC_Mu2Ay0dVC0hX0C_la9lYP3LtE"
            },
            "journey_name": null
        }
    ]
}

Webhook Body Parameters

Body ParameterData TypeDescriptionExample
webhook_nameStringStatic webhook name generated by Netcore."3920529"
event_paramsJSON ObjectDelivery event-related metadata.{"foreignkey": "3920529"}
foreignkeyStringPrimary key for identifying users."3920592925_FEDID"
custom_paramsJSON ObjectTrigger-specific custom parameters.{"key": "value"}
nc_request_idStringRequest acknowledgment ID (fixed length)."a7add3e4-2206-49f6-927e-3dfd917b906a"
nc_request_timeStringDate and time when the API request was received (IST)."2025-01-02 15:23:45.678"
nc_sent_timeStringSubmission timestamp to Apple/Android gateway."2020-04-06 12:43:45.807"
nc_delivery_timeStringDelivery timestamp received from the gateway."2025-01-02 15:23:45.988"
tridStringTransaction ID generated at Netcore."785340-0-248966-0-210406220855-CPT"
statusStringDelivery status of the notification."delivered", "failed"
reasonStringRemarks or reasons for the delivery status."Duplicate request received"
tokenStringAPN device identifier."ezZzhHM3SbCJpz0WAZ83-T:APA91bEdkl1KXEMT-1ZzY"
msg_idStringMessage ID sent as a custom parameter."21483361"
mobile_noStringMobile number as a custom parameter."919623899862"
num_retriesStringNumber of retries as a custom parameter."1"
vendor_nameStringVendor name in the request."NETCORE"
vendor_cdStringVendor code as a custom parameter."NETCORE_PN"
channel_nameStringChannel name in the API request."NETCORE_TRPN"
deptidStringDepartment ID as a custom parameter."BT4"
appidStringApp ID for the notification."TCHALRT"
deliverychannelStringDelivery channel in the request."PN"