v2

latestOpenAPI 3.1.12026-07-2613060964.2 KB

Dry-run a segment query (sample rows)

Preview the rows a Segment List SQL query would match, without committing it to a list. Returns up to the top 10 matched rows for the columns selected. Use this to spot-check a query before creating a Segment List or committing a new version.

post/v1/subscriber_list/~/dry_run/

Request body

query_textstring required

The SQL query to preview. Must return a distinct_id column and reference only the users and events tables. See the Segment Lists doc for the dialect, available columns, and query rules.

Example request

{
  "query_text": "SELECT distinct_id, active_emails FROM users LIMIT 40"
}

Response

200