NAV
Uxsniff uxsniff
shell

Introduction

Welcome to the UXsniff API! You can use our API to access UXsniff API endpoints, which can get information on various products such as recordings, heatmap, feedback, and survey.

Authentication

To authorize, use this code:

# With shell, you can just pass the correct header with each request
curl "https://api.uxsniff.com/v1/path"
  -H "Authorization: APIKEY"

Make sure to replace APIKEY with your API key.

UXsniff uses API keys to allow access to the API. You can get a new UXsniff API key at our UXsniff account.

UXsniff expects for the API key to be included in all API requests to the server in a header that looks like the following:

Authorization: APIKEY

Feedback

Get Feedback

curl "https://api.uxsniff.com/v1/feedback?startdate=2020-01-01&enddate=2020-12-31&limit=10"
  -H "Authorization: APIKEY"

The above command returns JSON structured like this:

[
  {
    "feedback_id":1,
    "question":"How would you rate your experience?",
    "comment":"Good comment",
    "rating":5,
    "created":"2022-10-21 12:56:33",
    "url":"https://uxsniff.com/",
    "screenshot":"",
    "visitor":{
      "visitor_id":"1666355009686.mhprr8t",
      "session_id":"1666355009686.6nzbnflq",
      "email":"[email protected]",
      "device":"Desktop",
      "country":"Singapore",
      "browser":"Safari",
      "browserSize":"2560x1335",
      "os":"MacOS"
    }
  }
]

This endpoint retrieves all UXsniff feedback for your website.

HTTP Request

GET https://api.uxsniff.com/v1/feedback

Query Parameters

Parameter Default Description
days 7 The result will return feedback comment in the last N days if no startdate and enddate specified.
startdate none The result will return feedback comment after the start date.
enddate none The result will return feedback comment before the end date.
limit 50 The result will return latest X number of specified number of feedback.

Survey

List Surveys

curl "https://api.uxsniff.com/v1/list-survey?limit=10"
  -H "Authorization: APIKEY"

The above command returns JSON structured like this:

[
  {
    "survey_id":3930,
    "survey_name":"Top Features",
    "active":1
  }
]

This endpoint retrieves all survey details for your website.

HTTP Request

GET https://api.uxsniff.com/v1/list-survey

Query Parameters

Parameter Default Description
limit 50 The result will return latest X number of specified number of survey.

Get Survey Responses

curl "https://api.uxsniff.com/v1/survey?id=3930&startdate=2020-01-01&enddate=2020-12-31&limit=10"
  -H "Authorization: APIKEY"

The above command returns JSON structured like this:

[
  {
    "questions":[{
      "id":0,
      "question":"Did you find what you were looking for?",
      "type":"Radio"
    }, {
      "id":1,
      "question":"What type of articles you are looking for?",
      "type":"Checkbox"
    }],
    "responses":[{
      "id":0,
      "client_id":"1659351352936.mgx5l83q",
      "sessio _id":"1665044041564.o1tnz2vc",
      "answers":["Yes", "Opinions, Web dev, Web design"],
      "url":"https://uxsniff.com",
      "country":"SG",
      "countryName":"Singapore",
      "created":"2022-08-16 08:11:17",
      "os":"Windows",
      "browser":"Chrome",
      "referrer":"google.com",
    }, {
    "id":1,
      "client_id":"1660637959183.znxym39a",
      "sessio _id":"1660637959182.hgojyp",
      "answers":["No", "Opinions"],
      "url":"https://uxsniff.com",
      "country":"US",
      "countryName":"United States",
      "created":"2022-08-16 08:11:17",
      "os":"MacOS",
      "browser":"Safari",
      "referrer":"google.com",
    }]
  }
]

This endpoint retrieves all UXsniff survey for your website.

HTTP Request

GET https://api.uxsniff.com/v1/survey

Query Parameters

Parameter Default Description
id none The result will return survey responses based on the survey id. [Required]
startdate none The result will return survey responses after the start date.
enddate none The result will return survey responses before the end date.
limit 50 The result will return latest X number of specified number of survey responses.

Recordings

Get Recordings

curl "https://api.uxsniff.com/v1/recordings?startdate=2020-01-01&enddate=2020-12-31&limit=10"
  -H "Authorization: APIKEY"

The above command returns JSON structured like this:

[
  {
    "client_id_1659351352936.mgx5l83q":{ 
      "session_id_1669046938255.9ekvsch8":{ 
        "totalUrl":1,
        "timestamp":"2022-11-16 08:25:51",
        "country":"SG"
        "countryName":"Singapore"
        "device":"Desktop"
        "browser":"Chrome"
        "os":"Windows"
        "url":"https://uxsniff.com"
        "duration":499
        "clicks":5
        "doubleClicks":2
        "referrer":"google.com"
        "recording_link":"https://app.uxsniff.com/recording?cid=1659351352936.mgx5l83q&sid=1669046938255.9ekvsch8"
      }, {
        "session_id_1669031764062.f3luxs6e":{ 
        "totalUrl":1,
        "timestamp":"2022-11-16 08:25:51",
        "country":"SG"
        "countryName":"Singapore"
        "device":"Desktop"
        "browser":"Chrome"
        "os":"Windows"
        "url":"https://uxsniff.com"
        "duration":1588
        "clicks":15
        "doubleClicks":7
        "referrer":"google.com"
        "recording_link":"https://app.uxsniff.com/recording?cid=1659351352936.mgx5l83q&sid=1669031764062.f3luxs6e"
      }
    }, {
    "client_id_1669025619274.4as1mhm":{ 
      "session_id_1669025619273.9z8w5e1o":{ 
        "totalUrl":1,
        "timestamp":"2022-11-16 08:25:51",
        "country":"MY"
        "countryName":"Malaysia"
        "device":"Desktop"
        "browser":"Safari"
        "os":"MacOS"
        "url":"https://uxsniff.com"
        "duration":108
        "clicks":8
        "doubleClicks":1
        "referrer":"google.com"
        "recording_link":"https://app.uxsniff.com/recording?cid=1669025619274.4as1mhm&sid=1669025619273.9z8w5e1o"
      }
    }
]

This endpoint retrieves all UXsniff recordings for your website.

HTTP Request

GET https://api.uxsniff.com/v1/list-recordings

Query Parameters

Parameter Default Description
startdate none The result will return recordings after the start date.
enddate none The result will return recordings before the end date.
limit 50 The result will return latest X number of specified number of recordings.

Heatmaps

Get Heatmaps

curl "https://api.uxsniff.com/v1/heatmaps"
  -H "Authorization: APIKEY"

The above command returns JSON structured like this:

[
  {
    "/homepage":{ 
      "pageviews":"988",
      "heatmap_link":"https://uxsniff.com#uxs_heatmap_inline=1&days=10"",
  }
]

This endpoint retrieves all UXsniff Heatmaps for your website.

HTTP Request

GET https://api.uxsniff.com/v1/heatmaps

Query Parameters

Parameter Default Description
startdate none The result will return heatmaps after the start date.
enddate none The result will return heatmaps before the end date.
limit 50 The result will return latest X number of specified number of heatmaps.

Delete Individual API

Delete Individual

curl "https://api.uxsniff.com/v1/delete_individual"
  -H "Authorization: APIKEY"

The above command returns JSON structured like this:

[
  {
       "success":true
    }
]

This endpoint will delete the individual information based on the provided client ID.

HTTP Request

POST https://api.uxsniff.com/v1/delete_individual

Query Parameters

Parameter Required Description
client_id {client_id} The API will delete the individual information based on the provided client ID.

Errors

The UXsniff API uses the following error codes:

Error Code Meaning
400 Bad Request -- Your request is invalid.
401 Unauthorized -- Your API key is wrong.
500 Internal Server Error -- We had a problem with our server. Try again later.
503 Service Unavailable -- We're temporarily offline for maintenance. Please try again later.