Learn how to create and manage lists using the Lists API.
MANUAL
, DYNAMIC
, and SNAPSHOT
.
MANUAL
: this processing type indicates that object records can only be added to or removed from the list via manual actions by the user or API call. There is no list processing or list membership management done in the background by HubSpot’s systems. This type of list is helpful for when you need a set list of records that won’t change unless manually updated.DYNAMIC
: this processing type gives the possibility to specify list filters to match records that will become list members. This type of list is processed in the background by HubSpot to ensure that the list only contains records that match the list’s filters. Whenever a record changes, it is reevaluated against the list’s filters and either added to or removed from it. This type of list is helpful for when you want to keep a running list that you expect to change over time.SNAPSHOT
: list filters are specified at the time of list creation. After initial processing is completed, records can only be added to or removed from the list by manual actions. This type of list is helpful for when you want to create a list of records based on specific criteria, but don’t want that list to change automatically after initial processing.POST
request to /crm/v3/lists
.
In the request body, you must include the following fields: name
, objectTypeId
, and processingType
. The filterBranch
parameter is optional, and can be included to create branching logic for DYNAMIC
and SNAPSHOT
type lists. Learn more about configuring list filters and branches.
Once created, a listId
(the ILS list ID) will be generated. This ID is used for future updates and modifications.
GET
request to /crm/v3/lists/object-type-id/{objectTypeId}/name/{listName}
. The objectTypeId
is the ID that corresponds to the type of object stored by the list. See the full list of object type IDs.GET
request to /crm/v3/lists/{listId}
. Learn more about finding the ILS list ID below.GET
request to /crm/v3/lists
and include a listIds
query parameter for each list. For example: ?listIds=940&listIds=938
.includeFilters=true
to return list filter definitions in the response.
To find a list’s ILS list ID, you can navigate to the lists tool in HubSpot, then hover over the list and click Details. Learn more about viewing lists. You can also search for lists by other criteria, then view the list’s ID in the response.
POST
request to /crm/v3/lists/search
.
In the request body, you’ll specify the criteria that you want to search by. For example, to search for lists that contain specific words in their name, you can include the query
field. Or, to search for lists of a specific processing type, include a processingTypes
array with each of the processing types you want to search by.
For example, to search for all static lists that contain “HubSpot” in the name, your request body would be as follows:
PUT
request to /crm/v3/lists/{listId}/update-list-name
with the listName
query parameter. If the list with the provided ILS list ID exists, then its name will be updated to the provided listName
. The listName
must be unique amongst all other public lists in the portal.
You can also include a query parameter of includeFilters=true
to return list filter definitions in the response.
DYNAMIC
list’s filter branches, make a PUT
request to /crm/v3/lists/{listId}/update-list-filters
. In the request body, include the new filter branch definition. This
A list filter branch can be updated by sending a PUT
request to /crm/v3/lists/{listId}/update-list-filters
with a request body containing the new filter branch definition. If the list with the provided ILS list ID exists, then its filter branch definition will be updated to the provided filter branch. Once the filter branch is updated, the list will begin processing its new memberships.
DELETE
request to /crm/v3/lists/{listId}
.
Once deleted, lists can be restored within 90 days of deletion by making a PUT
request to /crm/v3/lists/{listID}/restore
. Lists deleted more than 90 days ago cannot be restored.
/memberships/
endpoints below. List membership endpoints can only be used on MANUAL
or SNAPSHOT
list processing types. DYNAMIC
lists will add and remove records based on the filter criteria set.
PUT
request to /crm/v3/lists/{listId}/memberships/add
with a list of recordID
s in the request body.
To add records from one list to another, make a PUT
request to /crm/v3/lists/{listId}/memberships/add-from/{sourceListId}
, where the sourceListId
is the list you’re retrieving the records from. You can move a limit of 100,000 records at a time.
GET
request to /crm/v3/lists/{listId}/memberships
. This returns all members of a list ordered by recordId
.
DELETE
request to /crm/v3/lists/{listId}/memberships
. This will not delete the list from your account.
To remove specific records from an existing list, make a PUT
request to /crm/v3/lists/{listId}/memberships/remove
with a list of recordID
s in the request body.
PUT
request to /crm/v3/lists/{listId}/schedule-conversion
.
In the request body, include one of the following conversionType
values and the type’s related fields:
CONVERSION_DATE
: schedules the conversion for a specific date. Include year
, month
, and day
fields to specify the desired date. This date must be in the future.INACTIVITY
: schedules the conversion if the list hasn’t been active for a set amount of time, based on when the last record was added or removed. Include the timeUnit
field to specify the unit of time (DAY
, WEEK
, or MONTH
) and the offset
field to specify the amount of time after which the list is considered inactive. Only one timeUnit
can be specified and the offset
value must be positive.GET
request to /crm/v3/lists/{listId}/schedule-conversion
. The response will include the requestedConversionTime
object with the conversionType
and the relevant fields for that type. If the list was already converted, the convertedAt
field will be returned with the timestamp of the conversion.
For example, for a list that completed a conversion, your response would look similar to the following:
DELETE
request to /crm/v3/lists/{listId}/schedule-conversion
. If the conversion does not exist, a 404 will be returned.