createSmartList
Create a smart list to save filter configurations for later reuse. Supports data sources like members, leads, reviews. Requires name, type, and creator ID with duplicate name check.
Instructions
Create a smart list - Create a new smartlist record. Writes live data.
Use when: programmatically saving a filter configuration for later reuse. smart_list_type determines the data source (members, leads, reviews, etc.).
Required: smart_list_name, smart_list_type, smart_list_created_by.
Pre-check before create: BD does NOT enforce uniqueness on smart_list_name. Duplicate list names mean admins and other tools can't tell the lists apart in the Smart Lists manager, and automations that look up a list by name will bind to the wrong record. Do a server-side filter-find: listSmartLists property=smart_list_name property_value=<proposed> property_operator==. Zero rows = name free; >=1 row = taken. Do NOT paginate unfiltered lists - filtered lookup is one tiny response. If taken: reuse via updateSmartList, OR ask the user, OR pick an alternate smart_list_name and re-check. Never silently create a duplicate.
Parameter interactions:
smart_list_type- data source (see Enums)smart_list_created_by- admin user ID creating the listsmart_list_query_params- JSON/string of filter criteria specific to the chosen typeschedule- recurrence if the list should auto-refresh
See also: updateSmartList (modify existing).
smart_list_query_params format depends on smart_list_type:
For
smart_list_type=newsletter: store a URL string (admin view uses it directly as an href link - no filter semantics).For ALL other types (
members,leads,reviews,transaction,forms_inbox): pass a JSON string of filter key-value pairs, e.g.{"subscription_id":"1","active":"1"}. The backend encrypts it internally before storing.If empty / no filters: pass
"NA"(the controller defaults missing values to this).
The API accepts the value as a plain string; BD handles the internal encryption. Don't pre-encrypt client-side - you'll get double-encrypted garbage. Use the JSON-key-value format for filterable types.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| smart_list_name | Yes | ||
| smart_list_type | Yes | ||
| smart_list_created_by | Yes | Admin user ID | |
| smart_list_query_params | No | Filter criteria — format depends on `smart_list_type`: - **newsletter** - pass a URL string (used directly as `href`) - **all other types** (members, leads, reviews, transaction, forms_inbox) - pass a JSON string of key-value filter pairs like `{"subscription_id":"1","active":"1"}` - **no filters** - pass `"NA"` Backend encrypts internally - do NOT pre-encrypt client-side. | |
| schedule | No | Recurrence frequency |