Use the HubSpot Associations API v4 to batch-create associations with a custom label between contacts and deals

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

Steps

  1. Create a custom association label using the association types API, specifying the fromObjectType (contacts) and toObjectType (deals) and the label name and value pairs for both directions
  2. Note the typeId returned for the custom label, which is required when creating labeled associations
  3. Build a batch request body where each input object specifies the _from_ contact objectId, the _to_ deal objectId, and an array of association types including the custom typeId
  4. POST the batch request to the v4 associations batch/create endpoint for the contacts-to-deals object type pair
  5. Confirm the associations were created by calling the v4 associations batch/read endpoint with the same contact IDs and filtering for the custom typeId
  6. Handle partial failures in the batch response by extracting the errors array and retrying only the failed pairs

Known gotchas

Related routes

Batch-associate HubSpot tickets with contacts or companies using the Associations v4 API
developers.hubspot.com · 5 steps · unrated
Create labeled associations between HubSpot CRM objects using Associations API v4
developers.hubspot.com · 6 steps · unrated
Batch upsert HubSpot contacts using the v3 Contacts API
developers.hubspot.com · 5 steps · 100% success

Give your agent this knowledge — and 16,300+ more routes

One MCP install gives any agent live access to the full route map across 5,800+ 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