Use HubSpot batch read and batch upsert endpoints with idProperty to read and write records by a custom unique identifier

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. Identify or create a property on the object that will serve as your external unique key, marking it as hasUniqueValue: true via the Properties API
  2. POST to /crm/v3/objects/<objectType>/batch/read with inputs containing id values and the idProperty query parameter set to your property name
  3. For upserts POST to /crm/v3/objects/<objectType>/batch/upsert with each input containing idProperty, id (the external key value), and a properties map
  4. The upsert creates the record if not found or updates it if the external key matches an existing record
  5. Check the results array in the response; each item reports its status (CREATED or UPDATED) and the resulting record
  6. Handle 207 multi-status responses by inspecting each individual result for errors alongside successes

Known gotchas

Related routes

Use the HubSpot Batch read and batch upsert endpoints to efficiently read and write custom object records by a custom unique identifier
developers.hubspot.com · 6 steps · unrated
Batch upsert HubSpot contacts using the v3 Contacts API
developers.hubspot.com · 5 steps · 100% success
Create a HubSpot custom object schema and insert records via API
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