There's a new version of the HubSpot API
As of November 30, 2022, HubSpot API Keys are being deprecated and are no longer supported. Continued use of HubSpot API Keys is a security risk to your account and data. Your API Keys could be deactivated at any time after Nov. 30th, and we recommend that you migrate to Private Apps as soon as possible so you do not lose business-critical functionality.
Unless otherwise specified, most HubSpot APIs will return a 200 OK response on success. Any endpoints returning a different status code will specify the returned response on its documentation page.
In addition, HubSpot has several error responses that are common to multiple APIs:
Aside from these general errors, HubSpot error responses are intended to be human-readable. Most endpoints do not return error codes, but return a JSON formatted response with details about the error.
Note: The fields in the example response below should all be treated as optional in any error parsing. The specific fields included can vary between different APIs, so any error parsing should allow for specific fields to be missing from the response.
{ "status": "error", "message": "This will be a human readable message with details about the error.", "errors": [ { "message": "This will be a message with additional details about the error", "in": "name" } ], "category": "VALIDATION_ERROR", "correlationId": "a43683b0-5717-4ceb-80b4-104d02915d8c" }
More details for endpoint specific errors can be found on the documentation pages for the endpoint.