HubSpot · Capability

HubSpot CRM Contacts API — Associations

HubSpot CRM Contacts API — Associations. 3 operations. Lead operation: Hubspot List Contact Associations. Self-contained Naftiko capability covering one Hubspot business surface.

Run with Naftiko HubspotAssociations

What You Can Do

GET
Listcontactassociations — Hubspot List Contact Associations
/v1/crm/v3/objects/contacts/{contactid}/associations/{toobjecttype}
PUT
Createcontactassociation — Hubspot Create a Contact Association
/v1/crm/v3/objects/contacts/{contactid}/associations/{toobjecttype}/{toobjectid}/{associationtype}
DELETE
Deletecontactassociation — Hubspot Delete a Contact Association
/v1/crm/v3/objects/contacts/{contactid}/associations/{toobjecttype}/{toobjectid}/{associationtype}

MCP Tools

hubspot-list-contact-associations

Hubspot List Contact Associations

read-only idempotent
hubspot-create-contact-association

Hubspot Create a Contact Association

idempotent
hubspot-delete-contact-association

Hubspot Delete a Contact Association

idempotent

Capability Spec

crm-contacts-associations.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: HubSpot CRM Contacts API — Associations
  description: 'HubSpot CRM Contacts API — Associations. 3 operations. Lead operation: Hubspot List Contact Associations.
    Self-contained Naftiko capability covering one Hubspot business surface.'
  tags:
  - Hubspot
  - Associations
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    HUBSPOT_API_KEY: HUBSPOT_API_KEY
capability:
  consumes:
  - type: http
    namespace: crm-contacts-associations
    baseUri: https://api.hubapi.com
    description: HubSpot CRM Contacts API — Associations business capability. Self-contained, no shared references.
    resources:
    - name: crm-v3-objects-contacts-contactId-associations-toObjectType
      path: /crm/v3/objects/contacts/{contactId}/associations/{toObjectType}
      operations:
      - name: listcontactassociations
        method: GET
        description: Hubspot List Contact Associations
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: contactId
          in: path
          type: string
          description: The ID of the contact.
          required: true
        - name: toObjectType
          in: path
          type: string
          description: The type of associated object (e.g., companies, deals, tickets).
          required: true
    - name: crm-v3-objects-contacts-contactId-associations-toObjectType-toObjectId-associati
      path: /crm/v3/objects/contacts/{contactId}/associations/{toObjectType}/{toObjectId}/{associationType}
      operations:
      - name: createcontactassociation
        method: PUT
        description: Hubspot Create a Contact Association
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: contactId
          in: path
          type: string
          description: The ID of the contact.
          required: true
        - name: toObjectType
          in: path
          type: string
          description: The type of the object to associate with.
          required: true
        - name: toObjectId
          in: path
          type: string
          description: The ID of the object to associate with.
          required: true
        - name: associationType
          in: path
          type: string
          description: The type of association to create.
          required: true
      - name: deletecontactassociation
        method: DELETE
        description: Hubspot Delete a Contact Association
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: contactId
          in: path
          type: string
          description: The ID of the contact.
          required: true
        - name: toObjectType
          in: path
          type: string
          description: The type of the associated object.
          required: true
        - name: toObjectId
          in: path
          type: string
          description: The ID of the associated object.
          required: true
        - name: associationType
          in: path
          type: string
          description: The type of association to delete.
          required: true
    authentication:
      type: bearer
      token: '{{env.HUBSPOT_API_KEY}}'
  exposes:
  - type: rest
    namespace: crm-contacts-associations-rest
    port: 8080
    description: REST adapter for HubSpot CRM Contacts API — Associations. One Spectral-compliant resource per consumed operation,
      prefixed with /v1.
    resources:
    - path: /v1/crm/v3/objects/contacts/{contactid}/associations/{toobjecttype}
      name: crm-v3-objects-contacts-contactid-associations-toobjecttype
      description: REST surface for crm-v3-objects-contacts-contactId-associations-toObjectType.
      operations:
      - method: GET
        name: listcontactassociations
        description: Hubspot List Contact Associations
        call: crm-contacts-associations.listcontactassociations
        with:
          contactId: rest.contactId
          toObjectType: rest.toObjectType
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/crm/v3/objects/contacts/{contactid}/associations/{toobjecttype}/{toobjectid}/{associationtype}
      name: crm-v3-objects-contacts-contactid-associations-toobjecttype-toobjectid-associati
      description: REST surface for crm-v3-objects-contacts-contactId-associations-toObjectType-toObjectId-associati.
      operations:
      - method: PUT
        name: createcontactassociation
        description: Hubspot Create a Contact Association
        call: crm-contacts-associations.createcontactassociation
        with:
          contactId: rest.contactId
          toObjectType: rest.toObjectType
          toObjectId: rest.toObjectId
          associationType: rest.associationType
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: deletecontactassociation
        description: Hubspot Delete a Contact Association
        call: crm-contacts-associations.deletecontactassociation
        with:
          contactId: rest.contactId
          toObjectType: rest.toObjectType
          toObjectId: rest.toObjectId
          associationType: rest.associationType
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: crm-contacts-associations-mcp
    port: 9090
    transport: http
    description: MCP adapter for HubSpot CRM Contacts API — Associations. One tool per consumed operation, routed inline through
      this capability's consumes block.
    tools:
    - name: hubspot-list-contact-associations
      description: Hubspot List Contact Associations
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: crm-contacts-associations.listcontactassociations
      with:
        contactId: tools.contactId
        toObjectType: tools.toObjectType
      outputParameters:
      - type: object
        mapping: $.
    - name: hubspot-create-contact-association
      description: Hubspot Create a Contact Association
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: crm-contacts-associations.createcontactassociation
      with:
        contactId: tools.contactId
        toObjectType: tools.toObjectType
        toObjectId: tools.toObjectId
        associationType: tools.associationType
      outputParameters:
      - type: object
        mapping: $.
    - name: hubspot-delete-contact-association
      description: Hubspot Delete a Contact Association
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: crm-contacts-associations.deletecontactassociation
      with:
        contactId: tools.contactId
        toObjectType: tools.toObjectType
        toObjectId: tools.toObjectId
        associationType: tools.associationType
      outputParameters:
      - type: object
        mapping: $.