Skip to content
BlokloDocumentation

HubSpot

HubSpot CRM: contacts, companies and deals, for example saving a contact from a site form or listing deals in the app.

Connection type: For the app and the agent. Credentials: Access token (service key or private app).

How it works

The app and the agent never see the credentials. They call the HubSpot API through the Bloklo gateway, for example fetch("/gw/<connection id>/account-info/2026-09/details"). The gateway appends the path to the address https://api.hubapi.com, adds an Authorization: Bearer … header with the key from the connection, and passes the service's response back to the app.

  • Reads (GET) go through at once. Writes (POST, PUT, PATCH, DELETE) go through at once only when the connection is set to Always allow; otherwise the gateway returns status 202 with an approval_id and the write waits for approval in the panel (see Agent permissions).
  • The Test button sends GET /account-info/2026-09/details and checks that the service accepted the credentials.
Note

Some methods run on another host of the same service (noted in the methods table). Choose that host with the X-Bloklo-Host header, for example X-Bloklo-Host: api.hsforms.com; the gateway accepts only the provider hosts allowed in the connector definition.

A REST API in JSON with a Bearer token; dated versions in the path (for example /crm/objects/2026-09/contacts), and the older /crm/v3/… still work. CRM data are objects with a properties field (contacts, companies, deals), search through POST …/search, pagination with limit and after=paging.next.after. Form submissions go to a separate host, api.hsforms.com.

Before you start

  • An account with HubSpot with permission to create API keys or tokens.

Where to get the credentials

  1. Sign in to HubSpot as a super admin or a user with the developer tools permission.
  2. Open the account settings and go to service keys: Development → Keys → Service keys (in some accounts: Settings → Integrations → Service Keys) and choose Create service key.
  3. Tick only the scopes you need: crm.objects.contacts.read and crm.objects.contacts.write (contacts), crm.objects.companies.read/write (companies), crm.objects.deals.read/write (deals).
  4. Copy the token (it starts with pat-).
  5. An account with an existing private app can use its token: Development → Legacy apps → the app → Auth → Show token. HubSpot no longer allows creating new private apps.
Note

HubSpot limit: 100 requests per 10 seconds on Free and Starter accounts, 190 on higher plans. The connection test checks the token itself; a missing scope shows up only on the specific operation.

HubSpot documentation

Connecting in Bloklo

  1. Open Connectors in the sidebar and find HubSpot.
  2. Click Connect and enter a connection name in Details.
  3. In Configure connection, fill in: Access token (service key or private app).
  4. Click Connect. Bloklo saves the credentials encrypted and sends a test request; the message shows whether the service responded.
  5. Attach the connection to a project: Attach to a project… on the connection page, or describe the task in the project chat and pick the connection the agent suggests.

Form fields

  • Access token (service key or private app): Starts with pat-na1- or pat-eu1-.
Important

Never paste credentials into the chat with the agent. Enter them only in the connection form.

Example prompts

Prompts to type in the chat of a project with the connection attached:

  • “Save contact form submissions as HubSpot contacts.”
  • “Build a deals view with stages and amounts from HubSpot.”
  • “Add a contact lookup by email backed by HubSpot.”

API methods

The most commonly used HubSpot API methods. The path goes after /gw/<connection id>; parts in braces, such as {id}, are replaced with values. The gateway treats every request other than GET as a write, including queries sent with POST (such as search or GraphQL), so they need approval unless the connection is set to Always allow. The full list of methods is in the provider's documentation.

MethodPathWhat it doesIn the gateway
GET/account-info/2026-09/detailsAccount details (portalId)read
POST/crm/objects/2026-09/contactsCreate a contactwrite (approval)
GET/crm/objects/2026-09/contactsList contactsread
PATCH/crm/objects/2026-09/contacts/{id}Update a contact (by email: idProperty=email)write (approval)
POST/crm/objects/2026-09/contacts/searchSearch contacts with filterswrite (approval)
POST/crm/objects/2026-09/contacts/batch/upsertCreate or update many contacts (up to 100)write (approval)
POST/crm/objects/2026-09/companiesCreate a companywrite (approval)
POST/crm/objects/2026-09/dealsCreate a dealwrite (approval)
GET/crm/properties/2026-09/contactsList contact propertiesread
GET/crm/owners/2026-09List record ownersread
POST/submissions/v3/integration/submit/{portalId}/{formGuid}Submit a form (host api.hsforms.com)write (approval)

Service limits

Private apps and service keys: Free and Starter 100 requests per 10 s, Professional and Enterprise 190 per 10 s; daily per account 250,000 (Free, Starter), 625,000 (Professional), 1,000,000 (Enterprise). Public OAuth apps: 110 per 10 s per account. CRM search: 5 requests per second, up to 200 results per page, 10,000 results per query, up to 5 filter groups and 18 filters. Lists and batch operations: up to 100 records. 429 with a policyName field; headers X-HubSpot-RateLimit-Max and -Remaining.

HubSpot API reference

Agent actions and permissions

ActionTypeWhat the agent uses it for
Read contactsreadLooks up contacts and companies, for example when building a lead form.
Write contactswriteCreates or updates a contact, for example from a form.
DealswriteReads and changes deals.
Tip

By default, reads run without asking and writes need approval in the chat. Change this on the connector page or in Settings → Agent permissions (see Agent permissions).

Troubleshooting

The connection test shows “Invalid key” (HTTP 401)

The service did not recognise the credentials: the value is wrong, expired, revoked or was copied with a space. Create a new key at the provider and enter it on the connection page under Change credentials. Empty fields stay unchanged.

The connection test shows “Invalid key” (HTTP 403)

The credentials are rejected or lack the needed permissions, or the service only accepts requests from selected IP addresses. Check the key, extend its permissions at the provider or add the Bloklo gateway IP address (shown in Settings → Privacy & security) to the allowlist.

The test returns another HTTP code

The Test button sends the service a read request that requires valid credentials. A code other than 401 and 403 usually means a temporary problem at the service or a restriction on the account at the provider; include the error code shown with the result in a problem report.

Limits and security

  • One connection can make up to 1,000 requests per minute; the service's own limits also apply.
  • Credentials are encrypted and not shown in the browser after saving; only the names of stored fields are visible.
  • A published app works for every visitor: protect the data the connection gives access to with sign-in in the app.

Something unclear or out of date? Contact us