<!-- Source: https://docs.vinsi.ai/api-integration/hubspot -->
# HubSpot Integration

Connect HubSpot to VINSI.AI and access CRM data using Custom API tools inside AI Phone Agents.

Created: Jan 26, 2026

## Overview

HubSpot can be integrated into VINSI.AI through OAuth authentication and accessed programmatically using **Custom API tools**.

Once connected, AI agents can retrieve contacts, deals, and CRM metadata during live phone calls or automated workflows.

## Authentication

HubSpot authentication is handled using OAuth 2.0.

1. Navigate to **Settings → API Integration → HubSpot**
2. Click **Connect with HubSpot API**
3. Review permissions and click **Connect app**

Access tokens are securely stored and automatically refreshed. No API keys are exposed to agents.

## Using HubSpot via Custom API Tool

To allow an AI Phone Agent to query HubSpot data, you must create a **Custom API** tool.

This tool defines how the agent sends HTTP requests to HubSpot’s API using the authenticated OAuth context.

## Tool Configuration

Add New Tool

Navigate to **Tools → Add Tool** and configure the following fields.

- **Tool Type:** Custom API
- **Tool Name:** HubSpot – Get Contacts
- **Description:** Fetch contacts from HubSpot CRM
- **Server URL:** `https://api.hubapi.com/crm/v3/objects/contacts`
- **Method:** GET
- **Timeout:** 30 seconds (default)

Authorization headers are injected automatically using the connected HubSpot account.

## Example: Fetch Contacts

Custom API Tool Configuration

Server URL:
https://api.hubapi.com/crm/v3/objects/contacts

Method:
GET

Headers:
Content-Type: application/json

Parameters (optional):
limit = 10

The AI agent can now invoke this tool during a call to retrieve CRM data in real time.

## Important Notes

- HubSpot may display the integration as an **unverified app**
- Only grant access if you trust the application
- Rate limits are enforced by HubSpot
- Custom API tools should be scoped narrowly per use case
