Easy Tech Tuts
HubSpot

How to Use HubSpot API Easily 2026

By Impran M N

HubSpot moved from numbered API versions like v3 and v4 to date-based endpoint paths such as /2026-03/, and that shift changes how you structure requests if your integration still points at the old numeric routes. This guide covers where authentication lives inside a HubSpot account, how a Private App generates the bearer token your requests need, and the batching and retry logic that keeps a CRM integration from tripping HubSpot's rate limits. It's written for developers building or maintaining a connection to HubSpot's CRM objects, not for anyone just clicking through the marketing or sales tools.

01Understand why the date-based versioning shift matters

HubSpot's older API paths used simple numeric versions, like /crm/v3/objects/contacts, but the 2026 architecture replaces that with a dated segment, like /crm/objects/2026-03/. The practical effect is that a request built against a numeric path from an older tutorial or SDK example may silently break or route to deprecated behavior. Before writing any new integration code, confirm which dated version your account and any client library are actually targeting, since mixing an old numeric call with new authentication scopes is a common source of confusing errors.

02Create a Private App or configure OAuth scopes

Authentication for a custom integration starts in your account's Settings, under the Integrations section, where you can either set up a Private App for a single-account connection or configure a full OAuth flow if you're building something that other HubSpot accounts will install. A Private App is the simpler route for most internal tooling: you name the app, then grant it only the specific object scopes it needs, like read and write access to Contacts or Deals, rather than blanket account access.

03Generate your bearer token

Once the Private App's scopes are set, HubSpot issues a Service Key you copy once and store securely — this is the bearer token every request needs in its Authorization header. If you're building an app for OAuth instead of a Private App, the equivalent step is exchanging your authorization code at the dated token endpoint, such as /oauth/2026-03/token, to receive an access token with the same role. Either way, treat this string like a password: it's the only credential standing between the public internet and your CRM data.

04Build requests against the updated endpoint paths

With a token in hand, a basic GET request to fetch a contact now points at the dated CRM objects path rather than a numeric one, with the bearer token injected into the request's header array. Whether you're using a plain HTTP client, an API testing tool, or a server-side SDK, the shape of the call is the same: method, dated URL, Authorization header, and a JSON body for anything beyond a simple read. Test a single-object GET request first before moving on to batch or bulk calls, so you can confirm your token's scopes actually cover the object type you're targeting.

05Use batch endpoints and handle pagination

For anything beyond a handful of records, HubSpot's batch read endpoints let you fetch up to 100 records in a single payload, which is far more efficient than looping single-object requests. Responses beyond that limit include a paging.next.after token in the response body — pass that value into your next request's parameters to walk through the full result set page by page instead of guessing at offsets. Skipping pagination logic is one of the fastest ways to silently miss records in a large sync job.

06Plan for rate limit errors with exponential backoff

Even with batching and pagination handled correctly, high-volume integrations will eventually hit a 429 response when they exceed HubSpot's rate limits. The standard fix is exponential backoff: catch the 429, wait a short interval, retry, and double that interval on each subsequent failure rather than hammering the endpoint at a fixed rate. Building this retry loop in from the start, rather than bolting it on after a production integration starts failing, saves a lot of debugging later.

FAQ

Frequently asked questions

What changed with HubSpot's API versioning?

HubSpot moved from numeric versions like v3 to date-based endpoints such as /2026-03/, so integrations need to target the correct dated path instead of an older numeric one.

How do I authenticate HubSpot API requests?

Create a Private App in Settings under Integrations, grant it specific object scopes, and use the Service Key it issues as a bearer token in your requests' Authorization header. OAuth apps use an equivalent dated token endpoint instead.

How many records can I fetch in one batch call?

Batch endpoints typically let you fetch up to 100 records per request, which helps you stay within rate limits compared to looping single-object calls.

What should I do if I get a 429 error?

Implement exponential backoff: catch the 429 response, wait, retry, and increase the wait time on each subsequent failure rather than retrying at a fixed interval.

How do I paginate through large result sets?

Read the paging.next.after token from the response body and pass it into your next request's parameters to move through results page by page.

Watch the full walkthrough

The same steps, demonstrated on screen from start to finish.