Welcome to our Help Center 👋

How to send notifications using Engagespot REST API

Learn how to integrate Engagespot REST API to send notifications from your app backend
AS
Written by Anand S
Updated 1 month ago

You can use Engagespot REST API to send push notifications (both in-site and off-site) to your users. This API can be integrated with your app backend irrespective of the programming language. If you prefer an SDK for your programming language, see the SDK sections instead.

API Endpoint - https://api.engagespot.co/2/campaigns

Request Method - POST

Content-Type - application/json

Authorization - For authorization, you need to pass your app's API-Key via API-Key header.

You can find your app's API-Key from your Engagespot dashboard. Goto App Settings

Please don't confuse API Key with Site Key. Both are different. You should keep your API Key secret.

Request Body

Request body should be in json format. A sample request body is given below.

{
    "campaign_name": "User Message Alert",
    "notification": {
        "title": "You have a new message from John!",
        "message": "Hey Dave, Wassup...",
        "icon": "https://cdn.yourwebsite.com/images/profiles/john.jpg",
        "url": "https://app.yourwebsite.com/messages"
    },
    "send_to": "identifiers",
    "identifiers": [
        "83647520"
    ]
}

Parameters

Parameter Description Mandatory
campaign_name Just a name to identify this notification internally. Yes
notification Notification JSON Body Yes
    title Title of the notification Yes
    message Body of the notificaton Yes
    icon URL to notification icon Yes
    url URL to be opened when the user clicks the notification Give it as # if you don't need a link
send_to

Whom to send this notification?

everyone - To all users
identifiers - To particular users

Yes
identifiers

JSON array of all identifiers to which the notification should be sent.

Only if the value of sent_to is identifiers

Success Response

Did this answer your question?