Get User Sessions
curl --request POST \
--url https://api.publisher.miratsquanto.com/api/v1/publisher/user-sessions \
--header 'Content-Type: application/json' \
--header 'publisher-authentication-key: <api-key>' \
--data '
{
"authorizationKey": "DqcInvhIFAl5WtUNwihFUIgUH77EL2hTNRU",
"rows": 100,
"page": 1,
"sessionType": 0,
"status": "completed",
"startDate": "2025-11-24",
"endDate": "2025-12-24"
}
'import requests
url = "https://api.publisher.miratsquanto.com/api/v1/publisher/user-sessions"
payload = {
"authorizationKey": "DqcInvhIFAl5WtUNwihFUIgUH77EL2hTNRU",
"rows": 100,
"page": 1,
"sessionType": 0,
"status": "completed",
"startDate": "2025-11-24",
"endDate": "2025-12-24"
}
headers = {
"publisher-authentication-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'publisher-authentication-key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
authorizationKey: 'DqcInvhIFAl5WtUNwihFUIgUH77EL2hTNRU',
rows: 100,
page: 1,
sessionType: 0,
status: 'completed',
startDate: '2025-11-24',
endDate: '2025-12-24'
})
};
fetch('https://api.publisher.miratsquanto.com/api/v1/publisher/user-sessions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.publisher.miratsquanto.com/api/v1/publisher/user-sessions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'authorizationKey' => 'DqcInvhIFAl5WtUNwihFUIgUH77EL2hTNRU',
'rows' => 100,
'page' => 1,
'sessionType' => 0,
'status' => 'completed',
'startDate' => '2025-11-24',
'endDate' => '2025-12-24'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"publisher-authentication-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.publisher.miratsquanto.com/api/v1/publisher/user-sessions"
payload := strings.NewReader("{\n \"authorizationKey\": \"DqcInvhIFAl5WtUNwihFUIgUH77EL2hTNRU\",\n \"rows\": 100,\n \"page\": 1,\n \"sessionType\": 0,\n \"status\": \"completed\",\n \"startDate\": \"2025-11-24\",\n \"endDate\": \"2025-12-24\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("publisher-authentication-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.publisher.miratsquanto.com/api/v1/publisher/user-sessions")
.header("publisher-authentication-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"authorizationKey\": \"DqcInvhIFAl5WtUNwihFUIgUH77EL2hTNRU\",\n \"rows\": 100,\n \"page\": 1,\n \"sessionType\": 0,\n \"status\": \"completed\",\n \"startDate\": \"2025-11-24\",\n \"endDate\": \"2025-12-24\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.publisher.miratsquanto.com/api/v1/publisher/user-sessions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["publisher-authentication-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"authorizationKey\": \"DqcInvhIFAl5WtUNwihFUIgUH77EL2hTNRU\",\n \"rows\": 100,\n \"page\": 1,\n \"sessionType\": 0,\n \"status\": \"completed\",\n \"startDate\": \"2025-11-24\",\n \"endDate\": \"2025-12-24\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "User sessions fetched successfully",
"data": [
{
"rid": "c339b91cf474987f12aa43015b436f15",
"surveyNumber": 1759222310541001,
"clientStatus": {
"title": "Survey completed",
"description": "A survey has been completed by a user",
"code": 10
},
"miratsStatus": {
"title": "Redirected to client survey",
"description": "The user has been redirected to the client survey",
"code": 3
},
"OS": "Mac OS X",
"IP": "159.253.79.204",
"browser": "Chrome",
"device": "Desktop",
"duration": "00:19:07",
"country": "GB",
"timezone": "Europe/London",
"startTime": "2025-10-01T04:11:21.819Z",
"endTime": "2025-10-01T04:30:29.007Z",
"reconciliationStatus": "Approved"
}
],
"pagination": {
"totalDocument": 59,
"rows": 500,
"page": 1,
"totalPages": 1
},
"organisation": "Organisation Name",
"project": "Project Name"
}{
"message": "internal server error",
"code": 500,
"success": false
}Endpoint Examples
Get User Sessions
Retrieve user session data with filtering and pagination options.
POST
/
user-sessions
Get User Sessions
curl --request POST \
--url https://api.publisher.miratsquanto.com/api/v1/publisher/user-sessions \
--header 'Content-Type: application/json' \
--header 'publisher-authentication-key: <api-key>' \
--data '
{
"authorizationKey": "DqcInvhIFAl5WtUNwihFUIgUH77EL2hTNRU",
"rows": 100,
"page": 1,
"sessionType": 0,
"status": "completed",
"startDate": "2025-11-24",
"endDate": "2025-12-24"
}
'import requests
url = "https://api.publisher.miratsquanto.com/api/v1/publisher/user-sessions"
payload = {
"authorizationKey": "DqcInvhIFAl5WtUNwihFUIgUH77EL2hTNRU",
"rows": 100,
"page": 1,
"sessionType": 0,
"status": "completed",
"startDate": "2025-11-24",
"endDate": "2025-12-24"
}
headers = {
"publisher-authentication-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'publisher-authentication-key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
authorizationKey: 'DqcInvhIFAl5WtUNwihFUIgUH77EL2hTNRU',
rows: 100,
page: 1,
sessionType: 0,
status: 'completed',
startDate: '2025-11-24',
endDate: '2025-12-24'
})
};
fetch('https://api.publisher.miratsquanto.com/api/v1/publisher/user-sessions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.publisher.miratsquanto.com/api/v1/publisher/user-sessions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'authorizationKey' => 'DqcInvhIFAl5WtUNwihFUIgUH77EL2hTNRU',
'rows' => 100,
'page' => 1,
'sessionType' => 0,
'status' => 'completed',
'startDate' => '2025-11-24',
'endDate' => '2025-12-24'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"publisher-authentication-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.publisher.miratsquanto.com/api/v1/publisher/user-sessions"
payload := strings.NewReader("{\n \"authorizationKey\": \"DqcInvhIFAl5WtUNwihFUIgUH77EL2hTNRU\",\n \"rows\": 100,\n \"page\": 1,\n \"sessionType\": 0,\n \"status\": \"completed\",\n \"startDate\": \"2025-11-24\",\n \"endDate\": \"2025-12-24\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("publisher-authentication-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.publisher.miratsquanto.com/api/v1/publisher/user-sessions")
.header("publisher-authentication-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"authorizationKey\": \"DqcInvhIFAl5WtUNwihFUIgUH77EL2hTNRU\",\n \"rows\": 100,\n \"page\": 1,\n \"sessionType\": 0,\n \"status\": \"completed\",\n \"startDate\": \"2025-11-24\",\n \"endDate\": \"2025-12-24\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.publisher.miratsquanto.com/api/v1/publisher/user-sessions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["publisher-authentication-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"authorizationKey\": \"DqcInvhIFAl5WtUNwihFUIgUH77EL2hTNRU\",\n \"rows\": 100,\n \"page\": 1,\n \"sessionType\": 0,\n \"status\": \"completed\",\n \"startDate\": \"2025-11-24\",\n \"endDate\": \"2025-12-24\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "User sessions fetched successfully",
"data": [
{
"rid": "c339b91cf474987f12aa43015b436f15",
"surveyNumber": 1759222310541001,
"clientStatus": {
"title": "Survey completed",
"description": "A survey has been completed by a user",
"code": 10
},
"miratsStatus": {
"title": "Redirected to client survey",
"description": "The user has been redirected to the client survey",
"code": 3
},
"OS": "Mac OS X",
"IP": "159.253.79.204",
"browser": "Chrome",
"device": "Desktop",
"duration": "00:19:07",
"country": "GB",
"timezone": "Europe/London",
"startTime": "2025-10-01T04:11:21.819Z",
"endTime": "2025-10-01T04:30:29.007Z",
"reconciliationStatus": "Approved"
}
],
"pagination": {
"totalDocument": 59,
"rows": 500,
"page": 1,
"totalPages": 1
},
"organisation": "Organisation Name",
"project": "Project Name"
}{
"message": "internal server error",
"code": 500,
"success": false
}Get User Sessions
Retrieve user session data with filtering and pagination options.Endpoint
POST /user-sessions
Headers
{
"publisher-authentication-key": "your_project_secret_key"
}
Note: Thepublisher-authentication-keyheader corresponds to your Secret Key. TheauthorizationKeyin the request body corresponds to your Web API Key.
Request Body
{
"authorizationKey": "your web api key",
"rows": 100,
"page": 1,
"sessionType": 0,
"status": "completed",
"startDate": "2025-11-24",
"endDate": "2025-12-24"
}
Request Body Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
authorizationKey | string | Yes | - | Publisher’s project web API key |
rows | integer | No | 100 | Number of records per page. Min: 1, Max: 500. |
page | integer | No | 1 | The page number for pagination. |
sessionType | integer | No | 0 | 0 = Live, 1 = Test. |
status | string | No | ”all” | Enum: all, completed, overquota, terminated, securityDrop, prescreen. |
startDate | string | No | Last Month | ISO Date format (YYYY-MM-DD). Defaults to 30 days ago. |
endDate | string | No | Today | ISO Date format (YYYY-MM-DD). Defaults to current date. |
Response
{
"success": true,
"message": "User sessions fetched successfully",
"organisation": "Organisation Name",
"project": "Project Name",
"data": [
{
"rid": "c339b91cf474987f12aa43015b436f15",
"clientStatus": {
"title": "Survey completed",
"description": "A survey has been completed by a user",
"code": 10
},
"miratsStatus": {
"title": "Redirected to client survey",
"description": "The user has been redirected to the client survey",
"code": 3
},
"surveyNumber": 1759222310541001,
"OS": "Mac OS X",
"IP": "159.253.79.204",
"browser": "Chrome",
"device": "Desktop",
"duration": "00:19:07",
"country": "GB",
"timezone": "Europe/London",
"startTime": "2025-10-01T04:11:21.819Z",
"endTime": "2025-10-01T04:30:29.007Z",
"reconciliationStatus": "Approved"
}
],
"pagination": {
"totalDocument": 59,
"rows": 500,
"page": 1,
"totalPages": 1
}
}
Error Response
{
"message": "internal server error",
"code": 500,
"success": false
}
Authorizations
Send your Secret Key using the publisher-authentication-key header. This header is required for every request.
Body
application/json
Payload for retrieving user sessions. Includes your Web API Key plus optional filtering criteria.
Publisher's project web API key
Example:
"DqcInvhIFAl5WtUNwihFUIgUH77EL2hTNRU"
Number of records per page. Min: 1, Max: 500.
Required range:
1 <= x <= 500Example:
100
The page number for pagination.
Required range:
x >= 1Example:
1
0 = Live, 1 = Test.
Available options:
0, 1 Example:
0
Session status filter
Available options:
all, completed, overquota, terminated, securityDrop, prescreen Example:
"completed"
ISO Date format (YYYY-MM-DD). Defaults to 30 days ago.
Example:
"2025-11-24"
ISO Date format (YYYY-MM-DD). Defaults to current date.
Example:
"2025-12-24"
Response
Successful response with user sessions data
⌘I

