Create a List
API to create / manage lists to send notification to a bulk list of users. To create a Segment List — a list whose membership is driven by a SQL query against your users and events tables — pass list_type: dynamic_list along with the query.
Authorizations
Body
Type of the list. Use dynamic_list to create a Segment List whose membership is driven by a SQL query. Defaults to static_list.
static_list, dynamic_list SQL query defining the segment. Needed for a dynamic_list to sync — if omitted, the list is created but its segment sync stays disabled. Must return a distinct_id column and reference only the users and events tables. See the Segment Lists doc for the full dialect reference.
"SELECT distinct_id FROM users WHERE CAST(user_properties ->> 'lifetime_value' AS DOUBLE PRECISION) >= 2500"
Response
201