Access the HubSpot CRM API with managed OAuth authentication. Create and manage contacts, companies, deals, and their associations.
Reference
List Contacts
GET /hubspot/crm/v3/objects/contacts?limit=100&properties=email,firstname,lastname,phonematon hubspot contact list --properties email,firstname,lastname,phone -L 100Get Contact
GET /hubspot/crm/v3/objects/contacts/{contactId}?properties=email,firstname,lastnamematon hubspot contact view <contactId> --properties email,firstname,lastnameCreate Contact
POST /hubspot/crm/v3/objects/contacts
Content-Type: application/json
{
"properties": {
"email": "john@example.com",
"firstname": "John",
"lastname": "Doe",
"phone": "+1234567890"
}
}maton hubspot contact create --set email=john@example.com --set firstname=John --set lastname=Doe --set phone=+1234567890Update Contact
PATCH /hubspot/crm/v3/objects/contacts/{contactId}
Content-Type: application/json
{
"properties": {
"phone": "+0987654321"
}
}maton hubspot contact update <contactId> --set phone=+0987654321Delete Contact
DELETE /hubspot/crm/v3/objects/contacts/{contactId}maton hubspot contact archive <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"]
}maton hubspot contact search --filter email:EQ:john@example.com --properties email,firstname,lastnameList Companies
GET /hubspot/crm/v3/objects/companies?limit=100&properties=name,domain,industrymaton hubspot company list --properties name,domain,industry -L 100Get Company
GET /hubspot/crm/v3/objects/companies/{companyId}?properties=name,domain,industrymaton hubspot company view <companyId> --properties name,domain,industryCreate Company
POST /hubspot/crm/v3/objects/companies
Content-Type: application/json
{
"properties": {
"name": "Acme Corp",
"domain": "acme.com",
"industry": "COMPUTER_SOFTWARE"
}
}maton hubspot company create --set name='Acme Corp' --set domain=acme.com --set industry=COMPUTER_SOFTWARENote: The industry property requires specific enum values (e.g., COMPUTER_SOFTWARE, FINANCE, HEALTHCARE). 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"
}
}maton hubspot company update <companyId> --set industry=COMPUTER_SOFTWARE --set numberofemployees=50Delete Company
DELETE /hubspot/crm/v3/objects/companies/{companyId}maton hubspot company delete <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
}maton hubspot company search --filter 'domain:CONTAINS_TOKEN:*' --properties name,domain -L 10List Deals
GET /hubspot/crm/v3/objects/deals?limit=100&properties=dealname,amount,dealstagematon hubspot deal list --properties dealname,amount,dealstage -L 100Get Deal
GET /hubspot/crm/v3/objects/deals/{dealId}?properties=dealname,amount,dealstagematon hubspot deal view <dealId> --properties dealname,amount,dealstageCreate Deal
POST /hubspot/crm/v3/objects/deals
Content-Type: application/json
{
"properties": {
"dealname": "New Deal",
"amount": "10000",
"dealstage": "appointmentscheduled"
}
}maton hubspot deal create --set dealname='New Deal' --set amount=10000 --set dealstage=appointmentscheduledUpdate Deal
PATCH /hubspot/crm/v3/objects/deals/{dealId}
Content-Type: application/json
{
"properties": {
"amount": "15000",
"dealstage": "qualifiedtobuy"
}
}maton hubspot deal update <dealId> --set amount=15000 --set dealstage=qualifiedtobuyDelete Deal
DELETE /hubspot/crm/v3/objects/deals/{dealId}maton hubspot deal delete <dealId>Associate Objects
PUT /hubspot/crm/v4/objects/{fromObjectType}/{fromObjectId}/associations/{toObjectType}/{toObjectId}
Content-Type: application/json
[{"associationCategory": "HUBSPOT_DEFINED", "associationTypeId": 279}]maton hubspot associations create --from contacts:<fromObjectId> --to companies:<toObjectId> --type 279Common association type IDs:
279- Contact to Company3- Deal to Contact341- Deal to Company
List Associations
GET /hubspot/crm/v4/objects/{objectType}/{objectId}/associations/{toObjectType}maton hubspot associations list --from contacts:12345 --to companiesBatch Read
POST /hubspot/crm/v3/objects/{objectType}/batch/read
Content-Type: application/json
{
"properties": ["email", "firstname"],
"inputs": [{"id": "123"}, {"id": "456"}]
}maton hubspot contact batch-read --id 123,456 --properties email,firstnameBatch 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"}}
]
}maton hubspot contact batch-create --data '[{"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"}}
]
}maton hubspot contact batch-update --data '[{"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"}]
}maton hubspot contact batch-archive --id 123,456List Properties
GET /hubspot/crm/v3/properties/{objectType}maton hubspot properties list --type contactsMaton Events
contact.created
contact.updated
Parameters
property_name(string, optional): Internal property name to match, such asemail. Leave blank to match any property change.
contact.deleted
company.created
company.updated
Parameters
property_name(string, optional): Internal property name to match, such asname. Leave blank to match any property change.
company.deleted
deal.created
deal.updated
Parameters
property_name(string, optional): Internal property name to match, such asamount. Leave blank to match any property change.
deal.deleted
deal.stage_changed
ticket.created
ticket.updated
Parameters
property_name(string, optional): Internal property name to match, such assubject. Leave blank to match any property change.