HubSpot · Capability

HubSpot CRM Companies API — Associations

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

Run with Naftiko HubspotAssociations

What You Can Do

GET
Listcompanyassociations — Hubspot List Company Associations
/v1/crm/v3/objects/companies/{companyid}/associations/{toobjecttype}
PUT
Createcompanyassociation — Hubspot Create a Company Association
/v1/crm/v3/objects/companies/{companyid}/associations/{toobjecttype}/{toobjectid}/{associationtype}
DELETE
Deletecompanyassociation — Hubspot Delete a Company Association
/v1/crm/v3/objects/companies/{companyid}/associations/{toobjecttype}/{toobjectid}/{associationtype}

MCP Tools

hubspot-list-company-associations

Hubspot List Company Associations

read-only idempotent
hubspot-create-company-association

Hubspot Create a Company Association

idempotent
hubspot-delete-company-association

Hubspot Delete a Company Association

idempotent

Capability Spec

crm-companies-associations.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: HubSpot CRM Companies API — Associations
  description: 'HubSpot CRM Companies API — Associations. 3 operations. Lead operation: Hubspot List Company 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-companies-associations
    baseUri: https://api.hubapi.com
    description: HubSpot CRM Companies API — Associations business capability. Self-contained, no shared references.
    resources:
    - name: crm-v3-objects-companies-companyId-associations-toObjectType
      path: /crm/v3/objects/companies/{companyId}/associations/{toObjectType}
      operations:
      - name: listcompanyassociations
        method: GET
        description: Hubspot List Company Associations
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: companyId
          in: path
          type: string
          description: The ID of the company.
          required: true
        - name: toObjectType
          in: path
          type: string
          description: The type of associated object (e.g., contacts, deals, tickets).
          required: true
    - name: crm-v3-objects-companies-companyId-associations-toObjectType-toObjectId-associat
      path: /crm/v3/objects/companies/{companyId}/associations/{toObjectType}/{toObjectId}/{associationType}
      operations:
      - name: createcompanyassociation
        method: PUT
        description: Hubspot Create a Company Association
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: companyId
          in: path
          type: string
          description: The ID of the company.
          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: deletecompanyassociation
        method: DELETE
        description: Hubspot Delete a Company Association
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: companyId
          in: path
          type: string
          description: The ID of the company.
          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-companies-associations-rest
    port: 8080
    description: REST adapter for HubSpot CRM Companies API — Associations. One Spectral-compliant resource per consumed operation,
      prefixed with /v1.
    resources:
    - path: /v1/crm/v3/objects/companies/{companyid}/associations/{toobjecttype}
      name: crm-v3-objects-companies-companyid-associations-toobjecttype
      description: REST surface for crm-v3-objects-companies-companyId-associations-toObjectType.
      operations:
      - method: GET
        name: listcompanyassociations
        description: Hubspot List Company Associations
        call: crm-companies-associations.listcompanyassociations
        with:
          companyId: rest.companyId
          toObjectType: rest.toObjectType
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/crm/v3/objects/companies/{companyid}/associations/{toobjecttype}/{toobjectid}/{associationtype}
      name: crm-v3-objects-companies-companyid-associations-toobjecttype-toobjectid-associat
      description: REST surface for crm-v3-objects-companies-companyId-associations-toObjectType-toObjectId-associat.
      operations:
      - method: PUT
        name: createcompanyassociation
        description: Hubspot Create a Company Association
        call: crm-companies-associations.createcompanyassociation
        with:
          companyId: rest.companyId
          toObjectType: rest.toObjectType
          toObjectId: rest.toObjectId
          associationType: rest.associationType
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: deletecompanyassociation
        description: Hubspot Delete a Company Association
        call: crm-companies-associations.deletecompanyassociation
        with:
          companyId: rest.companyId
          toObjectType: rest.toObjectType
          toObjectId: rest.toObjectId
          associationType: rest.associationType
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: crm-companies-associations-mcp
    port: 9090
    transport: http
    description: MCP adapter for HubSpot CRM Companies API — Associations. One tool per consumed operation, routed inline
      through this capability's consumes block.
    tools:
    - name: hubspot-list-company-associations
      description: Hubspot List Company Associations
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: crm-companies-associations.listcompanyassociations
      with:
        companyId: tools.companyId
        toObjectType: tools.toObjectType
      outputParameters:
      - type: object
        mapping: $.
    - name: hubspot-create-company-association
      description: Hubspot Create a Company Association
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: crm-companies-associations.createcompanyassociation
      with:
        companyId: tools.companyId
        toObjectType: tools.toObjectType
        toObjectId: tools.toObjectId
        associationType: tools.associationType
      outputParameters:
      - type: object
        mapping: $.
    - name: hubspot-delete-company-association
      description: Hubspot Delete a Company Association
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: crm-companies-associations.deletecompanyassociation
      with:
        companyId: tools.companyId
        toObjectType: tools.toObjectType
        toObjectId: tools.toObjectId
        associationType: tools.associationType
      outputParameters:
      - type: object
        mapping: $.