Get contacts in a list

Last updated December 30, 2019

GET /contacts/v1/lists/:list_id/contacts/all

Method Details

HTTP Methods:

GET

Response Format:

json

Requires Authentication?

Yes

Rate Limited?

Yes

Headers

User-Agent

Products:

Marketing

Required Scope:

contacts

This endpoint will return a list of contacts on a particular list (identified by its unique ID) in a given account.

Use case for this endpoint: HubSpot customers generally use lists to group similar contacts together for marketing automation. However, for an integration, you'll likely want to create a list before you get contacts from it.

Required parameters How to use Description
OAuth Access Token or API Key Authorization: Bearer {token} header
or hapikey={key} query parameter.
Used to authenticate the request. Please see this page for more details about authentication.
List ID Used in the request URL Unique identifier for the list that you're looking for.
Optional parameters How to use Description
Count &count=X - Used in the request URL This parameter lets you specify the amount of contacts to return in your API call. The default for this parameter (if it isn't specified) is 20 contacts. The maximum amount of contacts you can have returned to you via this parameter is 100.
Contact offset &vidOffset=X - Used in the request URL Used to page through the contacts. Every call to this endpoint will return a vid-offset value. This value is used in the vidOffset parameter of the next call to get the next page of contacts.
Property &property=X - Used in the request URL If you include the "property" parameter, then the properties in the "contact" object in the returned data will only include the property or properties that you request.
Property mode &propertyMode=x One of “value_only” or “value_and_history” to specify if the current value for a property should be fetched, or the value and all the historical values for that property. Default is “value_only”.
Form submission mode &formSubmissionMode=x One of “all”, “none”, “newest”, “oldest” to specify which form submissions should be fetched. Default is “newest”.
List memberships &showListMemberships=x Boolean "true" or "false" to indicate whether current list memberships should be fetched for the contact. Default is false.

Example URL is here - note that the list ID is "1":  https://api.hubapi.com/contacts/v1/lists/1/contacts/all?hapikey=demo