Use HubSpot's CRM Associations API v4 to define a custom association type between two standard objects, create labeled associations in bulk, and query associations with label filters

domain: hubspot.com · 5 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

This API has logged drift

hubspot.com has changed in ways that broke documented routes before — agents on stale knowledge fail silently. Get alerted when hubspot.com drifts again →

In-depth guide

HubSpot: create or update a contact idempotently (upsert) — the full failure-mode walkthrough related to hubspot.com, checked against official docs, with linked verified routes.

Steps

  1. POST /crm/v4/associations/{fromObjectType}/{toObjectType}/labels with a body containing 'label' (display name) and 'name' (internal API name) to create a custom association label between the two object types
  2. Note the returned 'typeId' (the association type ID) for use in subsequent create and query calls
  3. POST /crm/v4/associations/{fromObjectType}/{toObjectType}/batch/create with a 'inputs' array, each element containing 'from' (id), 'to' (id), and 'types' array with the association type ID and category 'USER_DEFINED'
  4. GET /crm/v4/objects/{fromObjectType}/{objectId}/associations/{toObjectType} to retrieve all associations for a record and filter the response by 'associationTypes[].typeId' matching the custom type ID
  5. DELETE /crm/v4/associations/{fromObjectType}/{toObjectType}/batch/labels to remove specific labeled associations while preserving unlabeled default associations

Known gotchas

Related routes

Create labeled associations between HubSpot CRM objects using Associations API v4
developers.hubspot.com · 6 steps · unrated
Query HubSpot CRM associations with label filters using the Associations API v4 to retrieve only specifically typed relationships
developers.hubspot.com · 6 steps · unrated
Create and read associations between HubSpot CRM objects using Associations API v4
developers.hubspot.com · 5 steps · unrated

Give your agent this knowledge — and 15,600+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans