curl --request POST \
--url https://app.demand-iq.com/api/onboarding/tour \
--header 'Content-Type: application/json' \
--cookie session= \
--data '{
"legacy": true
}'import requests
url = "https://app.demand-iq.com/api/onboarding/tour"
payload = { "legacy": True }
headers = {
"cookie": "session=",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {cookie: 'session=', 'Content-Type': 'application/json'},
body: JSON.stringify({legacy: true})
};
fetch('https://app.demand-iq.com/api/onboarding/tour', 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://app.demand-iq.com/api/onboarding/tour",
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([
'legacy' => true
]),
CURLOPT_COOKIE => "session=",
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$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://app.demand-iq.com/api/onboarding/tour"
payload := strings.NewReader("{\n \"legacy\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("cookie", "session=")
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://app.demand-iq.com/api/onboarding/tour")
.header("cookie", "session=")
.header("Content-Type", "application/json")
.body("{\n \"legacy\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.demand-iq.com/api/onboarding/tour")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["cookie"] = 'session='
request["Content-Type"] = 'application/json'
request.body = "{\n \"legacy\": true\n}"
response = http.request(request)
puts response.read_body{
"tourCompletedAt": "2023-11-07T05:31:56Z",
"tourDismissedAt": "2023-11-07T05:31:56Z",
"tourVersion": 123
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Record a presentations onboarding completion or dismissal
Records that the current user completed or dismissed the presentations onboarding modal (ENG-641; versioned in ENG-636). The server records the acknowledged content version (CURRENT_ONBOARDING_VERSION, currently 2) on the user’s row and returns the full updated TourState so callers can write it straight into the shared /api/auth/me cache. Idempotent per (organization, user, version): the underlying upsert only fires when the stored tourVersion is behind the incoming version, so a repeat call at the same version is a no-op and never overwrites tourCompletedAt or tourDismissedAt. A PostHog onboarding_milestone event (tour_completed or tour_dismissed, keyed on organization ID, carrying a tour_version property) is captured only on the first transition to a new version; subsequent calls emit no analytics. Pass legacy: true (only valid with action: "dismissed") to silently backfill users carrying the old per-browser templates_onboarding_seen_v1 localStorage flag: the row is written at LEGACY_TOUR_VERSION (1) so the user stays eligible for newer content, and no event fires.
curl --request POST \
--url https://app.demand-iq.com/api/onboarding/tour \
--header 'Content-Type: application/json' \
--cookie session= \
--data '{
"legacy": true
}'import requests
url = "https://app.demand-iq.com/api/onboarding/tour"
payload = { "legacy": True }
headers = {
"cookie": "session=",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {cookie: 'session=', 'Content-Type': 'application/json'},
body: JSON.stringify({legacy: true})
};
fetch('https://app.demand-iq.com/api/onboarding/tour', 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://app.demand-iq.com/api/onboarding/tour",
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([
'legacy' => true
]),
CURLOPT_COOKIE => "session=",
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$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://app.demand-iq.com/api/onboarding/tour"
payload := strings.NewReader("{\n \"legacy\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("cookie", "session=")
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://app.demand-iq.com/api/onboarding/tour")
.header("cookie", "session=")
.header("Content-Type", "application/json")
.body("{\n \"legacy\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.demand-iq.com/api/onboarding/tour")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["cookie"] = 'session='
request["Content-Type"] = 'application/json'
request.body = "{\n \"legacy\": true\n}"
response = http.request(request)
puts response.read_body{
"tourCompletedAt": "2023-11-07T05:31:56Z",
"tourDismissedAt": "2023-11-07T05:31:56Z",
"tourVersion": 123
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Authorizations
Session cookie obtained from POST /api/auth/login.
Body
completed — user clicked the "Get Started" button on the onboarding modal. dismissed — any other close (X, Esc, or navigation). Overlay clicks do not dismiss the modal.
completed, dismissed Which page the tour was shown on. Used for analytics attribution only; it does not affect persistence.
templates, my_presentations Set to true to backfill a user with the deprecated per-browser localStorage flag. Silent — no PostHog event is emitted. Only valid when action is dismissed.
Response
Updated tour state for the current user
Per-user state for the presentations onboarding modal (ENG-641; versioned in ENG-636). The modal shows at most once per user across devices per content version. The show/hide decision keys on tourVersion: whenever it is less than the current content version, the modal is shown. tourCompletedAt means the user clicked the "Get Started" button on the single-screen video modal; tourDismissedAt covers every other close (X, Esc, navigation, or a silent legacy backfill from the old per-browser localStorage flag). Both timestamps are written once and never cleared, so they preserve the first-ever moment even after later content versions are acknowledged.
Timestamp of the first-ever completion. null until the user clicks "Get Started" for the first time. Never overwritten by a later version acknowledgement.
Timestamp of the first-ever dismissal. null until dismissed. Never overwritten by a later version acknowledgement.
Highest onboarding content version the user has acknowledged. 0 = never onboarded, 1 = illustrated multi-step tour (ENG-641), 2 = Wistia explainer video (ENG-636). The modal shows whenever this is below the current content version. Bumping the current version re-shows the modal to every user exactly once.