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.
"message": "You have reached your daily limit.",
policyName will indicate which limit you hit (either daily or secondly).
The DAILY limit resets at midnight based on your time zone setting.
Each API request will include the following rate limit headers in the response. NOTE: These headers are only included for requests made using an API key.
||The number of API requests that are allowed per day.|
||The number of API requests still allowed for the current day.|
||The number of API requests that are allowed per second.|
||The number of API requests still allowed for the current second.|
You can also check the number of calls 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.
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 properties, owners, or settings for a form), those settings should also be cached 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.
If you're working with companies or deals, there are also endpoints to update multiple records in a single request:
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.
If you have a HubSpot Marketing Professional 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.