200 OK response upon success. Any endpoints returning a different status code will specify the returned response in its documentation.
Common error responses
The table below provides error responses are common to multiple HubSpot APIs:
Aside from these general errors, HubSpot error responses are intended to be human-readable. Most endpoints don’t return error codes, but return a JSON formatted response with details about the error.
- For CRM object APIs, error responses will include detailed
message,code, andcontextfields, which will provide additional information on required properties that were not included in your request, as well as any issues with malformed properties in your request. - More details for endpoint-specific errors can be found on the reference pages for the endpoint.
Multi-status errors
For the object APIs’ batch create endpoints, you can enable multi status responses that include partial failures. This means the response will show which records were created and which were not. To do so, include a uniqueobjectWriteTraceId value for each input in your request. The objectWriteTraceId can be any unique string.
For example, a request to create tickets could look like:
Retries
If your app or integration provides an endpoint that HubSpot will call, such as webhook subscriptions, any errors that your endpoint throws will cause HubSpot to retry the request.Webhooks
If your service has problems handling notifications at any time, HubSpot will attempt to resend failed notifications up to 10 times. HubSpot will retry in the following cases:- Connection failed: HubSpot cannot open an HTTP connection to the provided webhook URL.
- Timeout: Your service takes longer than 5 seconds to send back a response to a batch of notifications
- Error codes: Your service responds with any HTTP status code (
4xxor5xx)
Retry-After header if present. Note that the Retry-After value is in milliseconds.
Notifications will be retried up to 10 times. These retries will be spread out over the next 24 hours, with varying delays between requests. Individual notifications will have some randomization applied, to prevent a large number of concurrent failures from being retried at the exact same time.
Custom code workflow actions
If you’re creating a custom code action in a workflow, and an API call in your action fails due to a rate limiting error, or a429 or 5XX error from axios or @hubspot/api-client, HubSpot will reattempt to execute your action for up to three days, starting one minute after failure. Subsequent failures will be retried at increasing intervals, with a maximum gap of eight hours between tries.