Request information about the lists that match the specified criteria. You can specify which lists and which fields to request. A maximum of 200 lists are returned, unless you specify the output as mobile. If you specify the output as mobile, then all lists are returned.
To request information about a specific list, use List Read.
Tip
URI
1/api/list/version/4/do/query?...
Parameters to Select Lists
Use these parameters to specify which lists are returned. Parameters can be used in any combination and in any order unless otherwise specified.
Request lists created after the specified date and time. Example: To request lists created in 2020, use /api/lists/version/4/do/query?created_after=2019-12-31 24:59:59.
Request lists created before the specified date and time. Doesn’t include lists created at the specified time. <custom_time>Example: to request lists created before today (but not created today), use /api/list/version/4/do/query?created_before=today.
id_greater_than
integer
Any positive integer
Request lists that have an Account Engagement ID greater than the specified number.
id_less_than
integer
Any positive integer
Request lists that have an Account Engagement ID less than the specified number.
Request lists that were last updated before the specified date and time.
Parameters to Specify Which Results Are Returned
Use these parameters to specify which list fields are returned, and how the lists are sorted.
Parameter
Type
Possible Values
Description
limit
integer
Any integer from 1 through 200.
The number of lists to return. Default value is 200.
offset
integer
Any positive integer
The number of lists to omit from the response (the number to “skip over”). Example: Retrieve a set of list records, omitting the 50 most recently updated lists. Sort the query by the updated_at field and use offset=50: /api/list/version/4/do/query?sort_by=updated_at&offset=50
sort_by
string
created_at, id, name, updated_at
The field by which the results are sorted. See Sort Order.
sort_order
string
ascending, descending
The sort order. The default value depends on which sort_by value you specify. See Sort Order.
Sort Order
Use sort_by to specify which field Account Engagement uses to sort the results. Different fields have different default sort orders.
Value
Default Sort Order
Description
created_at
descending
Sort the results by the lists’ created_at timestamps.
id
ascending
Sort the results by the lists’ id fields.
name
ascending
Sort the results by the lists’ name fields.
updated_at
descending
Sort the results by the lists’ updated_at timestamps.
Request a set of list records, sorted in ascending order by the time of last update.
Update the value of a list’s fields. Fields that aren’t specified in the request aren’t changed. To clear a field, use a null value.
Returns an updated version of the list.
URI
1/api/list/version/4/do/update/id/<ID>?...
Replace <ID> with the Account Engagement ID of the list.
Parameters
You can use any list field as a parameter. For information about list fields, see List.
Example
To change a list’s name to “VIP List” and change this list title to Learn about Widgets, use the following command:
1/api/list/version/4/do/update/id/485336?name=VIP List&title=Learn about Widgets
XML Response
The XML response for a query request contains information about multiple lists. The XML response for a read request contains information about a single list.
Parent tag. Contains the lists that match the parameters specified in your query.
<total_results>
The number of lists selected by the query. Note: The query request returns a maximum of 200 lists. If your query matches more than 200 lists, you can make several requests to retrieve all matching records.
<list>
The information for a single list. For information about list fields, see List.
XML Response for List Read
1<rsp stat="ok" version="1.0">2 <list>3 <id>752</id>4 <name>Monthly Newsletter</name>5 <is_public>true</is_public>6 <is_dynamic>false</is_dynamic>7 <title>Newsletter</title>8 <description>For public lists, an optional description may be used to explain to the prospect why they might want to include this list in their subscription preferences.</description>9 <is_crm_visible>false</is_crm_visible>10 <created_at>2014-02-11 15:42:36</created_at>11 <updated_at>2014-03-06 15:28:41</updated_at>12 </list>13</rsp>
Tag
Description
<list>
Parent tag. The information for a single list. For information about list fields, see List.