Use the HubSpot CLI from KosmoKrator to call HubSpot tools headlessly, return JSON, inspect schemas, and automate workflows from coding agents, scripts, and CI.
HubSpot can be configured headlessly with `kosmokrator integrations:configure hubspot`.
# Install KosmoKrator first if it is not available on PATH.curl -fsSL https://raw.githubusercontent.com/OpenCompanyApp/kosmokrator/main/install.sh | bash# Configure and verify this integration.kosmokrator integrations:configure hubspot --set access_token="$HUBSPOT_ACCESS_TOKEN" --enable --read allow --write ask --jsonkosmokrator integrations:doctor hubspot --jsonkosmokrator integrations:status --json
Credentials
Authentication type: Bearer tokenbearer_token. Configure credentials once, then use the same stored profile from
scripts, coding CLIs, Lua code mode, and the MCP gateway.
Key
Env var
Type
Required
Label
access_token
HUBSPOT_ACCESS_TOKEN
Secret secret
yes
Private App Access Token
Call HubSpot Headlessly
Use the generic call form when another coding CLI or script needs a stable universal interface.
Every function below can be called headlessly. The generic form is stable across all integrations;
the provider shortcut is shorter but specific to HubSpot.
hubspot.hubspot_create_contact
Write write
Create a new contact in HubSpot CRM.
Supports firstname, lastname, email, phone, company, and any additional custom properties.
Returns the created contact with its HubSpot ID and properties.
Update an existing HubSpot contact by ID.
Provide a properties object with the fields to update (e.g., {"firstname": "Jane", "phone": "555-0100"}).
Returns the updated contact.
Search HubSpot contacts using filter groups and/or a text query.
Use filterGroups for structured queries (e.g., email equals "[email protected]").
Use query for full-text search across searchable properties.
Supports pagination with limit and after parameters.
Create or update a HubSpot contact by email.
First searches for an existing contact matching the email. If found, updates it. If not found, creates a new contact.
Supports firstname, lastname, phone, company, and any additional custom properties.
Create a new company in HubSpot CRM.
Supports name, domain, and any additional custom properties.
Returns the created company with its HubSpot ID and properties.
Update an existing HubSpot company by ID.
Provide a properties object with the fields to update (e.g., {"name": "Acme Corp", "domain": "acme.com"}).
Returns the updated company.
Search HubSpot companies using filter groups and/or a text query.
Use filterGroups for structured queries (e.g., domain equals "acme.com").
Use query for full-text search across searchable properties.
Supports pagination with limit and after parameters.
Create a new deal in HubSpot CRM.
Supports dealname, amount, pipeline, dealstage, closedate, and any additional custom properties.
Returns the created deal with its HubSpot ID and properties.
Update an existing HubSpot deal by ID.
Provide a properties object with the fields to update (e.g., {"dealstage": "closedwon", "amount": "5000"}).
Returns the updated deal.
List deals in HubSpot CRM with cursor-based pagination.
Optionally specify properties to include and control page size.
Use the "after" cursor from a previous response to fetch the next page.
Create a new ticket in HubSpot CRM.
Supports subject, content, hs_pipeline, hs_pipeline_stage, and any additional custom properties.
Returns the created ticket with its HubSpot ID and properties.
Update an existing HubSpot ticket by ID.
Provide a properties object with the fields to update (e.g., {"subject": "New subject", "hs_pipeline_stage": "2"}).
Returns the updated ticket.
Create an association between two HubSpot CRM objects.
For example, associate a contact to a company, or a deal to a company.
Specify the from/to object types (contacts, companies, deals, tickets), their IDs, and the association type.
Common association types: contact_to_company, company_to_contact, deal_to_company, ticket_to_contact.
List associations from a HubSpot CRM object to another object type.
For example, list all companies associated with a specific contact.
Returns the associated object IDs and association types.
List HubSpot CRM owners (users).
Returns owner IDs, names, and emails. Useful for assigning owners to contacts, deals, and tickets.
Supports pagination with limit and after parameters.
Create an engagement in HubSpot CRM (note, task, or meeting).
Specify the type and provide the relevant properties.
For notes: body (HTML content). For tasks: hs_task_body, hs_task_subject, hs_task_status.
For meetings: hs_meeting_title, hs_meeting_body, hs_meeting_start_time, hs_meeting_end_time.
List HubSpot CRM pipelines for a given object type.
Returns all pipelines and their stages. Commonly used for deals and tickets.
Use the object type "deals" or "tickets" to get the respective pipelines.
List HubSpot CRM property definitions for a given object type.
Returns all properties including their name, label, type, and field type.
Useful for discovering available properties for contacts, companies, deals, or tickets.
Add contacts to a HubSpot marketing list.
Provide either contact_ids (HubSpot vid IDs) or emails (email addresses), or both.
Contacts that are already in the list are silently skipped.
Use these parameter tables when building CLI payloads without calling integrations:schema first.
hubspot.hubspot_create_contact
Create a new contact in HubSpot CRM.
Supports firstname, lastname, email, phone, company, and any additional custom properties.
Returns the created contact with its HubSpot ID and properties.
List of property names to include (e.g., ["firstname","email"]).
hubspot.hubspot_update_contact
Update an existing HubSpot contact by ID.
Provide a properties object with the fields to update (e.g., {"firstname": "Jane", "phone": "555-0100"}).
Returns the updated contact.
Key-value map of properties to update (e.g., {"firstname": "Jane"}).
hubspot.hubspot_search_contacts
Search HubSpot contacts using filter groups and/or a text query.
Use filterGroups for structured queries (e.g., email equals "[email protected]").
Use query for full-text search across searchable properties.
Supports pagination with limit and after parameters.
Create or update a HubSpot contact by email.
First searches for an existing contact matching the email. If found, updates it. If not found, creates a new contact.
Supports firstname, lastname, phone, company, and any additional custom properties.
Create a new company in HubSpot CRM.
Supports name, domain, and any additional custom properties.
Returns the created company with its HubSpot ID and properties.
Update an existing HubSpot company by ID.
Provide a properties object with the fields to update (e.g., {"name": "Acme Corp", "domain": "acme.com"}).
Returns the updated company.
Search HubSpot companies using filter groups and/or a text query.
Use filterGroups for structured queries (e.g., domain equals "acme.com").
Use query for full-text search across searchable properties.
Supports pagination with limit and after parameters.
Array of filter groups, each containing filters with propertyName, operator, and value.
properties
array
no
List of property names to include in results.
limit
integer
no
Maximum number of results to return (default 10, max 100).
after
string
no
Pagination cursor from a previous response.
hubspot.hubspot_create_deal
Create a new deal in HubSpot CRM.
Supports dealname, amount, pipeline, dealstage, closedate, and any additional custom properties.
Returns the created deal with its HubSpot ID and properties.
Update an existing HubSpot deal by ID.
Provide a properties object with the fields to update (e.g., {"dealstage": "closedwon", "amount": "5000"}).
Returns the updated deal.
List deals in HubSpot CRM with cursor-based pagination.
Optionally specify properties to include and control page size.
Use the "after" cursor from a previous response to fetch the next page.
Maximum number of deals to return (default 10, max 100).
after
string
no
Pagination cursor from a previous response.
properties
array
no
List of property names to include in results.
hubspot.hubspot_create_ticket
Create a new ticket in HubSpot CRM.
Supports subject, content, hs_pipeline, hs_pipeline_stage, and any additional custom properties.
Returns the created ticket with its HubSpot ID and properties.
Update an existing HubSpot ticket by ID.
Provide a properties object with the fields to update (e.g., {"subject": "New subject", "hs_pipeline_stage": "2"}).
Returns the updated ticket.
Create an association between two HubSpot CRM objects.
For example, associate a contact to a company, or a deal to a company.
Specify the from/to object types (contacts, companies, deals, tickets), their IDs, and the association type.
Common association types: contact_to_company, company_to_contact, deal_to_company, ticket_to_contact.
Source object type (e.g., "contacts", "companies", "deals", "tickets").
from_id
string
yes
Source object ID.
to_type
string
yes
Target object type (e.g., "contacts", "companies", "deals", "tickets").
to_id
string
yes
Target object ID.
association_type
string
yes
Association type name (e.g., "contact_to_company", "deal_to_company").
hubspot.hubspot_list_associations
List associations from a HubSpot CRM object to another object type.
For example, list all companies associated with a specific contact.
Returns the associated object IDs and association types.
Source object type (e.g., "contacts", "companies", "deals").
from_id
string
yes
Source object ID.
to_type
string
yes
Target object type to list associations for (e.g., "companies", "contacts").
hubspot.hubspot_list_owners
List HubSpot CRM owners (users).
Returns owner IDs, names, and emails. Useful for assigning owners to contacts, deals, and tickets.
Supports pagination with limit and after parameters.
Create an engagement in HubSpot CRM (note, task, or meeting).
Specify the type and provide the relevant properties.
For notes: body (HTML content). For tasks: hs_task_body, hs_task_subject, hs_task_status.
For meetings: hs_meeting_title, hs_meeting_body, hs_meeting_start_time, hs_meeting_end_time.
Engagement body content (HTML for notes, plain text for tasks).
timestamp
string
no
Engagement timestamp in ISO 8601 format.
owner_id
string
no
HubSpot owner ID to assign the engagement to.
properties
object
no
Additional custom properties as key-value pairs.
hubspot.hubspot_list_pipelines
List HubSpot CRM pipelines for a given object type.
Returns all pipelines and their stages. Commonly used for deals and tickets.
Use the object type "deals" or "tickets" to get the respective pipelines.
List HubSpot CRM property definitions for a given object type.
Returns all properties including their name, label, type, and field type.
Useful for discovering available properties for contacts, companies, deals, or tickets.
Object type (e.g., "contacts", "companies", "deals", "tickets").
hubspot.hubspot_add_contact_to_list
Add contacts to a HubSpot marketing list.
Provide either contact_ids (HubSpot vid IDs) or emails (email addresses), or both.
Contacts that are already in the list are silently skipped.
Headless calls still follow the integration read/write permission policy. Configure read/write defaults
with integrations:configure. Add --force only for trusted automation that should bypass that policy.