Skip to content

client.crm.associations.batch.create calls wrong endpoint #6

@dgerblick

Description

@dgerblick

client.crm.associations.batch.create (both synchronous and async) is namespaced under batch but does not call a batch API endpoint. It takes individual from_object_id and to_object_id path parameters and issues a PUT to /crm/objects/2026-03/{from_object_type}/{from_object_id}/associations/default/{to_object_type}/{to_object_id}. This is endpoint for single-association "Associate records (default)", which does not appear to have an entry in hubspot_sdk/resources/crm/associations/associations.py. Other methods (delete, create_default, delete_labels, get) in the batch.py file seem to call the correct endpoints.

Expected behavior:

  • client.crm.associations.batch.create() should call the Batch Associate records (labeled) endpoint POST /crm/associations/2026-03/{fromObjectType}/{toObjectType}/batch/create
  • 'client.crm.associations.update_association_labels_default()' (or similar) should call the Associate records (default) endpoint PUT to /crm/objects/2026-03/{from_object_type}/{from_object_id}/associations/default/{to_object_type}/{to_object_id}

Relevant files: hubspot_sdk/resources/crm/associations/batch.py, hubspot_sdk/resources/crm/associations/associations.py

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions