Peek Inside

Invite your customers to give feedback on your services to identify promoters and detractors of your product.

View all of your NPS Feedback Survey Forms

You can view all your NPS Feedback Survey Forms on the one screen along with the customer's Email Address, Name, Feedback and the Score they gave your business (out of 10).

Send a new NPS Feedback Survey Form

Click on 'Add feedback invite' to get started. Input the customer's Email Address and Full Name. We'll send them a Fedback Survey Form to fill in.

View a NPS Feedback Survey Form

Once the customer completes their Survey Form, you can view their feedback along with their score by clicking on the 'View' in the actions column.

Emailed NPS Feedback Survey Form

The customer will recieve the NPS Feedback Survey Form via email and they can respond directly. They will be asked to answer how likely they are to recommend your business.

Invitation to give their feedback

The customer will be invited to give you some feedback in a free-text field on their experience. This will let you know why they gave you that rating out of 10.

Basic Usage

Send your first NPS Feedback Survey form

You can manually send NPS Feedback Survey forms without using the API.

  1. Click the 'Add feedback invite' button.
  2. Input your_email_address@exanple.com for the Email and click 'save'.
  3. We'll send an NPS Feedback Survey form to your inbox.

API Guide

All relative URLs in this document have the following base https://snja.io/1.0

Send Survey

POST /feedbacks

Make a HTTP POST request to the /feedbacks endpoint with the customers email address to send them a NPS Feedback Survey Form.

This endpoint requires your API_KEY_ID and API_SECRET to access.

Request

Parameter Required Description Example
email YES STRING The customer's Email Address hello@example.com
full_name NO STRING The customer's Full Name John Smith

Example of a request.

curl https://snja.io/1.0/feedbacks/ \
    --header "X-Api-Id: <API_KEY_ID>" \
    --header "X-Api-Secret: <API_SECRET>" \
    --data "email=<EMAIL>"
$url = "https://snja.io/1.0/feedbacks/";
$headers = ["X-Api-Id: <API_KEY_ID>", "X-Api-Secret: <API_SECRET>"];
$data = ["email" => "<EMAIL>", "full_name" => "<FULL_NAME>"];

$ch = curl_init($url);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data));
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_exec($ch);

curl_close($ch);

Response

Example of a successful response.

{
    "response": {
        "error": 0,
        "message": "Feedback invite sent successfully",
        "feedback": {
            "id": 1,
            "email": "penny.jones@example.com",
            "full_name": "Penny Jones",
            "created": "2018-01-06T00:19:34+00:00",
            "modified": "2018-01-06T00:19:34+00:00"
        }
    }
}

List Surveys

GET /feedbacks

Make a HTTP GET request to the /feedbacks endpoint to list NPS Feedback Survey Forms.

This endpoint requires your API_KEY_ID and API_SECRET to access.

Request

Parameter Required Description Example
page NO INTEGER The page number when using pagination 1
limit NO INTEGER The limit of returned resources when using pagination 50

Example of a request.

curl "https://snja.io/1.0/feedbacks?_id=<API_KEY_ID>&_secret=<API_SECRET>"
var https = require('https');
console.log(https.get("https://snja.io/1.0/feedbacks?_id=<API_KEY_ID>&_secret=<API_SECRET>"));
echo file_get_contents("https://snja.io/1.0/feedbacks?_id=<API_KEY_ID>&_secret=<API_SECRET>");
import requests
print(requests.get("https://snja.io/1.0/feedbacks?_id=<API_KEY_ID>&_secret=<API_SECRET>"))

Response

Example of a successful response.

{
    "feedbacks": [
        {
            "id": 1,
            "email": "penny.jones@example.com",
            "full_name": "Penny Jones",
            "score": 10,
            "content": "Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
            "completed": "2018-01-06T00:23:30+00:00",
            "created": "2018-01-06T00:22:30+00:00",
            "modified": "2018-01-06T00:22:30+00:00"
        },
        {
            "id": 2,
            "email": "john.smith@example.com",
            "full_name": "John Smith",
            "score": null,
            "content": null,
            "completed": null,
            "created": "2018-01-06T00:19:34+00:00",
            "modified": "2018-01-06T00:19:34+00:00"
        }
    ]
}

Get Survey

GET /feedbacks/<ID>

Make a HTTP GET request to the /feedbacks/<ID> endpoint with the ID of the NPS Feedback Survey Form.

This endpoint requires your API_KEY_ID and API_SECRET to access.

Request

Parameter Required Description Example
id YES INTEGER The NPS Feedback Survey Form ID 1001

Example of a request.

curl "https://snja.io/1.0/feedbacks/<ID>?_id=<API_KEY_ID>&_secret=<API_SECRET>"
var https = require('https');
console.log(https.get("https://snja.io/1.0/feedbacks/<ID>?_id=<API_KEY_ID>&_secret=<API_SECRET>"));
echo file_get_contents("https://snja.io/1.0/feedbacks/<ID>?_id=<API_KEY_ID>&_secret=<API_SECRET>");
import requests
print(requests.get("https://snja.io/1.0/feedbacks/<ID>?_id=<API_KEY_ID>&_secret=<API_SECRET>"))

Response

Example of a successful response.

{
    "feedback": {
        "id": 1,
        "email": "penny.jones@example.com",
        "full_name": "Penny Jones",
        "score": 9,
        "content": "Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
        "completed": "2018-01-06T00:23:30+00:00",
        "created": "2018-01-06T00:22:30+00:00",
        "modified": "2018-01-06T00:23:30+00:00"
    }
}

Delete Survey

DELETE /feedbacks/<ID>

Make a HTTP DELETE request to the /feedbacks/<ID> endpoint with the ID of the NPS Feedback Survey Form.

This endpoint requires your API_KEY_ID and API_SECRET to access.

Request

Parameter Required Description Example
id YES INTEGER The NPS Feedback Survey Form ID 1001

Example of a request.

curl https://snja.io/1.0/feedbacks/<ID> \
    --header "X-Api-Id: <API_KEY_ID>" \
    --header "X-Api-Secret: <API_SECRET>" \
    -X "DELETE"
$url = "https://snja.io/1.0/feedbacks/<ID>";
$headers = ["X-Api-Id: <API_KEY_ID>", "X-Api-Secret: <API_SECRET>"];

$ch = curl_init($url);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_exec($ch);

curl_close($ch);

Response

Example of a successful response.

{
    "response": {
        "error": 0,
        "message": "Deleted successfully"
    }
}

Get NPS

GET /feedbacks/nps

Make a HTTP GET request to the /feedbacks/nps endpoint to recieve the NPS score for your business.

This endpoint requires your API_KEY_ID and API_SECRET to access.

Request

This endpoint doesn't accept any params.

Example of a request.

curl "https://snja.io/1.0/feedbacks/nps?_id=<API_KEY_ID>&_secret=<API_SECRET>"
var https = require('https');
console.log(https.get("https://snja.io/1.0/feedbacks/nps?_id=<API_KEY_ID>&_secret=<API_SECRET>"));
echo file_get_contents("https://snja.io/1.0/feedbacks/nps?_id=<API_KEY_ID>&_secret=<API_SECRET>");
import requests
print(requests.get("https://snja.io/1.0/feedbacks/nps?_id=<API_KEY_ID>&_secret=<API_SECRET>"))

Response

Example of a successful response.

{
    "feedbacks": {
        "nps_score": "75.00",
        "nps_score_30": "85.00",
        "nps_score_30_comparison": "85.00",
        "nps_score_30_change": "0.00",
        "nps_score_90": "50.00",
        "nps_score_90_comparison": "80.00",
        "nps_score_90_change": "-30.00"
    }
}

Showing all time, 30 day & 90 day Net Promoter Scores.


API Overview

Authentication

You'll need to authenticate using your API Key.

There are two ways to authenticate:

Request Headers:

$ curl -H "X-Api-Id: <API_KEY_ID>" -H "X-Api-Secret: <API_SECRET>" 'https://snja.io'

URL Parameters:

$ curl 'https://snja.io/foo?_id=<API_KEY_ID>&_secret=<API_SECRET>'

API Keys

API Keys can be created and managed in the API Keys section.

  1. Go to the API Keys section.
  2. Click on the button 'Generate API Key'.
  3. A new key will be genereated for use with the API.

Rate Limits

API Keys are rate limited to ensure fair delivery of services. You can view the current Rate Limit and Remaining Requests in the returned Response Headers from the API. Below is a description of the Response Headers.

Header Description
X-RateLimit-Limit The maximum number of requests per time window.
X-RateLimit-Remaining The number of requests remaining before reset.
X-RateLimit-Reset The time at which the current rate limit window resets in UTC Epoch seconds.

Error Codes

The following HTTP response codes are used.

Code Message Description
200 OK The request has succeeded.
400 Bad Request The request could not be understood by the server due to malformed syntax.
401 Unauthorised This indicates that you have not passed a valid API key, the key has expired, or the Authorization header is not formatted correctly.
404 Not Found The server has not found anything matching the Request-URI.
405 Method Not Allowed This indicates that the request method is known by the server but has been disabled and cannot be used.
429 Too Many Requests We have recieved too many requests from your API Key in a given amount of time. Wait a while and try again.

More Products

Device Shots

Easily mock-up your app screenshots onto different devices for marketing

Ring the Bell

Login on a TV or Pi and ring an audible bell every time the team makes a sale

NPS Feedback

Your Net Promoter Score measures brand loyalty and forecasts business growth

Uptime Pings

Get notified instantly when your website is down and not responding to requests

Cron Monitoring

Get notified when your cron jobs fail or benchmark their performance

Status Page

Keep your customers informed during scheduled or unplanned outages

GEOIP to Country

Lookup Country, Language & Currency Information from an IP address

DNS Watcher

Track DNS changes on your domains & get notified of expiring certificates

Competitor Monitor

Monitor your competitors' websites and get notified when they change

Builder API

Cross-platform Hybrid App build service for Cordova, React Native & Flutter

Ninjalytics

Generate swimlane charts of your customer's journey through your product

Request Bins

Capture & inspect HTTP requests. Replay the request to your local machine