Get segments
Who the users are and how they arrived: active or new users by user segment (channel,
source, medium, campaign, platform, device, os, language, region, landing_page, and the
live ones app_version, browser, browser_version, os_version, sdk_version, consent,
variant), one dimension at a time, in the period ending end and the one before. A user
is in one value per dimension (their first-touch value; a live dimension's is the value
they had on their last active day in the period for active users, on the day they were
first seen for new users), so a dimension's values add up to everyone. Channel groups the
sources
(Organic, Search, Paid, Social, Email, Referral, Other); source is the site or tag
behind it.
A value with fewer than 20 users in both periods is left out (hidden_values). Counts
only, never a user.
HTTPBearerAuthorizationBearer <token>A secret key, tl_live_...
grain?Grainday, week (7 days) or month (28 days) ending on end.
"week""day""week""month"measure?MeasureActive users, or new users.
"active""active""new"end?|The period's last day: a Sunday for an ISO week. Default yesterday, the latest closed day.
Torque-Tenant?|An operator key's tenant to read; refused with a tenant's key.
Torque-Version?string|nullSuccessful Response
application/json- response
object?Object"list"data*array<>has_more*Has Moremeasure*Measuregrain*Grainperiod_end*Period EndThe last day of the period asked for.
previous_period_end*Previous Period Endhidden_values*Values left out of data, by dimension: fewer than 20 users in both periods.
queries*array<>curl -X GET 'https://api.torquelift.ai/v1/segments'{ "object": "list", "data": [ { "object": "segment_value", "dimension": "string", "value": "string", "previous": 0, "current": 0 } ], "has_more": true, "measure": "string", "grain": "string", "period_end": "string", "previous_period_end": "string", "hidden_values": { "property1": 0, "property2": 0 }, "queries": [ { "name": "string", "sha256": "string", "model": "string", "params": { "property1": "string", "property2": "string" }, "ran_at": "string" } ]}