.png)

HubSpot Service Hub Integration Guide
Integrate HubSpot Service Hub with enterprise systems through REST APIs, selected GraphQL operations, webhooks, batch and import APIs, file services, and scheduled workflows.
HubSpot Service Hub integration options at a glance
HubSpot Service Hub exposes REST APIs for Tickets, Contacts, Companies, Conversations, Feedback submissions, Files, Search, Imports, associations, and related CRM capabilities. Selected GraphQL use cases are available, but REST remains the safer general-purpose choice for Service Hub synchronization. HubSpot also supports webhook subscriptions for selected CRM and application events, batch CRM operations, imports, and file management. Martini can consume these APIs, receive webhook notifications, orchestrate scheduled reconciliation workflows, map properties and associations, apply validation and business rules, and write results to enterprise applications, databases, files, or APIs. OAuth 2.0 and private app access tokens provide the primary authentication options.
Common HubSpot Service Hub integration patterns
Common HubSpot Service Hub data objects used in integrations
Authentication and security considerations
Authentication options
OAuth 2.0 is the recommended approach for integrations that connect to multiple HubSpot accounts or are distributed as applications. Private app access tokens are appropriate for integrations controlled by one HubSpot account. API keys are legacy and should not be recommended for new implementations.
Scopes and secrets
HubSpot scopes should be limited to the objects and operations required by the integration, such as Tickets, Contacts, Companies, Conversations, Files, webhooks, search, or imports. Martini should store OAuth credentials, refresh tokens, and private app tokens in protected environment configuration rather than workflow definitions.
Data protection
- Use HTTPS API calls and controlled Martini endpoints for webhook intake.
- Validate webhook and API inputs before processing.
- Restrict access to customer, conversation, feedback, and file data.
- Apply file retention and access rules separately from file-transfer logic.
Operational considerations for HubSpot Service Hub integrations
Rate limits and pagination
HubSpot applies account-, application-, and endpoint-specific limits. Handle HTTP 429 responses, respect retry-after information when provided, use exponential backoff, control concurrency, and prefer batch operations where suitable. Collection APIs should be processed until the paging cursor is exhausted.
Associations and idempotency
Tickets, Contacts, Companies, Conversations, and custom objects may require explicit association handling. Use stable HubSpot object IDs, event identifiers, or composite business keys to prevent duplicate writes when webhook delivery or workflow retries occur.
Completeness and schema changes
Because webhook coverage is selective, combine event processing with scheduled search and reconciliation workflows. Validate required properties, avoid assuming custom properties exist in every portal, monitor enumerated values, and keep mapping configuration separate from orchestration logic.
Testing and monitoring
- Test permissions, scopes, pagination, associations, rate limits, and malformed payloads.
- Separate retryable platform failures from non-retryable validation or permission failures.
- Record correlation identifiers, checkpoints, rejected batch items, and downstream responses.
- Monitor changes in subscription tier, account configuration, and API behavior.
Why use Martini instead of scripts or point-to-point integrations?
Orchestrate more than API calls
Scripts often combine authentication, pagination, mapping, retries, business rules, and target writes in code that is difficult to operate as requirements grow. Martini provides workflow and API orchestration so HubSpot events, scheduled extracts, reconciliation, and downstream actions can be managed as reusable integration assets.
Handle multiple synchronization modes
Martini can combine supported HubSpot webhooks with REST retrieval, scheduled searches, batch operations, Imports API processing, and file transfer. This is useful when webhook coverage does not include every Service Hub action or when high-volume synchronization requires batching.
Improve maintainability
- Centralize protected authentication and environment configuration.
- Apply consistent mappings, validation, business rules, retries, and error paths.
- Expose controlled APIs for downstream applications when an API façade is needed.
- Use logging, checkpoints, and reconciliation workflows for operational visibility.