Saasco logoSaasco logo
Saasco logoSaasco logo

Introduction

OverviewGetting startedAgent setupWhat is Saasco?

SDK

Quick startTrackingIdentifyConfigurationWidgetsProperties

MCP

Quick startHow it worksAuthorizationTool reference
Skills for agents

REST API

Quick start
getList MembersgetGet List MemberpostQuery List MemberspostAdd to ListdelRemove from ListgetGet Contact Lists
CRMList Members

Query List Members

View as MarkdownAgent setup

The same result as List Members, but as a POST so it can carry a filter group in the body, for narrowing a list to a sub-segment, or naming exactly which contact properties to return. Use this when the query is too rich for a query string.

POST
/projects/{projectId}/crm/contact-lists/{contactListId}/members/query

Authorization

Authorization
AuthorizationBearer <token>

In: header

Path Parameters

projectIdrequiredstring

ID of the project that owns the list.

contactListIdrequiredstring

ID of the contact list to read.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

contactDistinctIdstring

Only return the membership for this contact.

orderBystring

Field to sort by.

Value in: "name" | "createdAt" | "updatedAt"
orderDirectionstring

Sort direction. Ignored unless orderBy is set.

Value in: "asc" | "desc"
skipnumber

Number of members to skip before collecting results.

Default: 0
takenumber

Maximum number of members to return.

Default: 24
attributesarray<string>

Property names to include on each member. Omit for the default set.

contactsFilterGroupobject

Extra attribute and event conditions applied on top of list membership.

filtersrequiredarray<object>

Attribute conditions, combined with oneDayEventFilters by groupType.

attributeDistinctIdrequiredstring

Contact attribute distinct id to filter on.

attributeTypestring

Attribute type. Defaults to string when omitted.

Default: "string"Value in: "string" | "number" | "boolean" | "date" | "url" | "email"
operatorrequiredstring

Comparison operator for the attribute value.

Value in: "equals" | "contains" | "notEquals" | "notContains" | "gt" | "gte" | "lt" | "lte" | "on" | "since" | "before" | "between" | "last"
valuerequiredstring

Value to compare the attribute against.

oneDayEventFiltersarray<object>

Event conditions over a rolling 24 hour window (not configurable). Each one is a condition in the group alongside filters, so AND, OR, and NOT apply to both. Used the same way by CRM lists, campaign audiences, workflow entry filters, and Audience Filter steps.

eventNamerequiredstring

Analytics event name from analytics_queryEvents with groupBy action, or Sent email, Delivered email, Opened email, Clicked email, Bounced email, Complained email, or Suppressed email. Those seven read email activity for the same 24 hour window, not analytics.

operatorrequiredstring

performed: the contact has at least one event with this name in the last 24 hours. notPerformed: a contact in the project with no such event in the last 24 hours, including contacts with no events at all.

Value in: "performed" | "notPerformed"
groupTyperequiredstring

How the conditions in filters and oneDayEventFilters combine: AND all true, OR any true, NOT none true.

Value in: "AND" | "OR" | "NOT"
requireSubscribedboolean

When true, the group is ANDed with $subscribed == true. Set by email sending, not the filter UI.

requireUnvalidatedEmailboolean

When true, the group is ANDed with $emailValidated != true. Set by email validation, not the filter UI. The user's AND, OR, and NOT are unchanged.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/projects/string/crm/contact-lists/string/members/query" \  -H "Content-Type: application/json" \  -d '{}'
{  "count": 0,  "data": [    {      "id": "string",      "createdAt": "string",      "updatedAt": "string",      "projectId": "string",      "distinctId": "string",      "email": "string",      "toDelete": true,      "properties": {        "age": 0,        "avatar": "http://example.com",        "birthday": "string",        "createdAt": "string",        "description": "string",        "displayName": "string",        "email": "user@example.com",        "firstName": "string",        "gender": "string",        "id": "string",        "lastName": "string",        "name": "string",        "phone": "string",        "title": "string",        "username": "string",        "website": "string",        "$id": "string",        "$lastSeen": "string",        "$lastIdentifiedAt": "string",        "$processedAt": "string",        "$unsubscribed": true,        "$subscribed": true,        "$unsubscribeReason": "manual",        "$unsubscribeSource": "string",        "$emailValidated": true,        "$lastEmailValidatedAt": "string",        "$emailValidationResult": "string",        "$emailScore": 0,        "$stripeCustomerId": "string",        "$os": "string",        "$browser": "string",        "$browserVersion": "string",        "$screenHeight": 0,        "$screenWidth": 0,        "$screenDpi": 0,        "$device": "string",        "$userAgent": "string",        "$ip": "string",        "$timezone": "string",        "$city": "string",        "$country": "string",        "$countryCode": "string",        "$continent": "string",        "$region": "string",        "$locale": "string",        "$latitude": 0,        "$longitude": 0,        "$referrer": "string",        "$referringDomain": "string",        "$initialReferrer": "string",        "$initialReferringDomain": "string",        "$utmSource": "string",        "$utmMedium": "string",        "$utmCampaign": "string",        "$utmTerm": "string",        "$utmContent": "string",        "$initialUtmSource": "string",        "$initialUtmMedium": "string",        "$initialUtmCampaign": "string",        "$initialUtmTerm": "string",        "$initialUtmContent": "string",        "$_toDelete": true,        "$_emailScoreActions": "string",        "property1": "string",        "property2": "string"      },      "contactListMemberId": "string"    }  ]}

Get List Member

Fetches a single list-membership record by its own ID. Note this is the membership ID, not the contact's distinct ID. To check whether a given contact is in a list, use List Members with `contactDistinctId`.

Add to List

Adds a contact to a static list. Dynamic lists derive their members from a filter, so adding to one has no lasting effect. Change the list's filter instead.