This is a Node.js backend application that uses the Engagespot API to send notifications to users. The app exposes two endpoints: /adduser and /sentmail. The /adduser endpoint creates or updates a user in Engagespot, while the /sentmail endpoint sends a notification to a user's email address.
- Node.js 10 or higher
- Engagespot API key and API secret
Clone the repository:
git clone
To install necessary packages
In the project directory, you can run:
Runs the app in the development mode.
Open http://localhost5000 to view it in your browser.
The page will reload when you make changes.
You may also see any errors in the console.
To add a user, send a POST request to /adduser with the user's email and phone number in the request body:
{
"email": "john@example.com",
"phoneNumber": "123-456-7890"
}
To send a notification to a user's email address, send a POST request to /sentmail with the user's email address in the request body:
{
"email": "john@example.com"
}