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 AllgetGet ListpostCreate ListputUpdate ListdelDelete List
CRMLists

Create List

View as MarkdownAgent setup

Creates a contact list. A static list holds the members you add explicitly; a dynamic list stores a filter and recomputes its members on read, so contacts join and leave automatically as their properties change. Set contactsFilterGroups for a dynamic list.

POST
/projects/{projectId}/crm/contact-lists

Authorization

Authorization
AuthorizationBearer <token>

In: header

Path Parameters

projectIdrequiredstring

ID of the project that will own the list.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

namerequiredstring
descriptionstring | null
typestring
Default: "static"Value in: "static" | "dynamic"
contactsFilterGroupsrequiredarray<object>
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" \  -H "Content-Type: application/json" \  -d '{    "name": "string",    "contactsFilterGroups": [      {        "filters": [          {            "attributeDistinctId": "string",            "operator": "equals",            "value": "string"          }        ],        "groupType": "AND"      }    ]  }'
{  "id": "string",  "createdAt": "string",  "updatedAt": "string",  "name": "string",  "description": "string",  "type": "static",  "contactsFilterGroups": [    {      "filters": [        {          "attributeDistinctId": "string",          "attributeType": "string",          "operator": "equals",          "value": "string"        }      ],      "oneDayEventFilters": [        {          "eventName": "string",          "operator": "performed"        }      ],      "groupType": "AND",      "requireSubscribed": true,      "requireUnvalidatedEmail": true    }  ],  "projectId": "string"}

Get List

Fetches a single contact list with its configuration, including the filter definition for a dynamic list. Members are not included. Use List Members for those.

Update List

Updates a contact list's name, description, type, or filter. Only the fields present in `changes` are written. Editing the filter on a dynamic list changes who is in it immediately, since membership is evaluated on read.