Zernio
APIFor you
Zernio
APIFor you
Platforms

HubSpot

Overview

Set up

Connect

Messaging

Inbox sync

Reference

Limits & errors
Dashboard
OverviewPlatformsAPI ReferenceResources
HubSpot

Connect

Install the Zernio app on a HubSpot portal to connect it to a profile, from the dashboard or with the connect API.


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

Both settings start on. Turn either off with PATCH /v1/accounts/{accountId}/hubspot-settings:

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. Read the current values with GET /v1/accounts/{accountId}/hubspot-settings.

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 both settings on.
  • 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

ErrorCauseFix
hubspot_profile_has_portal on the redirectThe profile already has a different portal connectedDisconnect it first, or connect this portal to another profile.
hubspot_access_denied on the redirectThe user declined the app in HubSpotStart the connect again and approve the app.
hubspot_invalid_state on the redirectThe link expired or was already usedRequest a fresh authUrl.
hubspot_connection_failed on the redirectHubSpot refused the code exchange, or the portal could not be readStart the connect again; contact support if it repeats.
503 on GET /v1/connect/hubspotHubSpot is not configured on this Zernio environmentContact support.

Related

  • Get HubSpot connect URL
  • Get HubSpot settings
  • Update HubSpot settings
Was this page helpful?

HubSpot

Connect a HubSpot portal so the people in your Zernio inbox become HubSpot contacts and their messages appear on each contact's timeline.

Inbox sync

How Zernio matches inbox contacts to HubSpot contacts and logs every inbox message on the contact's HubSpot timeline.

On this page

Connect a HubSpot portalChange what syncsHow it behavesIf it failsRelated