Settings API Methods

Update or Create a Setting

POST  /settings/v1/settings

For a given portal, update a setting.

For convenience, HTTP PUT requests are also supported, and handled the same as POSTs.

Note: only a subset of settings can be written (added, updated, deleted). Specifically, the social media account settings and the domain name settings are read-only, i.e. they cannot be modified at this time. Also, there is a collection of HubSpot-internal settings which can not be modified by public API keys.

Required Parameters How to use Description
HubSpot OAuth Access Token access_token=X - Used in the request URL The HubSpot API key for the portal that you're making the call for. Please note that there is also a "readOnly" object in the Settings data that is not writable and cannot be updated.
Setting Name &name=X - Used in the request URL The name of the setting you're creating or updating. Some of the more popular settings include:
  • LG-SKIP_PORTAL - Set this to true to disable HubSpot standard lead grading, false to enable it
  • hubspot.doNotEmailList - Add email addresses to this setting to put people onto a specific portal's do not email list.
  • cms:mobileoptimization - Set this to true to enable HubSpot's mobile optimization for any CMS page, including landing pages.
Updated Setting Value &value=X - Used in the request URL The value of the setting that you're creating or updating
Optional Parameters How to use Description
None None No optional parameters for this method.

Example URL:  https://api.hubapi.com/settings/v1/settings?access_token=demooooo-oooo-oooo-oooo-oooooooooooo&name=foo&value=barbaz

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. There will be no data in the response body.

  • 201 Created - When a setting is created or updated
  • 401 - When an unauthorized request is made
  • 500 - When an internal server error occurs