Install any skill in seconds. Free to start, no credit card required.
Get Started Free →HubSpot CRM and CMS API integration for contacts, companies, deals, owners, and content management.
.claude/skills/sundial-org-hubspot/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 199% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 198% | 0% |
| case-07 | ✗→✓ | ▲ Improved | 133% | 0% |
| case-17 | ✗→✓ | ▲ Improved | 141% | 0% |
| case-19 | ✗→✓ | ▲ Improved | 153% | 0% |
Interact with HubSpot CRM and CMS via the REST API.
Set your HubSpot Private App access token:
HUBSPOT_ACCESS_TOKEN=pat-na2-xxxxxAll endpoints use: https://api.hubapi.com
Authorization header: Bearer $HUBSPOT_ACCESS_TOKEN
Create contact:
bashcurl -s -X POST -H "Authorization: Bearer $HUBSPOT_ACCESS_TOKEN" \ -H "Content-Type: application/json" \ -d '{"properties":{"email":"test@example.com","firstname":"Test","lastname":"User","phone":"555-1234","company":"Acme Inc","jobtitle":"Manager"}}' \ "https://api.hubapi.com/crm/v3/objects/contacts" | jq
List contacts:
bashcurl -s -H "Authorization: Bearer $HUBSPOT_ACCESS_TOKEN" \ "https://api.hubapi.com/crm/v3/objects/contacts?limit=10" | jq
Search contacts:
bashcurl -s -X POST -H "Authorization: Bearer $HUBSPOT_ACCESS_TOKEN" \ -H "Content-Type: application/json" \ -d '{"filterGroups":[{"filters":[{"propertyName":"email","operator":"CONTAINS_TOKEN","value":"example.com"}]}],"limit":10}' \ "https://api.hubapi.com/crm/v3/objects/contacts/search" | jq
Get contact by ID:
bashcurl -s -H "Authorization: Bearer $HUBSPOT_ACCESS_TOKEN" \ "https://api.hubapi.com/crm/v3/objects/contacts/{contactId}?properties=email,firstname,lastname,phone,company" | jq
Get contact by email:
bashcurl -s -H "Authorization: Bearer $HUBSPOT_ACCESS_TOKEN" \ "https://api.hubapi.com/crm/v3/objects/contacts/{email}?idProperty=email" | jq
List companies:
bashcurl -s -H "Authorization: Bearer $HUBSPOT_ACCESS_TOKEN" \ "https://api.hubapi.com/crm/v3/objects/companies?limit=10&properties=name,domain,industry" | jq
Search companies:
bashcurl -s -X POST -H "Authorization: Bearer $HUBSPOT_ACCESS_TOKEN" \ -H "Content-Type: application/json" \ -d '{"filterGroups":[{"filters":[{"propertyName":"name","operator":"CONTAINS_TOKEN","value":"acme"}]}],"limit":10}' \ "https://api.hubapi.com/crm/v3/objects/companies/search" | jq
Get company by ID:
bashcurl -s -H "Authorization: Bearer $HUBSPOT_ACCESS_TOKEN" \ "https://api.hubapi.com/crm/v3/objects/companies/{companyId}?properties=name,domain,industry,numberofemployees" | jq
Create deal:
bashcurl -s -X POST -H "Authorization: Bearer $HUBSPOT_ACCESS_TOKEN" \ -H "Content-Type: application/json" \ -d '{"properties":{"dealname":"New Deal","amount":"10000","closedate":"2026-06-01","description":"Deal notes here"}}' \ "https://api.hubapi.com/crm/v3/objects/deals" | jq
List deals:
bashcurl -s -H "Authorization: Bearer $HUBSPOT_ACCESS_TOKEN" \ "https://api.hubapi.com/crm/v3/objects/deals?limit=10&properties=dealname,amount,dealstage,closedate" | jq
Search deals:
bashcurl -s -X POST -H "Authorization: Bearer $HUBSPOT_ACCESS_TOKEN" \ -H "Content-Type: application/json" \ -d '{"filterGroups":[{"filters":[{"propertyName":"dealstage","operator":"EQ","value":"closedwon"}]}],"limit":10}' \ "https://api.hubapi.com/crm/v3/objects/deals/search" | jq
Get deal by ID:
bashcurl -s -H "Authorization: Bearer $HUBSPOT_ACCESS_TOKEN" \ "https://api.hubapi.com/crm/v3/objects/deals/{dealId}?properties=dealname,amount,dealstage,closedate,pipeline" | jq
List owners (users):
bashcurl -s -H "Authorization: Bearer $HUBSPOT_ACCESS_TOKEN" \ "https://api.hubapi.com/crm/v3/owners" | jq
Update contact properties:
bashcurl -s -X PATCH -H "Authorization: Bearer $HUBSPOT_ACCESS_TOKEN" \ -H "Content-Type: application/json" \ -d '{"properties":{"phone":"555-9999","jobtitle":"Director"}}' \ "https://api.hubapi.com/crm/v3/objects/contacts/{contactId}" | jq
Assign owner to contact:
bashcurl -s -X PATCH -H "Authorization: Bearer $HUBSPOT_ACCESS_TOKEN" \ -H "Content-Type: application/json" \ -d '{"properties":{"hubspot_owner_id":"{ownerId}"}}' \ "https://api.hubapi.com/crm/v3/objects/contacts/{contactId}" | jq
Assign owner to deal:
bashcurl -s -X PATCH -H "Authorization: Bearer $HUBSPOT_ACCESS_TOKEN" \ -H "Content-Type: application/json" \ -d '{"properties":{"hubspot_owner_id":"{ownerId}"}}' \ "https://api.hubapi.com/crm/v3/objects/deals/{dealId}" | jq
Get associated contacts for a company:
bashcurl -s -H "Authorization: Bearer $HUBSPOT_ACCESS_TOKEN" \ "https://api.hubapi.com/crm/v4/objects/companies/{companyId}/associations/contacts" | jq
Get associated deals for a contact:
bashcurl -s -H "Authorization: Bearer $HUBSPOT_ACCESS_TOKEN" \ "https://api.hubapi.com/crm/v4/objects/contacts/{contactId}/associations/deals" | jq
Create association (deal to contact):
bashcurl -s -X POST -H "Authorization: Bearer $HUBSPOT_ACCESS_TOKEN" \ -H "Content-Type: application/json" \ -d '{"inputs":[{"from":{"id":"{dealId}"},"to":{"id":"{contactId}"},"types":[{"associationCategory":"HUBSPOT_DEFINED","associationTypeId":3}]}]}' \ "https://api.hubapi.com/crm/v4/associations/deals/contacts/batch/create" | jq
Common association type IDs:
List contact properties:
bashcurl -s -H "Authorization: Bearer $HUBSPOT_ACCESS_TOKEN" \ "https://api.hubapi.com/crm/v3/properties/contacts" | jq '.results[].name'
List company properties:
bashcurl -s -H "Authorization: Bearer $HUBSPOT_ACCESS_TOKEN" \ "https://api.hubapi.com/crm/v3/properties/companies" | jq '.results[].name'
List deal properties:
bashcurl -s -H "Authorization: Bearer $HUBSPOT_ACCESS_TOKEN" \ "https://api.hubapi.com/crm/v3/properties/deals" | jq '.results[].name'
List site pages:
bashcurl -s -H "Authorization: Bearer $HUBSPOT_ACCESS_TOKEN" \ "https://api.hubapi.com/cms/v3/pages/site-pages?limit=10" | jq
List landing pages:
bashcurl -s -H "Authorization: Bearer $HUBSPOT_ACCESS_TOKEN" \ "https://api.hubapi.com/cms/v3/pages/landing-pages?limit=10" | jq
List domains:
bashcurl -s -H "Authorization: Bearer $HUBSPOT_ACCESS_TOKEN" \ "https://api.hubapi.com/cms/v3/domains" | jq
List files:
bashcurl -s -H "Authorization: Bearer $HUBSPOT_ACCESS_TOKEN" \ "https://api.hubapi.com/files/v3/files?limit=10" | jq
Search files:
bashcurl -s -H "Authorization: Bearer $HUBSPOT_ACCESS_TOKEN" \ "https://api.hubapi.com/files/v3/files/search?name=logo" | jq
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 |
For Windows/PowerShell, use Invoke-RestMethod:
powershell$headers = @{ "Authorization" = "Bearer $env:HUBSPOT_ACCESS_TOKEN" "Content-Type" = "application/json" } # List contacts Invoke-RestMethod -Uri "https://api.hubapi.com/crm/v3/objects/contacts?limit=10" -Headers $headers # Search contacts $body = @{ filterGroups = @(@{ filters = @(@{ propertyName = "email" operator = "CONTAINS_TOKEN" value = "example.com" }) }) limit = 10 } | ConvertTo-Json -Depth 5 Invoke-RestMethod -Method POST -Uri "https://api.hubapi.com/crm/v3/objects/contacts/search" -Headers $headers -Body $body
after parameter from paging.next.after for next pagehttps://app-na2.hubspot.com/contacts/{portalId}/record/...Other measured skills in the registry, with their headline benchmark lift.