There's a new version of the HubSpot API

As of November 30, 2022, HubSpot API keys are no longer a supported authentication method for accessing HubSpot APIs. Instead, you should use a private app access token or OAuth to authenticate API calls. Learn more about this change and how to migrate an API key integration to use a private app instead.

Get all contact lists

Last updated May 12, 2023

GET /contacts/v1/lists

Method Details

HTTP Methods:

GET

Response Format:

json

Requires Authentication?

Yes

Rate Limited?

Yes

Headers

User-Agent

Products:

Marketing

Required Scope:

crm.lists.read

This endpoint will return all the contact lists for an account.

Use case for this endpoint: It can be used to synchronize list filters between HubSpot and an external system.

Response details

By default, you will get up to 20 lists at a time.  You can get more lists in a single request (up to 250) using the count parameter. Each response will include an offset, which can be used with the offset= parameter in the next request to get the next page of lists.

The listId is the account specific ID for the list. This value never changes for a particular list. The internalListId is an internal identifier used to track the list criteria revisions, and is subject to change when the list is modified.

See the Contact List Overview for details about the returned data. 

Note: The size property returned is an approximate number. This number varies based on the number of contacts in your HubSpot account and is calculated as an estimate.
Required parameters How to use Description
OAuth access token or private app access token Authorization: Bearer {token} header Used to authenticate the request. Please see this page for more details about authentication.
Optional parameters How to use Description
List count &count=X - Used in the request URL An integer representing the number of lists you want returned to your call. If the parameter isn't included, it defaults to 20. The maximum accepted value is 250; higher values will be accepted, but you will only get 250 records.
Offset &offset=X - Used in the request URL Used to page through the results. Each request will include a "has-more" field in the response JSON, which lets you know if there are more lists that you can pull. If "has-more" is true, you can use the returned offset parameter in the next request to get the next set of results.

Example URL is here:https://api.hubapi.com/contacts/v1/lists?count=2&offset=0