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 recently updated and created contacts

Last updated May 12, 2023

GET /contacts/v1/lists/recently_updated/contacts/recent

Method Details

HTTP Methods:

GET

Response Format:

json

Requires Authentication?

Yes

Rate Limited?

Yes

Headers

User-Agent

Products:

Marketing & CRM

Required Scope:

crm.objects.contacts.read

The get recently updated and created contacts endpoint is used to return information about all contacts for a given account that were updated or created in the last 30 days.

Use case for this endpoint: This endpoint is useful for integrations that need to track changes to contacts and synchronize those changes to an external system.

Response details

A paginated list of contacts will be returned to you, with a maximum of 100 contacts per page, as specified by the "count" parameter. The endpoint only scrolls back in time 30 days.

Please Note Pay close attention to the following fields:

  • The "has-more" field, which lets you know whether there are more contacts that you can pull from this portal.
  • The "vid-offset" and "time-offset" fields, which let you know where you are in the list of contacts.
  • You can then use the "vid-offset" or "time-offset" fields in the "vidOffset" or "timeOffset" parameters described below.

The response is sorted in descending order by last modified date; the most recently modified record is returned first.

This endpoint does not return a list of all changes to contacts. It simply provides a reverse chronological list of changed contacts, sorted by lastmodifieddate. This means if a contact was modified yesterday and again this morning, it would only show up in the list once.

Notes: If you're only looking for new records (and not modified records), you can use the get recently created contacts endpoint.

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
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.
Time offset &timeOffset=X - Used in the request URL One method used to page through the recent contacts. Every call to this endpoint will return a time-offset value. This value is used in the timeOffset parameter of the next call to get the next page of contacts. The preferred method of paging.
Contact offset &vidOffset=X - Used in the request URL Another method used to page through the recent 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:  https://api.hubapi.com/contacts/v1/lists/recently_updated/contacts/recent