Skip to main content
TroopyDocs
Open Troopy
Troopy

API reference / Sessions

Look at the new sessions now

Troopy reads the sessions since the last look, and a teammate reads the busiest ones. It answers at once with the look that waits: GET /session-looks/{id} shows how it goes. A workspace looks 12 times a day at most, with the schedule. While a look waits or works, this gives that look back.

post/api/v1/session-looks

Authorization

HeaderAuthorization: Bearer <API key>
Or the headerX-API-Key: <API key>
API keyMake one in Troopy under Settings > API keys. It acts as you, in its workspace.

Other ways to call it

CLItroopy sessions look-now
MCP toolNone. Call it over REST or with the CLI.
Rate limit6 calls in 3600 seconds, for each key

Response

202 · application/json
data*object
12 properties
id*string

A 24-character id

source*enum<string>

Where the look read the sessions: troopy, Troopy's own script, or posthog

troopyposthog

state*enum<string>

queued, fetching (Troopy reads the source), analyzing (a teammate reads the sessions), done or failed

queuedfetchinganalyzingdonefailed

error*string | null
from*string

It reads the sessions that started from this time on

hours*integer
counts*object
3 properties
recordings*integer

The sessions that the source had

matched*integer

Those that the countries and the paths to leave out kept

analyzed*integer

Those that the teammate read: the busiest ones

summary*string | null

What the sessions show together

issues*array<integer>

The numbers of the problems that it found or saw again

by*string | null

The person who asked for it. Null: the schedule

createdAt*string

ISO 8601 date and time

sessions*array<object>

Empty in a list

16 properties
id*string
replayUrl*string | null

The replay in Sessions or in PostHog. Null: no replay of the session

replay*string | null

Source troopy: the id of the replay

startedAt*string

ISO 8601 date and time

durationSec*integer
activeSec*integer
startPath*string | null
country*string | null
clicks*integer
keys*integer
errors*integer

The errors that the console of the browser showed

events*integer
flow*string | null

What the person did

dropOff*string | null

Where the person stopped

reason*string | null

Why the person possibly stopped

friction*array<string>

Errors

401 unauthorizedSend an API key as `Authorization: Bearer tr_live_...`. Create one in Troopy under Settings.
403 forbiddenThe key lacks a scope this operation needs, or its owner lacks the role. detail says which; create a key with the scope, or ask an organization owner or admin.
429 rate_limitedWait the number of seconds in Retry-After, then retry.