Update a contact list

Last updated December 30, 2019

POST /contacts/v1/lists/:list_id

Method Details

HTTP Methods:

POST

Content Type:

application/json

Response Format:

json

Requires Authentication?

Yes

Rate Limited?

Yes

Headers

User-Agent

Products:

Marketing

Required Scope:

contacts

This endpoint is used to update a list in a given HubSpot account.

Use case for this endpoint: If an external interface is used to build contact list filters, changes made there could be reflected in HubSpot via the update a contact list endpoint.

Like when creating a list, users will be able to edit and even delete these lists inside of the HubSpot UI.

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 you're looking for.
Optional parameters How to use Description
List name Used in the request body JSON Include to update the name of the list.
Filters Used in the request body JSON (see below) Use filters to customize your list results. Find more details about available filters and how they work here.

Note: Adding new filter data to the request will replace any existing filters. To append your filters, you must include the existing ones in a new request.
Other list data Used in the request body JSON See creating a list for other data that can be set.

Example URL to POST to:  https://api.hubapi.com/contacts/v1/lists/2?hapikey=demo

Response details

The response from this API call are standard REST-style HTTP response codes that mark success or failure, with meta information about the call that was made. If you've successfully updated the list, you will receive the updated list as a JSON object in the response body.

  • 200 when a list is successfully updated.
  • 400 when there is a problem with the form data. You'll receive a JSON formatted response with a message that provides more details.
  • 500 when an internal server error occurs. Please alert us in the API Forum if you receive an HTTP 500 error.

These code samples use a demo API key. Using this key for anything but GET requests will result in an error. For all other requests (such as POST or PUT), you'll need to use your own API key or OAuth. For more details, please see here