hubspot
HubSpot CRM and CMS API integration for contacts, companies, deals, owners.
Installation
npx clawhub@latest install hubspotView the full skill documentation and source below.
Documentation
HubSpot Skill
Interact with HubSpot CRM and CMS via the REST API.
Setup
Set your HubSpot Private App access token:
HUBSPOT_ACCESS_TOKEN=pat-na2-xxxxx
API Base
All endpoints use:
Authorization header: Bearer $HUBSPOT_ACCESS_TOKEN
---
## CRM Objects
### Contacts
**Create contact:**
__CODE_BLOCK_1__
**List contacts:**
__CODE_BLOCK_2__
**Search contacts:**
__CODE_BLOCK_3__
**Get contact by ID:**
__CODE_BLOCK_4__
**Get contact by email:**
__CODE_BLOCK_5__
### Companies
**List companies:**
__CODE_BLOCK_6__
**Search companies:**
__CODE_BLOCK_7__
**Get company by ID:**
__CODE_BLOCK_8__
### Deals
**Create deal:**
__CODE_BLOCK_9__
**List deals:**
__CODE_BLOCK_10__
**Search deals:**
__CODE_BLOCK_11__
**Get deal by ID:**
__CODE_BLOCK_12__
### Owners
**List owners (users):**
__CODE_BLOCK_13__
---
## Update & Assign Owner
**Update contact properties:**
__CODE_BLOCK_14__
**Assign owner to contact:**
__CODE_BLOCK_15__
**Assign owner to deal:**
__CODE_BLOCK_16__
---
## Associations
**Get associated contacts for a company:**
__CODE_BLOCK_17__
**Get associated deals for a contact:**
__CODE_BLOCK_18__
**Create association (deal to contact):**
__CODE_BLOCK_19__
Common association type IDs:
- 3: Deal to Contact
- 5: Deal to Company
- 1: Contact to Company
---
## Properties (Schema)
**List contact properties:**
__CODE_BLOCK_20__
**List company properties:**
__CODE_BLOCK_21__
**List deal properties:**
__CODE_BLOCK_22__
---
## CMS
### Pages
**List site pages:**
__CODE_BLOCK_23__
**List landing pages:**
__CODE_BLOCK_24__
### Domains
**List domains:**
__CODE_BLOCK_25__
---
## Files
**List files:**
__CODE_BLOCK_26__
**Search files:**
__CODE_BLOCK_27__
---
## Search Operators
For search endpoints, use these operators in filters:
| Operator | Description |
|----------|-------------|
| EQ | Equal to |
| NEQ | Not equal to |
| LT | Less than |
| LTE | Less than or equal |
| GT | Greater than |
| GTE | Greater than or equal |
| CONTAINS_TOKEN | Contains word |
| NOT_CONTAINS_TOKEN | Does not contain word |
| HAS_PROPERTY | Has a value |
| NOT_HAS_PROPERTY | Does not have a value |
---
## PowerShell Examples
For Windows/PowerShell, use Invoke-RestMethod:
__CODE_BLOCK_28__
---
## Notes
- Full CRUD operations supported with appropriate scopes
- Rate limits: 100 requests per 10 seconds for private apps
- Pagination: Use after parameter from paging.next.after for next page
- Portal ID is in the record URL: