Skip to main content

SocialProof Blog

Send notifications from your backend to Sidepop easily

Send notifications using API

Send notification events easily to Sidepop and generate notifications easily from your backend using our Rest API. In this article, we’re going to explore the best ways to do it in different languages, with a simple copy and paste integrations. Notifications are created sending a POST request to our endpoint. If you don’t have access to your platform backend, contact your developer.


To authenticate, just add an authkey parameter to your header request, and include your Integration Key. You can find this code in the Sidepop Dashboard. Do this request in the backend! Publishing this key can compromise your account, so it’s encouraged to not make this request on the frontend.

Send notifications in PHP

To send notifications to Sidepop in PHP, you can use this simple cURL example to get you started.

$params = array( 'ip_address' => $_SERVER['REMOTE_ADDR'], // User's IP address 'title' => "A person from {location}", // Include {location} 'subtitle' => "Made a purchase", 'tag' => "custom_tag" // A tag to group aggregated events ); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL,""); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($params)); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $headers = [ "authkey: [your-auth-key]" ]; curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_exec ($ch); curl_close ($ch);

Send notifications using WordPress HTTP API

If you use WordPress and need to send a notification not included in our WordPress Plugin (Customer registrations or WooCommerce Sales), you can easily implement an Async HTTP request inside any WordPress plugin using the following code.

$params = array( 'ip_address' => $_SERVER['REMOTE_ADDR'], // User's IP address 'title' => "A person from {location}", // Include {location} 'subtitle' => "Made a purchase", 'tag' => "custom_tag" // A tag to group aggregated events ); $args = array( 'body' => $params, 'timeout' => '5', 'redirection' => '5', 'httpversion' => '1.0', 'blocking' => false, 'headers' => array( "authkey" => "[your-auth-key]" ), 'cookies' => array() ); $response = wp_remote_post( '', $args );

Send notifications in Node.JS

To send notifications to Sidepop in Node.JS you can use the following example. This request is made using the Request library.

const request = require('request'); request({ url: '', headers: { 'authkey': '[your-auth-key]' }, form: { 'ip_address': request.connection.remoteAddress // User's IP address 'title': 'A person from {location}', // Include {location} 'subtitle': 'Made a purchase', 'tag': 'custom_tag' // A tag to group aggregated events } } });

Parameters of the request

This is a list of parameters that you have to include in your request:

  • ip_address: The IP address of your customer. If not set, will use the IP address of the connecting client (your server) for geolocation
  • title: The title of your notification. Either the title or the subtitle has to include the string {location} that will be replaced with the location of the customer.
  • subtitle: The second line of your notification
  • tag: A tag to group notifications together. It can be used later to create aggregated notifications in the dashboard. For example, if you add a custom tag like “signups”, you can later create an aggregated notification that counts all “signups” in the last week.

Get SocialProof for your website

The first fully-customizable social proof notification system. It doesn't matter if you have sales or not.

Create my popup