Connect
Install the Zernio app on a HubSpot portal to connect it to a profile, from the dashboard or with the connect API.
Connect from the dashboard
- Sign in to Zernio (a free account works) and open Connections.
- Click Connect an account, pick the profile, and choose HubSpot under Communication.
- In HubSpot, pick the portal and approve the app. It asks to read and write contacts, and optionally to read deals.
- Back in Zernio, the portal shows on the profile. Contact sync and message logging are on, and the deal settings are off.
The person approving must be a HubSpot user who can install apps on the portal.
Connect a HubSpot portal
Request the authorization link for a profile, then send the user to authUrl:
curl "https://zernio.com/api/v1/connect/hubspot?profileId=PROFILE_ID&redirect_url=https://example.com/done" \
-H "Authorization: Bearer $ZERNIO_API_KEY"{ "authUrl": "https://app.hubspot.com/oauth/authorize?client_id=…", "state": "…" }The user picks a portal and approves the app. HubSpot returns them to Zernio, which saves the account and redirects to redirect_url (or the dashboard) with connected=hubspot, profileId, accountId and username (the portal domain).
Change what syncs
Change any setting with PATCH /v1/accounts/{accountId}/hubspot-settings, or from the HubSpot account's Settings on Connections:
curl -X PATCH "https://zernio.com/api/v1/accounts/ACCOUNT_ID/hubspot-settings" \
-H "Authorization: Bearer $ZERNIO_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "logMessages": false }'syncContacts creates a HubSpot contact for an inbox contact that matches none. logMessages writes each message on the contact's timeline.
syncContacts and logMessages start on. useDealsAsResults and reportDeals start off and need deal access; see Deals. Read the current values with GET /v1/accounts/{accountId}/hubspot-settings.
Disconnect or uninstall
- From Zernio: on Connections, click Disconnect on the HubSpot account, or call
DELETE /v1/accounts/{accountId}. Zernio stops syncing and uninstalls the app from the portal, unless another Zernio profile still uses it. - From HubSpot: in the portal, go to Settings > Integrations > Connected apps and uninstall Zernio. The account shows as disconnected in Zernio the next time a message syncs.
Either way, what Zernio already wrote stays in HubSpot: the contacts it created and the messages on their timelines are not deleted.
Nothing new syncs until you connect again, and messages from the gap are not backfilled.
How it behaves
- A profile holds one portal. Reconnecting the same portal refreshes the account in place and keeps its settings; a different portal starts with the default settings.
- Access renews by itself. If the app is uninstalled in HubSpot, the account is marked disconnected the next time a message syncs.
- Disconnecting the account in Zernio uninstalls the app from the portal, unless another Zernio profile still uses that portal.
If it fails
| Error | Cause | Fix |
|---|---|---|
hubspot_profile_has_portal on the redirect | The profile already has a different portal connected | Disconnect it first, or connect this portal to another profile. |
hubspot_access_denied on the redirect | The user declined the app in HubSpot | Start the connect again and approve the app. |
hubspot_invalid_state on the redirect | The link expired or was already used | Request a fresh authUrl. |
hubspot_connection_failed on the redirect | HubSpot refused the code exchange, or the portal could not be read | Start the connect again; contact support if it repeats. |
| Deals option locked on the consent screen | A HubSpot admin approved the app without its optional deal permission | In HubSpot, open Settings > Integrations > Connected Apps > Approved apps > Zernio > Manage access > Data Permissions, enable deals, save, then connect again. |
503 on GET /v1/connect/hubspot | HubSpot is not configured on this Zernio environment | Contact support. |