Working within the HubSpot API rate limits

Our API rate limits can be found with our API Usage Guidelines.  If you exceed those limits, you will start receiving 429 error responses for any API calls that you make.  Those 429 responses will have the following format.

{
  "status": "error",
  "message": "You have reached your daily limit.",
  "errorType": "RATE_LIMIT",
  "correlationId": "c033cdaa-2c40-4a64-ae48-b4cec88dad24",
  "policyName": "DAILY",
  "requestId": "3d3e35b7-0dae-4b9f-a6e3-9c230cbcf8dd"
}

The message and policyName will indicate which limit you hit (either daily or secondly).

The DAILY limit resets at midnight based on your time zone seting.  You can check the number of calls you've used during the current day using this endpoint.

If you're running into the SECONDLY limit, you should throttle the requests that your app is making to stay under that limit.  In addition to throttling the requests, or if you're running into the daily limit, check out the suggestions below.

If you find that you're still hitting the call limits after looking through these suggestions, please let us know on our Developer Forums, and let us know as many details as possible about what APIs you're using, how you're using them, and which limit you're hitting.

Cache data for repeat calls

If your site or app uses data from HubSpot on each page load, that data should be cached and loaded from that cache instead of being requested from the HubSpot APIs each time.  If you're making repeated calls to get settings from your portal for a batch job (such as getting your contact propertiesowners, or settings for a form), those settings should also be cached when possible.

Use Bulk APIs when possible

If you're working with contacts, you can use the Batch API to update contacts in sets, up to 100 records per call.  The endpoint works with either an email address or a contact vid to identify the records, so as long as you have the email address, you wouldn't need to look up the contact in HubSpot before being able to update the record. If you're not working with time-sensitive data, group updates into a periodic batch update instead of updating individual records.

You can also get data for specific contact records in batches (either by email or vid) instead of pulling individual records.

Use Smart Lists and Workflow Starting conditions

Smart lists can automatically include contacts based on several different criteria.  Instead of creating or updating a contact, and then manually adding them to a list, use custom properties and smart lists so that the new or updated records are automatically added the your lists based on the list criteria.

Similarly, workflows can also be automatically triggered based on different starting conditions, so new or updated contacts can be automatically enrolled in workflows without updating a record and then manually enrolling the record in the workflow with a separate request.

Use Webhooks to get updated data from HubSpot

If you have a HubSpot Marketing Proffessional or Enterprise subscription, you can use webhook actions in Workflows to have data for contact records sent to your system.  Webhooks can be triggered as an action in any workflow, so you can use any workflow starting conditions as the critieria to have contact data sent to your system.   More details about using webhooks can be found here, with example data from the webhooks here.