HubSpot organizes a large surface around two central domains you will use most: CRM objects (contacts, companies, deals, tickets, custom objects, etc.) and the platform resources that reference them (lists, properties, pipelines, associations, files, marketing assets, events, apps). Understanding how those domains link and which IDs each operation needs makes most user requests straightforward.
High-level organization and key identifiers
HubSpot groups resources by service area and by object type. The patterns you rely on are:
- CRM object operations are namespaced under
/crm/v3/objects(create/read/update/delete/search) and accept both standard object types (e.g.contacts,companies,deals) and custom object type IDs like0-1,0-3,0-162. When you see a path parameter namedobjectTypeit expects the object type string (or type id) used throughout the CRM endpoints. - Associations are a distinct concept from objects. Creating or removing links between objects uses dedicated association endpoints (v3 and v4). v4 association endpoints return labeled association lists and are the go-to when you need association labels or batch operations.
- Lists have their own notion of ID (ILS IDs). Legacy list IDs exist; use the id-mapping endpoints when needed. List membership and membership-management endpoints are separate and commonly used when synchronizing contacts to lists.
- Many resources exist in both single and batch forms (for create/read/update/upsert). Prefer batch endpoints when the user asks to process many records at once.
Common identifiers you will repeatedly need
objectTypeandobjectId— object type (e.g.contactsor0-1) and its id. Many read/update/delete endpoints require both.listId— an ILS list id used by list membership endpoints. Legacy list ids can be translated using the id-mapping endpoint.campaignGuid— marketing campaign UUIDs used by marketing endpoints.appId— numeric ID for app-scoped resources (media-bridge, custom actions, feature flags, timeline event templates).portalId— Hub (account) id used for account-level feature flag state and some settings.fileId,folderId,path— files can be accessed by id or by path; some file endpoints accept the environment (draft/published) plus apathparameter.externalEventIdvsobjectId(marketing events) — externalEventId references the event in an external system, whileobjectIdis HubSpot’s internal id.token,access tokenandrefresh tokenappear in OAuth/token endpoints and in SMTP/token management.
Entry points — what to call first to get the IDs you need
Start with these reads when you need IDs to act on other resources:
- Get account and portal info:
GET /account-info/v3/detailsto understand account metadata and to findportalIdwhen needed. - Owners:
GET /crm/v3/ownersto find anownerIdfor assigning records. - Object schemas and properties:
GET /crm-object-schemas/v3/schemas_getAllorGET /crm/v3/properties/{objectType}to discover field names and canonicalobjectTypevalues (especially for custom objects). - Lists:
GET /crm/v3/lists/_getAllorGET /crm/v3/lists/{listId}/ id-mapping to find ILSlistIdand to translate legacy ids. - Search endpoints:
POST /crm/v3/objects/{objectType}/searchandPOST /crm/v3/objects/contacts/searchare the practical way to find records by email, name, or other properties when you don’t already have an id. - Files:
GET /files/v3/files/{fileId}orGET /files/v3/files/stat/{path}to map file paths to ids;POST /files/v3/files_uploadreturns afileIdfor new uploads.
Use these reads first so you can supply objectId, listId, appId, fileId, campaignGuid in subsequent calls.
Common real-world workflows and the sequence of operations
Below are patterns you’ll use to satisfy typical user requests.
Create or update a CRM record (contact/company/deal)
- If the user gives an email or external id: use
POST /crm/v3/objects/{objectType}/search(or contact-specific search) to find anobjectId. - If not found and the user wants creation:
POST /crm/v3/objects/{objectType}to create. - To change fields:
PATCH /crm/v3/objects/{objectType}/{objectId}(orPUTreplace where available); supplyidPropertywhen you intend to address records by a unique property instead of id. - For many records at once, use batch endpoints (
POST /crm/v3/objects/{objectType}/batch/create//batch/upsert).
Linking objects (associations)
- To list associations from an object:
GET /crm/v3/objects/{objectType}/{objectId}/associations/{toObjectType}(v3) orGET /crm/v4/objects/{objectType}/{objectId}/associations/{toObjectType}(v4). UseincludeFA=truewhen you need full associated objects rather than only ids. - To create a single association:
PUT /crm/objects/v3/{objectType}/{objectId}/associations/{toObjectType}/{toObjectId}/{associationType}(v3 style) orPUT /crm/v4/objects/{objectType}/{objectId}/associations/{toObjectType}/{toObjectId}(v4). Use the v4 batch endpoints when associating many pairs. - Association labels and limits: use the association definitions endpoints to inspect available labels and to create custom-label configurations.
Manage list membership
- To create a list:
POST /crm/v3/lists/_create. - To add/remove members: use
PUT /crm/v3/lists/{listId}/memberships/add_add,remove_remove, oradd-and-remove_addAndRemovefor atomic add/remove operations. For bulk operations prefer batch endpoints or the memberships bulk endpoints. - Use
GET /crm/v3/lists/{listId}/memberships_getPageto view members. - Important:
listIdhere is the ILS id; translate legacy ids with the id-mapping endpoints if needed.
Files and signed access
- Upload:
POST /files/v3/files_uploadreturns afileId. - Metadata:
GET /files/v3/files/{fileId}orGET /files/v3/files/stat/{path}. - Private files: request a signed URL via
GET /files/v3/files/{fileId}/signed-url_getSignedUrlwithexpirationSeconds.
Imports and exports (asynchronous)
- Start import/export:
POST /crm/v3/imports/_createorPOST /crm/v3/exports/export/async_start. - These return an id or task; check status with the task/status endpoints such as
GET /crm/v3/exports/export/async/tasks/{taskId}/status_getStatus. Treat 202-style flows as long-running and poll the provided status endpoint.
Marketing emails, campaigns, and events
- Campaigns use
campaignGuid(UUID). UseGET /marketing/v3/campaigns/andGET /marketing/v3/campaigns/{campaignGuid}to locate campaign data and assets. - Marketing events have two ids:
externalEventId(external system) andobjectId(HubSpot). Many event endpoints accept anexternalAccountIdquery parameter when operating by external id; when you have objectId, use the object-specific endpoints. - To upsert events from an external system:
PUT /marketing/v3/marketing-events/events/{externalEventId}_upsert(passexternalAccountIdin queries when required). - For attendance/participation changes, use the event attendance endpoints keyed by
externalEventIdorobjectIddepending on context.
Feature flags and app-scoped resources
- App-scoped (feature-flags, action definitions, timeline templates, media-bridge) use
appId. Many operations require a numericappIdand will only operate on app-owned resources. - Account-level flag state uses
portalIdand can be listed, set, or cleared via the portals endpoints under feature-flags. Batch portals endpoints exist for mass changes.
Scheduler / meetings
- Meeting pages are identified by
slug. Booking requirestimezoneand often expects additional payload fields; availability queries requireslugandtimezone.
Non-obvious patterns and gotchas
These are the recurring pitfalls that are not obvious from raw signatures.
-
Archive vs delete vs GDPR-delete
- Many delete endpoints are soft-deletes and are labeled
_archivein the path. MostGETendpoints acceptarchived(default false) to include archived records. There are separate GDPR-delete endpoints for irrevocable deletion.
- Many delete endpoints are soft-deletes and are labeled
-
idPropertyexists on many CRM read/update endpoints- You can supply
idPropertyto operate on a record by a unique property (for exampleemailfor contacts) instead of the internalobjectId. Use this when the caller only supplies an external unique key.
- You can supply
-
Two association APIs (v3 vs v4)
- v4 association endpoints return labeled association collections and support larger-batch operations with a
limitdefault of 500. Use v4 when you need labels or multi-association responses. Use v3-style endpoints when working with the older association patterns or when code paths already expect that shape.
- v4 association endpoints return labeled association collections and support larger-batch operations with a
-
Lists and list IDs
- The list APIs use an ILS
listId. Legacy list ids exist; translate them viaGET /crm/v3/lists/idmapping_translateLegacyListIdToListIdor the batch translation endpoint.
- The list APIs use an ILS
-
Batch endpoints are the norm for scale
- For bulk creation, updates, or deletes use the
/batchorsearchendpoints rather than looping single-item endpoints. Many batch endpoints return a batch response wrapper with individual item results.
- For bulk creation, updates, or deletes use the
-
archivedfiltering and default limits- Most listing endpoints default to
archived=false. Many list endpoints also have conservative defaultlimitvalues; if the user asks for “all” records, you must page through results (use the paging cursor values returned by the API). Note some endpoints cap the maximumlimit(e.g., lists membership endpoints cap at 250 for certain calls).
- Most listing endpoints default to
-
Async flows use task ids and separate status endpoints
- Imports, exports, and some file extract operations return a task id; you must call the paired status endpoint for completion info (the operations expose explicit status endpoints that return URLs or results once done).
-
Files: path vs id vs environment
- Files can be manipulated by
pathwithin an environment (draftorpublished) or byfileId. When creating/updating CMS source files, include the environment in the path-based endpoints.
- Files can be manipulated by
-
Marketing events: external vs internal ids
- Many operations accept
externalEventIdtogether withexternalAccountIdfor the upstream system mapping. When in doubt, use the objectId endpoints when you already have HubSpot's internal id.
- Many operations accept
-
Many app-scoped resources require numeric
appId- Media bridge schemas, timeline templates, custom action definitions, and feature flags all require
appId. If a user references an app resource by name, find the numeric id first.
- Media bridge schemas, timeline templates, custom action definitions, and feature flags all require
-
Revisions and drafts
- Content (blogs, landing pages, site pages, marketing emails) has explicit draft and revision endpoints. To publish, push a draft live via dedicated
push-liveendpoints rather than patching the published resource directly.
- Content (blogs, landing pages, site pages, marketing emails) has explicit draft and revision endpoints. To publish, push a draft live via dedicated
-
Property validations and groups
- Property validation is detailed and typed by
ruleType. When updating or creating properties, check the property groups and validation rules first to avoid creating properties that fail later usage.
- Property validation is detailed and typed by
Prioritized checklist for common user requests
Use this mental checklist to pick endpoints and parameters for typical requests.
-
"Find a contact by email and update a field"
- Search contacts:
POST /crm/v3/objects/contacts/search(query by email) → extractcontactId. - Patch contact:
PATCH /crm/v3/objects/contacts/{contactId}(oridProperty=email) with the update body.
- Search contacts:
-
"Add contacts X, Y to list L"
- Ensure list exists:
GET /crm/v3/lists/{listId}(or create viaPOST /crm/v3/lists/_create). - Add members:
PUT /crm/v3/lists/{listId}/memberships/add_addor use batch upsert on contacts thenadd_add.
- Ensure list exists:
-
"Create a new company and associate lead contacts"
- Create company:
POST /crm/v3/objects/companies→companyId. - Create or find contacts.
- Create associations:
PUT /crm/v4/objects/{fromObjectType}/{fromObjectId}/associations/{toObjectType}/{toObjectId}(or use batch association endpoint for multiple pairs).
- Create company:
-
"Upload a file and give a signed URL"
- Upload:
POST /files/v3/files_upload→fileId. - Signed URL:
GET /files/v3/files/{fileId}/signed-url_getSignedUrlwithexpirationSeconds.
- Upload:
-
"Start an export and retrieve the download link"
- Start export:
POST /crm/v3/exports/export/async_start→ gets anexportId/task id. - Poll:
GET /crm/v3/exports/export/async/tasks/{taskId}/status_getStatusto receive the downloaduriwhen ready.
- Start export:
What to check in responses (practical cues)
- Search and batch responses often return paging tokens (
paging.next.after) — use these tokens to request the next page if the user asked for more than the current page. - Export/import/task responses return a task id; the paired status endpoint is the only way to get the final file URL or error details.
- Batch endpoints return per-item results; inspect these for partial failures rather than assuming the batch succeeded wholesale.
- When updating properties or schema, the API may return the created/updated schema — use that to validate the created fields.
When to prefer one endpoint family over another
- Use CRM v3 object endpoints for standard CRUD, search, and batch object operations.
- Use CRM v4 association endpoints when you need labeled associations or large association pages (v4 supports larger default limits and label-aware responses).
- Use the marketing and CMS-specific endpoints for marketing emails, campaigns, events, blogs, pages, and file/source-code operations — these resources have their own drafts, revisions, and publish flows.
Keep this mental model: find the ID you need (owner, objectId, listId, appId, campaignGuid, fileId), then call the domain endpoint that performs the action (object CRUD, association, list membership, file upload, publish/push-live). The API separates identity discovery (search, list, or schema endpoints) from the state-changing endpoints (create/patch/put/post/delete/archive), and many bulk operations exist to avoid repeated single-item calls.