Learn how to migrate from the legacy v1 Contacts Lists API to the latest Lists API
legacyListId
: the ID used by the v1 lists API.listId
: the ID used by the v3 lists API.listId
values instead of legacyListId
. For any given list, the value in each field will be different. However, it’s possible that one list’s legacyListId
value matches another list’s listId
value, so ensure you retrieve all list IDs and compare them carefully to prevent list mapping issues.
To retrieve the legacyListId
and listId
values of each list:
GET
request to /crm/v3/lists/idmapping?legacyListId={legacyListId}
with the v1 list ID in the legacyListID
parameter.
Your response will look like:
POST
request to /crm/v3/lists/idmapping
and include the legacyListID
values within an array, limited to 10,000 entries.
For example, your request would look like:
listId
values to refer to lists in the v3 endpoints. The v3 API is the source of truth, so if a mapping does not exist via the v3 API (indicated by the missingLegacyListIds
field), it means the list no longer exists.
POST
/contacts/v1/lists
POST
/contacts/v1/lists/{legacyListId}
POST
/contacts/v1/lists/{legacyListId}/add
POST
/contacts/v1/lists/{legacyListId}/remove
DELETE
/contacts/v1/lists/{legacyListId}
GET
/contacts/v1/lists
GET
/contacts/v1/lists/{legacyListId}
GET
/contacts/v1/lists/batch
GET
/contacts/v1/lists/static
GET
/contacts/v1/lists/dynamic
GET
/v1/lists/{legacyListId}/sizeAndEditsHistory/between
. At this time, there is no equivalent v3 endpoint.GET
/contacts/v1/lists/{legacyListId}/contacts/all
GET
/contacts/v1/lists/{legacyListId}/contacts/recent
GET
/contacts/v1/lists/all/contacts/recent
GET
/contacts/v1/lists/recently_updated/contacts/recent
GET
/contacts/v1/lists/all/contacts/all
GET
/contacts/v1/contact/vid/{vid}/profile
GET
/contacts/v1/contact/vids/batch
GET
/contacts/v1/contact/email/{contact_email}/profile
GET
/contacts/v1/contact/emails/batch
GET
/contacts/v1/contact/utk/{contact_utk}/profile
GET
/contacts/v1/contact/byUtk/batch
listId
). Using a v1 list ID (legacyListId
) for these endpoints may
result in updating or deleting the wrong list. Learn more about list ID
migration.POST
/contacts/v1/lists
to create lists, migrate to POST
/crm/v3/lists
. In the request body, you must include the following fields: name
, objectTypeId
, and processingType
. Refer to the v3 lists API guide for more information on other fields.
You can create lists for objects other than contacts with the v3 API, but if your goal is to create a list of contacts, your objectTypeId
value must be 0-1
.
For example:
listId
is returned, which should be the list ID used moving forward.
POST
/contacts/v1/lists/{legacyListId}
to update a list, migrate to the following v3 endpoints depending on your goal.
To update an active list’s filters, migrate to PUT
/crm/v3/lists/{listId}/update-list-filters
. In your request, include the filterBranch
parameter to your request. Learn more about setting up filter branches.
To update a list’s name, migrate to PUT
/crm/v3/lists/{listId}/update-list-name
. In your request URL, include the v3 listId
of the list and the updated listName
. For example: crm/v3/lists/12345/update-list-name?listName=New%20list%20name
.
POST
/contacts/v1/lists/{legacyListId}/add
and POST
/contacts/v1/lists/{legacyListId}/remove
, migrate to the following endpoints depending on your goal. You can only manually add or remove records in a static list.
PUT
/crm/v3/lists/{listId}/memberships/add
. Include an array with the id
values of records to add.PUT
/crm/v3/lists/{listId}/memberships/remove
. Include an array with the id
values of records to remove.PUT
/crm/v3/lists/{listId}/memberships/add-and-remove
. Include the recordsToRemove
array with id
values of records to remove from the list and the recordsToAdd
array with id
values of records to add to the list.
DELETE
/contacts/v1/lists/{legacyListId}
to delete a list, migrate to DELETE
/crm/v3/lists/{listId}
.
GET
/contacts/v1/lists/static
to get static lists, migrate to POST
/crm/v3/lists/search
. In the request body, include SNAPSHOT
and MANUAL
in the processingTypes
array. Include an additionalProperties
array to request that certain list properties are returned.
GET
/contacts/v1/lists/dynamic
to get active lists, migrate to POST
/crm/v3/lists/search
. In the request body, include DYNAMIC
in the processingTypes
array. Include an additionalProperties
array to request that certain list properties are returned.
GET
/contacts/v1/lists/{legacyListId}
to retrieve individual lists by ID, migrate to GET
/crm/v3/lists/{listId}
.
If you’re using GET
/contacts/v1/lists/batch
to retrieve multiple lists by ID, migrate to GET
/crm/v3/lists
. In the request URL, include listId
values. To include filter branches in the response, set the includeListFilters
query param to true
. For example, your request URL would look like: /crm/v3/lists?includeFilters=true&listIds=42&listIds=51
.
You can also use the search API to filter the lists further, such as by processingType
or custom list properties.
GET
/contacts/v1/lists/{legacyListId}/contacts/all
to retrieve contacts in a list, migrate to GET
/crm/v3/lists/{listId}/memberships
. Records will be returned in order based on their id
values.
Your response will look similar to the following:
GET
/contacts/v1/lists/{legacyListId}/contacts/recent
to retrieve contacts recently added to a list, migrate to GET
/crm/v3/lists/{listId}/memberships/join-order
. Records will be returned with their id
values in the order in which they were added to the list.
Your response will look similar to the following:
GET
/contacts/v1/lists/all/contacts/all
, GET
/contacts/v1/lists/recently_updated/contacts/recent
, or GET
/contacts/v1/lists/all/contacts/recent
to retrieve contacts with list memberships, you’ll need to migrate to the v3 object and search endpoints. This is because migration for retrieving contacts and their memberships requires two calls: one to retrieve the records, then another to retrieve their list memberships.
First, make a POST
request to /crm/v3/objects/{objectTypeId}/search
with the object for which you want to search records (i.e. 0-1
for contacts). You can add filters to specify the records you want.
createdate
.lastmodifieddate
.id
value to retrieve its list membership details. Make a GET
request to /crm/v3/lists/records/{objectTypeId}/{recordId}/memberships
. For example, to retrieve a contact’s memberships, your request URL would look like /crm/v3/lists/records/0-1/1234567/memberships
.
Your response will look like: