Documentation Index
Fetch the complete documentation index at: https://docs.prisme.ai/llms.txt
Use this file to discover all available pages before exploring further.
The HubSpot app provides read/write access to a HubSpot portal through the HubSpot REST API. It can be used either as a Builder app (automations call HubSpot instructions directly) or as a remote MCP server consumed by an AI agent. Each tenant authenticates either with a Private App token (PAT) — shared across all users of the tenant — or via per-user OAuth 2.0 (authorization-code with PKCE). The connector exposes ~120 operations grouped into 18 entity tools covering the CRM (contacts, companies, deals, tickets, engagements, associations, pipelines, properties, owners, lists) and the Marketing layer (forms, marketing emails, workflows, files).
CRM Records
Contacts, companies, deals and tickets with list/search/get/create/update/archive plus batch and merge operations
Engagements & Pipelines
Notes, tasks, calls, emails and meetings; pipelines and stages; properties and property groups; owners and lists
Marketing
Forms, transactional and marketing emails, workflows enrollment, and the Files Manager
Prerequisites
- A HubSpot account with access to the portal you want to expose, and an admin who can create Private Apps or OAuth applications.
- One of:
- A Private App token (PAT) — created at Settings → Integrations → Private Apps (
https://app.hubspot.com/private-apps/<portal-id>). Quickest setup, shared across all users of this tenant. - A HubSpot OAuth Application — created at app.hubspot.com/l/developer (Developer account → Create app → Auth). The Redirect URI must match the value shown in the
OAuth Callback URLfield of the installed app instance (auto-populated on install — copy it back into the HubSpot developer console after installation). Per-user authorization; ideal when actions must be attributed to the end-user.
- A Private App token (PAT) — created at Settings → Integrations → Private Apps (
- Whichever auth method you choose, make sure the selected scopes cover the resources you intend to read/write (
crm.objects.contacts.*,crm.objects.companies.*,tickets,content,automation,forms,files, etc.). - Base URL (default:
https://api.hubapi.com)
HubSpot has no standard RFC 7009 revocation endpoint. The
disconnect tool deletes the platform-stored tokens but cannot revoke them at HubSpot — refresh tokens may still be valid until they naturally expire (typically 6 months idle).- Usage as App
- Usage as MCP
Installation
- Go to Apps in your workspace
- Search for HubSpot and install it
- Open the app instance configuration and fill in either the PAT or the OAuth client credentials
Configuration
| Field | Description |
|---|---|
| HubSpot API Base URL | Base URL of the HubSpot API (default https://api.hubapi.com) |
| HubSpot Private App Token (PAT) | Private App access token. Optional when using OAuth. Stored as a workspace secret |
| OAuth2 Client ID | HubSpot OAuth Application Client ID, stored as a workspace secret |
| OAuth2 Client Secret | HubSpot OAuth Application Client Secret, stored as a workspace secret |
| OAuth Callback URL | Auto-populated on install — paste this value into the Redirect URI field of your HubSpot OAuth app |
| OAuth Authorize URL | Default https://app.hubspot.com/oauth/authorize |
| OAuth Token URL | Default https://api.hubapi.com/oauth/v1/token |
| OAuth Revoke URL | HubSpot does not expose RFC 7009 revocation. Leave empty |
| OAuth Scopes | Space-separated HubSpot scopes. Default covers CRM + Marketing read/write. See HubSpot OAuth scopes |
| Refresh Token TTL (seconds) | How long the refresh token is kept in user-scoped secrets. Default 7200 (2h) |
| MCP Endpoint | Auto-populated on install — URL of the MCP endpoint for this instance |
| MCP API Key | Auto-populated on install — signed key used in the mcp-api-key header. Do not modify |
MCP Endpoint, MCP API Key and OAuth Callback URL are generated automatically by the onInstall flow. Either fill in the PAT or the OAuth credentials — if both are present, the per-user OAuth session takes precedence and the PAT is used only as a fallback.Authorize end-users (OAuth mode)
When the tenant uses OAuth, each end-user authorizes their own HubSpot account through a browser-based consent screen:Trigger the connect flow
From an MCP client (Agent Creator capability or any tool client), call any data tool. If no OAuth session exists for the current user × tenant, the MCP server returns a
connector_auth_required payload with a connect_url. Alternatively, call the connect tool explicitly.Open the connect URL
Open the returned URL in a browser tab where the user is already authenticated to Prisme.ai. The platform redirects to the HubSpot consent screen.
Grant access
The user reviews the requested scopes and clicks Connect app. HubSpot redirects back to the platform’s
oauthCallback webhook.Available Instructions
Every instruction resolves credentials from the workspace configuration. CRM list operations acceptlimit (default 100) and after for cursor pagination, plus properties to request specific fields. Most CRM tools accept an optional objectType to override the default object type — useful for custom objects.Contacts
| Instruction | Arguments |
|---|---|
listContacts | limit, after, properties, propertiesWithHistory, associations, archived |
getContact | contactId*, properties, propertiesWithHistory, associations, archived, idProperty |
createContact | properties*, associations |
updateContact | contactId, properties, idProperty |
archiveContact | contactId* |
searchContacts | filterGroups, sorts, query, properties, limit, after |
mergeContacts | primaryObjectId, objectIdToMerge |
batchReadContacts | inputs*, properties, propertiesWithHistory, idProperty |
batchCreateContacts | inputs* |
batchUpdateContacts | inputs* |
batchArchiveContacts | inputs* |
Companies
Same shape as contacts:listCompanies, getCompany, createCompany, updateCompany, archiveCompany, searchCompanies, mergeCompanies, batchReadCompanies, batchCreateCompanies, batchUpdateCompanies, batchArchiveCompanies.Deals
Same shape as contacts:listDeals, getDeal, createDeal, updateDeal, archiveDeal, searchDeals, mergeDeals, batchReadDeals, batchCreateDeals, batchUpdateDeals, batchArchiveDeals.Tickets
listTickets, getTicket, createTicket, updateTicket, archiveTicket, searchTickets, batchReadTickets, batchCreateTickets, batchUpdateTickets, batchArchiveTickets (no merge).Associations
| Instruction | Arguments |
|---|---|
listAssociations | fromObjectType, fromObjectId, toObjectType*, after, limit |
createAssociation | fromObjectType, fromObjectId, toObjectType, toObjectId, associationCategory, associationTypeId |
archiveAssociation | fromObjectType, fromObjectId, toObjectType, toObjectId |
Engagements
Notes, tasks, calls, emails and meetings share the same shape:list, get, create, update, archive.| Instruction | Arguments |
|---|---|
listNotes / listTasks / listCalls / listEmails / listMeetings | limit, after, properties, associations, archived |
getNote / getTask / getCall / getEmail / getMeeting | engagementId*, properties, associations, archived |
createNote / createTask / createCall / createEmail / createMeeting | properties*, associations |
updateNote / updateTask / updateCall / updateEmail / updateMeeting | engagementId, properties |
archiveNote / archiveTask / archiveCall / archiveEmail / archiveMeeting | engagementId* |
Pipelines
| Instruction | Arguments |
|---|---|
listPipelines | objectType* |
getPipeline | objectType, pipelineId |
createPipeline | objectType, label, stages*, displayOrder |
updatePipeline | objectType, pipelineId, label, stages, displayOrder |
archivePipeline | objectType, pipelineId |
listPipelineStages | objectType, pipelineId |
getPipelineStage | objectType, pipelineId, stageId* |
createPipelineStage | objectType, pipelineId, label*, metadata, displayOrder |
updatePipelineStage | objectType, pipelineId, stageId*, label, metadata, displayOrder |
archivePipelineStage | objectType, pipelineId, stageId* |
Properties
listProperties, getProperty, createProperty, updateProperty, archiveProperty, listPropertyGroups, createPropertyGroup, updatePropertyGroup, archivePropertyGroup.Owners
| Instruction | Arguments |
|---|---|
listOwners | email, after, limit, archived |
getOwner | ownerId*, idProperty |
Lists
| Instruction | Arguments |
|---|---|
createList | name, objectTypeId, processingType*, filterBranch |
getList | listId*, includeFilters |
updateList | listId*, name |
deleteList | listId* |
searchLists | query, count, offset, processingTypes, additionalProperties |
addMembers | listId, recordIds |
removeMembers | listId, recordIds |
getMemberships | listId*, after, limit |
Forms
| Instruction | Arguments |
|---|---|
listForms | after, limit, archived, formTypes |
getForm | formId*, archived |
createForm | name, formType, fieldGroups, configuration |
updateForm | formId*, name, fieldGroups, configuration |
archiveForm | formId* |
submitForm | portalId, formGuid, fields*, context, legalConsentOptions |
Marketing Emails
| Instruction | Arguments |
|---|---|
listMarketingEmails | after, limit, archived, sort, name |
getMarketingEmail | emailId* |
createMarketingEmail | name*, subject, subscription, content |
updateMarketingEmail | emailId*, name, subject, subscription, content |
archiveMarketingEmail | emailId* |
sendTransactional | emailId, message, contactProperties, customProperties |
Workflows
| Instruction | Arguments |
|---|---|
listWorkflows | limit, offset |
getWorkflow | workflowId* |
enrollContactInWorkflow | workflowId, email |
unenrollContactFromWorkflow | workflowId, email |
Files
| Instruction | Arguments |
|---|---|
listFiles | after, limit, parentFolderId, parentFolderPath, name, extension |
getFile | fileId* |
getSignedUrl | fileId*, expirationSeconds, upscale |
archiveFile | fileId* |
importFromUrl | name, url, folderId, folderPath, access, duplicateValidationStrategy |
listFolders | after, limit, parentFolderId, name |
createFolder | name*, parentFolderId, parentPath |
archiveFolder | folderId* |
Arguments flagged with
* are required.DSUL Examples
Look up a contact by email
Create a deal and associate it to a company
Add a contact to a static list
Send a transactional email
Bulk-import contacts
Error Handling
| HTTP Status | Meaning | Typical Cause |
|---|---|---|
400 | Bad Request | Invalid property value, malformed filterGroups, missing required field |
401 | Unauthorized | Missing / invalid PAT or OAuth token, revoked refresh token |
403 | Forbidden | The token does not include the required scope, or the user/portal does not have the feature enabled (Marketing Hub Pro+, etc.) |
404 | Not Found | Record / list / workflow / form does not exist (or was archived) |
409 | Conflict | Unique-property collision (e.g. contact with the same email already exists) |
429 | Rate Limited | Per-portal quota exceeded — back off based on the X-HubSpot-RateLimit-Secondly-Remaining headers |
500 / 502 / 503 | Server Error | Transient HubSpot API error — retry with exponential backoff |
Common Issues
“Not configured” — The app instance has neither a PAT nor OAuth credentials. Provide at least one. “Invalid API key” (MCP) — Themcp-api-key header does not match the central app secret. Reinstall the app instance to regenerate a signed key.
“Credentials lookup failed” — The MCP endpoint could not reach the getConfig webhook of the installed app. Verify that the app instance is still installed in the expected workspace.
connector_auth_required (OAuth tenants only) — The calling user has no HubSpot OAuth session yet for this tenant. The response payload includes a connect_url; relay it to the user so they can authorize their HubSpot account.
redirect_uri_mismatch during the OAuth dance — The value of OAuth Callback URL in the app config has not been added to the Redirect URLs of your HubSpot OAuth application. Copy it back and retry.
MISSING_SCOPES (403) — The PAT or OAuth token does not include the scopes required by the operation. Edit the Private App / OAuth scopes in the HubSpot UI and reinstall the app instance.
OBJECT_ALREADY_EXISTS on contact create — A contact with the same email already exists. Either update the existing contact (use email as idProperty) or query first with search.
Lists API: cannot add members to a dynamic list — Only static / MANUAL lists accept addMembers and removeMembers. Dynamic lists are managed by their filter criteria.
External Resources
HubSpot Developer Docs
Official HubSpot REST API reference
Tool Agents
Build AI agents that call MCP tools dynamically