curl --request GET \
--url https://api.usertour.io/v2/projects/{projectId}/environments/{environmentId}/sessions/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.usertour.io/v2/projects/{projectId}/environments/{environmentId}/sessions/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.usertour.io/v2/projects/{projectId}/environments/{environmentId}/sessions/{id}', 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.usertour.io/v2/projects/{projectId}/environments/{environmentId}/sessions/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.usertour.io/v2/projects/{projectId}/environments/{environmentId}/sessions/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.usertour.io/v2/projects/{projectId}/environments/{environmentId}/sessions/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.usertour.io/v2/projects/{projectId}/environments/{environmentId}/sessions/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"object": "contentSession",
"answers": [
{
"id": "<string>",
"object": "contentSessionAnswer",
"answerType": "nps",
"answerValue": 123,
"createdAt": "2023-11-07T05:31:56Z",
"questionCvid": "<string>",
"questionName": "<string>"
}
],
"completed": true,
"completedAt": "<string>",
"endedAt": "<string>",
"endReason": "<string>",
"contentId": "<string>",
"content": {
"id": "<string>",
"object": "content",
"name": "<string>",
"type": "checklist",
"editedVersionId": "<string>",
"updatedAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z"
},
"createdAt": "2023-11-07T05:31:56Z",
"companyId": "<string>",
"company": {
"id": "<string>",
"object": "company",
"attributes": {},
"createdAt": "2023-11-07T05:31:56Z"
},
"lastActivityAt": "2023-11-07T05:31:56Z",
"progress": 123,
"userId": "<string>",
"user": {
"id": "<string>",
"object": "user",
"attributes": {},
"createdAt": "2023-11-07T05:31:56Z"
},
"versionId": "<string>",
"version": {
"id": "<string>",
"object": "contentVersion",
"number": 123,
"updatedAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"issues": [
{
"rule": "<string>",
"message": "<string>",
"path": "<string>"
}
],
"doc_url": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"issues": [
{
"rule": "<string>",
"message": "<string>",
"path": "<string>"
}
],
"doc_url": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"issues": [
{
"rule": "<string>",
"message": "<string>",
"path": "<string>"
}
],
"doc_url": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"issues": [
{
"rule": "<string>",
"message": "<string>",
"path": "<string>"
}
],
"doc_url": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"issues": [
{
"rule": "<string>",
"message": "<string>",
"path": "<string>"
}
],
"doc_url": "<string>"
}
}Get a session
curl --request GET \
--url https://api.usertour.io/v2/projects/{projectId}/environments/{environmentId}/sessions/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.usertour.io/v2/projects/{projectId}/environments/{environmentId}/sessions/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.usertour.io/v2/projects/{projectId}/environments/{environmentId}/sessions/{id}', 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.usertour.io/v2/projects/{projectId}/environments/{environmentId}/sessions/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.usertour.io/v2/projects/{projectId}/environments/{environmentId}/sessions/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.usertour.io/v2/projects/{projectId}/environments/{environmentId}/sessions/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.usertour.io/v2/projects/{projectId}/environments/{environmentId}/sessions/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"object": "contentSession",
"answers": [
{
"id": "<string>",
"object": "contentSessionAnswer",
"answerType": "nps",
"answerValue": 123,
"createdAt": "2023-11-07T05:31:56Z",
"questionCvid": "<string>",
"questionName": "<string>"
}
],
"completed": true,
"completedAt": "<string>",
"endedAt": "<string>",
"endReason": "<string>",
"contentId": "<string>",
"content": {
"id": "<string>",
"object": "content",
"name": "<string>",
"type": "checklist",
"editedVersionId": "<string>",
"updatedAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z"
},
"createdAt": "2023-11-07T05:31:56Z",
"companyId": "<string>",
"company": {
"id": "<string>",
"object": "company",
"attributes": {},
"createdAt": "2023-11-07T05:31:56Z"
},
"lastActivityAt": "2023-11-07T05:31:56Z",
"progress": 123,
"userId": "<string>",
"user": {
"id": "<string>",
"object": "user",
"attributes": {},
"createdAt": "2023-11-07T05:31:56Z"
},
"versionId": "<string>",
"version": {
"id": "<string>",
"object": "contentVersion",
"number": 123,
"updatedAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"issues": [
{
"rule": "<string>",
"message": "<string>",
"path": "<string>"
}
],
"doc_url": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"issues": [
{
"rule": "<string>",
"message": "<string>",
"path": "<string>"
}
],
"doc_url": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"issues": [
{
"rule": "<string>",
"message": "<string>",
"path": "<string>"
}
],
"doc_url": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"issues": [
{
"rule": "<string>",
"message": "<string>",
"path": "<string>"
}
],
"doc_url": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"issues": [
{
"rule": "<string>",
"message": "<string>",
"path": "<string>"
}
],
"doc_url": "<string>"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Content session ID
Environment ID
Project ID
Query Parameters
Inline: answers, content, company, user, version.
answers, content, company, user, version Response
Content session found
contentSession null = not expanded (pass expand: ["answers"]). Expanded: [] means the session has no question answers; entries appear as the user answers.
Show child attributes
Show child attributes
Whether the user GENUINELY reached the goal — a flow ran to its end (or an explicit completion step) / every checklist task was checked. Independent of whether the session is still open: a completed checklist can still be showing, and a flow can complete at a mid-flow completion step and keep running. Only flows and checklists can be completed; banners / launchers / resource centers are seen-then-dismissed and are always false.
When the goal was reached (null if never completed).
When the session closed (null while it is still open/active). A session can be completed but not yet ended (still open), or ended without being completed (dismissed).
Why the session ended (null while open). Vocabulary — user actions: close_button_dismiss (the X), backdrop_dismiss, dismiss_button, user_closed; authored behavior: action_dismiss (a dismiss action ran), trigger_dismiss, auto_dismissed, end_from_program; displacement: replaced, user_started_other_content, program_started_other_content; health/diagnostic: tooltip_target_missing (the tooltip anchor was never found — the per-session selector-health signal), step_not_found, content_not_found, store_not_found, unpublished_content, session_timeout, system_closed, url_start_closed, launcher_deactivated; admin: admin_ended. Old sessions may carry legacy spellings (e.g. bare action) — treat unknown values as "ended, reason unclassified".
null until expanded with expand: ["content"] (the content always exists).
Show child attributes
Show child attributes
null when the session has no company context (user not in a company).
null = not expanded (pass expand: ["company"]) OR, after expanding, the session genuinely has no company — check companyId to tell the two apart.
Show child attributes
Show child attributes
Flow progress percentage, 0-100 (integer). 100 does not imply completed — see completed.
null = not expanded (pass expand: ["user"]) OR the user was deleted — check userId.
Show child attributes
Show child attributes
null until expanded with expand: ["version"].
Show child attributes
Show child attributes