Static Lists
Static Lists Endpoint Reference
Marketo offers a set of REST APIs for performing CRUD operations on static lists. These APIs follow the standard interface pattern for asset APIs providing Query, Create, Update, and Delete options.
For Lead Database operations on list members, see List Membership.
Query
Querying static lists follows the standard query types for assets of by id, by name, and browse.
By Id
Query by id takes a single static list id as a path parameter and returns a single static list record.
GET /rest/asset/v1/staticList/{id}.json
{
"success": true,
"errors": [],
"requestId": "843c#1641f969e96",
"result": [
{
"id": 1021,
"name": "Foundation Seed List",
"createdAt": "2017-07-27T01:38:33Z+0000",
"updatedAt": "2017-07-27T01:39:26Z+0000",
"folder": {
"id": 13,
"type": "Folder"
},
"computedUrl": "https://app-sjqe.marketo.com/#ST1021A1"
}
]
}
By Name
Query by name takes a static list name as a parameter and returns a single static list record. An exact string match is performed against all static list names in the instance, and returns a result for the static list matching that name.
GET /rest/asset/v1/staticList/byName.json?name=Foundation Seed List
{
"success": true,
"errors": [],
"requestId": "28ab#1641fa246b9",
"result": [
{
"id": 1021,
"name": "Foundation Seed List",
"createdAt": "2017-07-27T01:38:33Z+0000",
"updatedAt": "2017-07-27T01:39:26Z+0000",
"folder": {
"id": 13,
"type": "Folder"
},
"computedUrl": "https://app-sjqe.marketo.com/#ST1021A1"
}
]
}
Browse
Static lists can also be retrieved in batches. The folder parameter can be used to specify the parent folder under which the query will be performed and is formatted as a JSON object containing id and type. Like other bulk asset retrieval endpoints, offset and maxReturn are optional parameters that can be used for paging. The earliestUpdatedAt and latestUpdatedAt parameters allow you to set low and high datetime watermarks for returning static lists created or updated within the given range. Datetime values must be valid ISO-8601 strings and should not include milliseconds.
GET /rest/asset/v1/staticLists.json?folder={"id":13,"type":"Folder"}
{
"success": true,
"errors": [],
"requestId": "2dc0#1641f846633",
"result": [
{
"id": 1021,
"name": "Foundation Seed List",
"createdAt": "2017-07-27T01:38:33Z+0000",
"updatedAt": "2017-07-27T01:39:26Z+0000",
"folder": {
"id": 13,
"type": "Folder"
},
"computedUrl": "https://app-sjqe.marketo.com/#ST1021A1"
},
{
"id": 1022,
"name": "Blacklist Seed List",
"createdAt": "2017-07-27T23:19:33Z+0000",
"updatedAt": "2017-07-27T23:21:29Z+0000",
"folder": {
"id": 13,
"type": "Folder"
},
"computedUrl": "https://app-sjqe.marketo.com/#ST1022A1"
},
{
"id": 1023,
"name": "Possible Duplicates Seed List",
"createdAt": "2017-07-28T00:10:02Z+0000",
"updatedAt": "2017-07-28T00:11:22Z+0000",
"folder": {
"id": 13,
"type": "Folder"
},
"computedUrl": "https://app-sjqe.marketo.com/#ST1023A1"
}
]
}
Create and Update
Creating a static list is executed with an application/x-www-form-urlencoded POST with two required parameters. The folder parameter is used to specify the parent folder under which the static list will be created and is formatted as a JSON object containing id and type. The name parameter is used to name the static list and must be unique. Optionally the description parameter may be used to describe the static list.
POST /rest/asset/v1/staticLists.json
Content-Type: application/x-www-form-urlencoded
folder={"id":1034,"type":"Program"}&name=My Static List
{
"success": true,
"errors": [],
"requestId": "1269d#164209d6e1e",
"result": [
{
"id": 1027,
"name": "My Static List",
"createdAt": "2018-06-21T04:32:25Z+0000",
"updatedAt": "2018-06-21T04:32:25Z+0000",
"folder": {
"id": 1034,
"type": "Program"
},
"computedUrl": "https://app-sjqe.marketo.com/#ST1027A1"
}
]
}
Updating a static list is done through a separate endpoint with two optional parameters. The description parameter may be used to update the static list description. The name parameter may be used to update the static list name and must be unique.
POST /rest/asset/v1/staticList/{id}.json
Content-Type: application/x-www-form-urlencoded
description=This is a static list used for testing
{
"success": true,
"errors": [],
"requestId": "f84f#16420b4c746",
"result": [
{
"id": 1027,
"name": "My Static List",
"description": "This is a static list used for testing",
"createdAt": "2018-06-21T04:32:26Z+0000",
"updatedAt": "2018-06-21T04:57:55Z+0000",
"folder": {
"id": 1034,
"type": "Program"
},
"computedUrl": "https://app-sjqe.marketo.com/#ST1027A1"
}
]
}
Delete
Deleting a static list takes a single static list id as a path parameter. Deletions cannot be made to static lists that are in use by an import or export operation, or are in use by other assets.
POST /rest/asset/v1/staticList/{id}/delete.json
{
"success": true,
"errors": [],
"requestId": "2c79#16420ded0e9",
"result": [
{
"id": 1027
}
]
}