Smart Lists
Smart Lists Endpoint Reference
Use the Smart Lists REST APIs to query, clone, and delete smart lists.
These APIs support only user-created smart lists. They do not support built-in or system smart lists.
Query
Query smart lists by ID, by name, or by browsing.
By Id
Query by ID takes one smart-list id path parameter and returns the matching record. Set the optional includeRules Boolean parameter to include smart-list rules.
GET /rest/asset/v1/smartList/{id}.json?includeRules=true
{
"success": true,
"errors": [],
"requestId": "6efc#16c8967a21f",
"warnings": [],
"result": [
{
"id": 4363,
"name": "Smart List Test 01",
"createdAt": "2019-06-03T23:01:13Z+0000",
"updatedAt": "2019-06-04T17:37:45Z+0000",
"url": "https://app-sjqe.marketo.com/#SL4363A1LA1",
"folder": {
"id": 1041,
"type": "Program"
},
"workspace": "Default",
"rules": {
"filterMatchType": "all",
"triggers": [],
"filters": [
{
"id": 459,
"name": "Visited Web Page",
"ruleTypeId": 1,
"ruleType": "Activity",
"operator": "occurs",
"conditions": [
{
"activityAttributeId": 1,
"activityAttributeName": "Web Page",
"operator": "is",
"values": [
"Program Test.Landing Page Test 01"
],
"isPrimary": true
},
{
"activityAttributeId": 6,
"activityAttributeName": "Browser",
"operator": "is",
"values": [
"Chrome"
],
"isPrimary": false
},
{
"activityAttributeId": -101,
"activityAttributeName": "Date of Activity",
"operator": "in past",
"values": [
"30 days"
],
"isPrimary": false
}
]
}
]
}
}
]
}
By Smart Campaign Id
Query by smart campaign ID takes one smart-campaign id path parameter and returns its smart-list record. Set the optional includeRules Boolean parameter to include smart-list rules.
GET /rest/asset/v1/smartCampaign/{smartCampaignId}/smartList.json
{
"success": true,
"errors": [],
"requestId": "6efc#16c8967a21f",
"warnings": [],
"result": [
{
"id": 4363,
"name": "Smart List Test 01",
"createdAt": "2019-06-03T23:01:13Z+0000",
"updatedAt": "2019-06-04T17:37:45Z+0000",
"url": "https://app-sjqe.marketo.com/#SL4363A1LA1",
"folder": {
"id": 1041,
"type": "Program"
},
"workspace": "Default"
}
]
}
By Program Id
Query by program ID takes one email-program id path parameter and returns its smart-list record. Set the optional includeRules Boolean parameter to include smart-list rules.
GET /rest/asset/v1/program/{programId}/smartList.json
{
"success": true,
"errors": [],
"requestId": "6efc#16c8967a21f",
"warnings": [],
"result": [
{
"id": 4363,
"name": "Smart List Test 01",
"createdAt": "2019-06-03T23:01:13Z+0000",
"updatedAt": "2019-06-04T17:37:45Z+0000",
"url": "https://app-sjqe.marketo.com/#SL4363A1LA1",
"folder": {
"id": 1041,
"type": "Program"
},
"workspace": "Default"
}
]
}
By Name
Query by name takes a smart-list name parameter. The endpoint performs an exact name match and returns the matching record.
GET /rest/asset/v1/smartList/byName.json?name=2018 Leads
{
"success": true,
"errors": [],
"requestId": "115d7#16423bc13b4",
"result": [
{
"id": 283988,
"name": "2018 Leads",
"createdAt": "2008-10-07T15:20:39Z+0000",
"updatedAt": "2010-04-13T15:34:32Z+0000",
"url": "https://app-abm.marketo.com/#SL283988A1",
"folder": {
"id": 31,
"type": "Folder"
},
"workspace": "Default"
}
]
}
Browse
Use the browse endpoint to retrieve smart lists in batches. The optional folder parameter scopes the query to a parent folder. Pass it as a JSON object containing id and type.
Use offset and maxReturn for pagination. Use the optional earliestUpdatedAt and latestUpdatedAt parameters to filter by the updatedAt date range.
GET /rest/asset/v1/smartLists.json?folder={"id":31,"type":"Folder"}
{
"success": true,
"errors": [],
"requestId": "9aa4#16423c0e969",
"result": [
{
"id": 283988,
"name": "2018 Leads",
"createdAt": "2008-10-07T15:20:39Z+0000",
"updatedAt": "2010-04-13T15:34:32Z+0000",
"url": "https://app-abm.marketo.com/#SL283988A1",
"folder": {
"id": 31,
"type": "Folder"
},
"workspace": "Default"
},
{
"id": 299697,
"name": "Active Prospects",
"createdAt": "2008-10-17T02:09:49Z+0000",
"updatedAt": "2010-03-27T18:27:46Z+0000",
"url": "https://app-abm.marketo.com/#SL299697A1",
"folder": {
"id": 31,
"type": "Folder"
},
"workspace": "Default"
},
{
"id": 400517,
"name": "Leads by Score",
"createdAt": "2009-01-07T18:52:52Z+0000",
"updatedAt": "2010-04-13T15:36:09Z+0000",
"url": "https://app-abm.marketo.com/#SL400517A1",
"folder": {
"id": 31,
"type": "Folder"
},
"workspace": "Default"
}
]
}
Clone
Send an application/x-www-form-urlencoded POST request to clone a smart list. The id path parameter identifies the source smart list.
Pass folder as a JSON object containing id and type. The parent must be a program or smart-list folder. The name must be unique. The optional description parameter describes the new list.
POST /rest/asset/v1/smartList/{id}/clone.json
Content-Type: application/x-www-form-urlencoded
folder={"id":31,"type":"Folder"}&name=2018 Leads Qualified
{
"success": true,
"errors": [],
"requestId": "a672#16423d755ed",
"result": [
{
"id": 788645,
"name": "2018 Leads Qualified",
"createdAt": "2018-06-21T19:34:32Z+0000",
"updatedAt": "2018-06-21T19:34:32Z+0000",
"url": "https://app-abm.marketo.com/#SL788645A1",
"folder": {
"id": 31,
"type": "Folder"
},
"workspace": "Default"
}
]
}
Delete
To delete a smart list, pass its id as a path parameter.
POST /rest/asset/v1/smartList/{id}/delete.json
{
"success": true,
"errors": [],
"requestId": "8f5#16423dd0fbe",
"result": [
{
"id": 788645
}
]
}