Files
openclaw-workspace/skills/api-gateway/references/hubspot.md
2026-04-11 09:45:12 -05:00

9.8 KiB

HubSpot Routing Reference

App name: hubspot Base URL proxied: api.hubapi.com

API Path Pattern

/hubspot/crm/v3/objects/{objectType}/{endpoint}

Common Endpoints

Contacts

List Contacts

GET /hubspot/crm/v3/objects/contacts?limit=100

With properties:

GET /hubspot/crm/v3/objects/contacts?limit=100&properties=email,firstname,lastname,phone

With pagination:

GET /hubspot/crm/v3/objects/contacts?limit=100&properties=email,firstname&after={cursor}

Get Contact

GET /hubspot/crm/v3/objects/contacts/{contactId}?properties=email,firstname,lastname

Create Contact

POST /hubspot/crm/v3/objects/contacts
Content-Type: application/json

{
  "properties": {
    "email": "john@example.com",
    "firstname": "John",
    "lastname": "Doe",
    "phone": "+1234567890"
  }
}

Update Contact

PATCH /hubspot/crm/v3/objects/contacts/{contactId}
Content-Type: application/json

{
  "properties": {
    "phone": "+0987654321"
  }
}

Delete Contact

DELETE /hubspot/crm/v3/objects/contacts/{contactId}

Search Contacts

POST /hubspot/crm/v3/objects/contacts/search
Content-Type: application/json

{
  "filterGroups": [{
    "filters": [{
      "propertyName": "email",
      "operator": "EQ",
      "value": "john@example.com"
    }]
  }],
  "properties": ["email", "firstname", "lastname"]
}

Companies

List Companies

GET /hubspot/crm/v3/objects/companies?limit=100&properties=name,domain,industry

Get Company

GET /hubspot/crm/v3/objects/companies/{companyId}?properties=name,domain,industry

Create Company

POST /hubspot/crm/v3/objects/companies
Content-Type: application/json

{
  "properties": {
    "name": "Acme Corp",
    "domain": "acme.com",
    "industry": "COMPUTER_SOFTWARE"
  }
}

Note: The industry property requires specific enum values (e.g., COMPUTER_SOFTWARE, FINANCE, HEALTHCARE), not free text like "Technology". Use the List Properties endpoint to get valid values.

Update Company

PATCH /hubspot/crm/v3/objects/companies/{companyId}
Content-Type: application/json

{
  "properties": {
    "industry": "COMPUTER_SOFTWARE",
    "numberofemployees": "50"
  }
}

Delete Company

DELETE /hubspot/crm/v3/objects/companies/{companyId}

Search Companies

POST /hubspot/crm/v3/objects/companies/search
Content-Type: application/json

{
  "filterGroups": [{
    "filters": [{
      "propertyName": "domain",
      "operator": "CONTAINS_TOKEN",
      "value": "*"
    }]
  }],
  "properties": ["name", "domain"],
  "limit": 10
}

Deals

List Deals

GET /hubspot/crm/v3/objects/deals?limit=100&properties=dealname,amount,dealstage

Get Deal

GET /hubspot/crm/v3/objects/deals/{dealId}?properties=dealname,amount,dealstage

Create Deal

POST /hubspot/crm/v3/objects/deals
Content-Type: application/json

{
  "properties": {
    "dealname": "New Deal",
    "amount": "10000",
    "dealstage": "appointmentscheduled"
  }
}

Update Deal

PATCH /hubspot/crm/v3/objects/deals/{dealId}
Content-Type: application/json

{
  "properties": {
    "amount": "15000",
    "dealstage": "qualifiedtobuy"
  }
}

Delete Deal

DELETE /hubspot/crm/v3/objects/deals/{dealId}

Search Deals

POST /hubspot/crm/v3/objects/deals/search
Content-Type: application/json

{
  "filterGroups": [{
    "filters": [{
      "propertyName": "amount",
      "operator": "GTE",
      "value": "1000"
    }]
  }],
  "properties": ["dealname", "amount", "dealstage"],
  "limit": 10
}

Associations (v4 API)

Associate Objects

PUT /hubspot/crm/v4/objects/{fromObjectType}/{fromObjectId}/associations/{toObjectType}/{toObjectId}
Content-Type: application/json

[{"associationCategory": "HUBSPOT_DEFINED", "associationTypeId": 279}]

Common association type IDs:

  • 279 - Contact to Company
  • 3 - Deal to Contact
  • 341 - Deal to Company

List Associations

GET /hubspot/crm/v4/objects/{objectType}/{objectId}/associations/{toObjectType}

Batch Operations

Batch Read

POST /hubspot/crm/v3/objects/{objectType}/batch/read
Content-Type: application/json

{
  "properties": ["email", "firstname"],
  "inputs": [{"id": "123"}, {"id": "456"}]
}

Batch Create

POST /hubspot/crm/v3/objects/{objectType}/batch/create
Content-Type: application/json

{
  "inputs": [
    {"properties": {"email": "one@example.com", "firstname": "One"}},
    {"properties": {"email": "two@example.com", "firstname": "Two"}}
  ]
}

Batch Update

POST /hubspot/crm/v3/objects/{objectType}/batch/update
Content-Type: application/json

{
  "inputs": [
    {"id": "123", "properties": {"firstname": "Updated"}},
    {"id": "456", "properties": {"firstname": "Also Updated"}}
  ]
}

Batch Archive

POST /hubspot/crm/v3/objects/{objectType}/batch/archive
Content-Type: application/json

{
  "inputs": [{"id": "123"}, {"id": "456"}]
}

Properties

List Properties

GET /hubspot/crm/v3/properties/{objectType}

Search Operators

  • EQ - Equal to
  • NEQ - Not equal to
  • LT - Less than
  • LTE - Less than or equal to
  • GT - Greater than
  • GTE - Greater than or equal to
  • CONTAINS_TOKEN - Contains token
  • NOT_CONTAINS_TOKEN - Does not contain token

Pagination

List endpoints return a paging.next.after cursor for pagination:

{
  "results": [...],
  "paging": {
    "next": {
      "after": "12345",
      "link": "https://api.hubapi.com/..."
    }
  }
}

Use the after query parameter to fetch the next page:

GET /hubspot/crm/v3/objects/contacts?limit=100&after=12345

Notes

  • Authentication is automatic - the router injects the OAuth token
  • The industry property on companies requires specific enum values
  • Batch operations support up to 100 records per request
  • Archive/Delete is a soft delete - records can be restored within 90 days
  • Delete endpoints return HTTP 204 (No Content) on success

Resources