Skip to main content
Use the HubSpot sync endpoints to start a sync after OAuth, inspect sync progress, and discover available HubSpot deal stages for filtering.

POST /api/integrations/hubspot/sync

Starts the HubSpot initial sync for an organization.

Request body

FieldTypeRequiredDescription
organization_uidstringNoOrganization to sync. Falls back to the current user’s default organization.
deal_stagesstring[]NoRestricts the sync to deals whose dealstage matches one of the provided HubSpot stage IDs. If omitted, all deal stages are eligible.
modestringNoSync mode. Use full to create Exante objects, or catalog_only to populate ExternalObjectCatalog entries without creating Documents, Parties, or Contacts. Defaults to full.

Example

{
  "organization_uid": "00000000-0000-0000-0000-000000000000",
  "deal_stages": ["closedwon", "contractsent"],
  "mode": "catalog_only"
}

Behavior

  • Returns early with skipped: true and reason: sync_in_progress when any HubSpot object sync is already running.
  • In full mode, Exante syncs deals first, then the companies associated with those deals, then the contacts for those companies.
  • In catalog_only mode, Exante records discovered deals, companies, and contacts in ExternalObjectCatalog only.

GET /api/integrations/hubspot/sync/status

Returns the current HubSpot sync state for companies, contacts, and deals.

Query params

FieldTypeRequiredDescription
organization_uidstringNoOrganization to inspect. Falls back to the current user’s default organization.

Response shape

{
  "organization_uid": "00000000-0000-0000-0000-000000000000",
  "companies": {
    "status": "completed",
    "total_synced": 10,
    "total_skipped": 2
  },
  "contacts": {
    "status": "syncing",
    "total_synced": 4
  },
  "deals": {
    "status": "failed",
    "error_message": "example failure"
  }
}

GET /api/integrations/hubspot/sync/stages

Lists all HubSpot deal pipelines and stages available to the connected organization.

Query params

FieldTypeRequiredDescription
organization_uidstringNoOrganization to inspect. Falls back to the current user’s default organization.

Response shape

{
  "pipelines": [
    {
      "id": "default",
      "label": "Sales Pipeline",
      "stages": [
        {
          "id": "appointmentscheduled",
          "label": "Appointment Scheduled",
          "display_order": 0
        },
        {
          "id": "closedwon",
          "label": "Closed Won",
          "display_order": 5
        }
      ]
    }
  ]
}
Use the stage id values from this endpoint when populating the deal_stages filter on the sync request.