> ## Documentation Index
> Fetch the complete documentation index at: https://docs.routemcp.io/llms.txt
> Use this file to discover all available pages before exploring further.

# HubSpot

> Sync contacts, leads, deals, and meetings with HubSpot CRM via OAuth 2.0.

<img src="https://icon.horse/icon/hubspot.com" alt="HubSpot" style={{ width: "48px", height: "48px", marginBottom: "16px" }} />

## Overview

| Property    | Value                   |
| ----------- | ----------------------- |
| Slug        | `hubspot`               |
| Auth        | OAuth 2.0 + PKCE        |
| API version | v3                      |
| Sandbox     | Yes                     |
| Rate limit  | 100 req/min, 10 req/sec |

## Supported resources

| Resource    | List                                      | Get                                       | Create                                    | Update                                    | Delete                                    |
| ----------- | ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | ----------------------------------------- |
| Contact     | <span style={{color: "#16a34a"}}>✓</span> | <span style={{color: "#16a34a"}}>✓</span> | <span style={{color: "#16a34a"}}>✓</span> | <span style={{color: "#16a34a"}}>✓</span> | <span style={{color: "#16a34a"}}>✓</span> |
| Lead        | <span style={{color: "#16a34a"}}>✓</span> | <span style={{color: "#16a34a"}}>✓</span> | <span style={{color: "#16a34a"}}>✓</span> | <span style={{color: "#16a34a"}}>✓</span> | <span style={{color: "#16a34a"}}>✓</span> |
| Deal        | <span style={{color: "#16a34a"}}>✓</span> | <span style={{color: "#16a34a"}}>✓</span> | <span style={{color: "#16a34a"}}>✓</span> | <span style={{color: "#16a34a"}}>✓</span> | <span style={{color: "#16a34a"}}>✓</span> |
| Meeting     | <span style={{color: "#16a34a"}}>✓</span> | <span style={{color: "#16a34a"}}>✓</span> | <span style={{color: "#16a34a"}}>✓</span> | <span style={{color: "#16a34a"}}>✓</span> | <span style={{color: "#16a34a"}}>✓</span> |
| Company     | <span style={{color: "#16a34a"}}>✓</span> | <span style={{color: "#16a34a"}}>✓</span> | <span style={{color: "#16a34a"}}>✓</span> | <span style={{color: "#16a34a"}}>✓</span> | <span style={{color: "#16a34a"}}>✓</span> |
| Note        | <span style={{color: "#16a34a"}}>✓</span> | <span style={{color: "#16a34a"}}>✓</span> | <span style={{color: "#16a34a"}}>✓</span> | <span style={{color: "#16a34a"}}>✓</span> | <span style={{color: "#16a34a"}}>✓</span> |
| Task        | <span style={{color: "#16a34a"}}>✓</span> | <span style={{color: "#16a34a"}}>✓</span> | <span style={{color: "#16a34a"}}>✓</span> | <span style={{color: "#16a34a"}}>✓</span> | <span style={{color: "#16a34a"}}>✓</span> |
| Activity    | <span style={{color: "#16a34a"}}>✓</span> | <span style={{color: "#16a34a"}}>✓</span> | <span style={{color: "#16a34a"}}>✓</span> | <span style={{color: "#16a34a"}}>✓</span> | <span style={{color: "#16a34a"}}>✓</span> |
| Pipeline    | <span style={{color: "#16a34a"}}>✓</span> | <span style={{color: "#16a34a"}}>✓</span> | —                                         | —                                         | —                                         |
| Owner       | <span style={{color: "#16a34a"}}>✓</span> | <span style={{color: "#16a34a"}}>✓</span> | —                                         | —                                         | —                                         |
| Appointment | <span style={{color: "#16a34a"}}>✓</span> | <span style={{color: "#16a34a"}}>✓</span> | <span style={{color: "#16a34a"}}>✓</span> | —                                         | —                                         |

## Connect setup

HubSpot uses OAuth 2.0 with PKCE. You need a **Public app** created under **Legacy apps** in the HubSpot developer portal.

<Steps>
  <Step title="Create a HubSpot Public app">
    Go to [HubSpot Developer Portal](https://developers.hubspot.com) → **Apps** → **Legacy apps** → **Create app**. Select **Public app**. Under **Auth**, copy the **Client ID** and **Client Secret**.
  </Step>

  <Step title="Add the redirect URL">
    In your app's **Auth** settings, add the following URL to the **Redirect URLs** list:

    ```
    https://api.routemcp.io/api/v1/auth/callback
    ```
  </Step>

  <Step title="Configure required scopes">
    Enable the following scopes on your app:

    * `crm.objects.contacts.read`
    * `crm.objects.contacts.write`
    * `crm.objects.deals.read`
    * `crm.objects.deals.write`
    * `crm.objects.leads.read`
    * `crm.objects.leads.write`
    * `crm.objects.companies.read`
    * `crm.objects.companies.write`
    * `crm.objects.owners.read`
    * `scheduler.meetings.meeting-link.read`
  </Step>

  <Step title="Connect via the widget">
    When your end user opens the Connect widget, they will enter the Client ID and Client Secret, then be redirected to HubSpot to authorize the connection.
  </Step>
</Steps>

## Usage

```bash theme={null}
# List contacts from HubSpot
curl "https://api.routemcp.io/api/v1/crm/contact?provider=hubspot" \
  -H "Authorization: Bearer sk_live_your_key" \
  -H "X-End-User-Id: user-123"

# Create a deal
curl -X POST "https://api.routemcp.io/api/v1/crm/deal?provider=hubspot" \
  -H "Authorization: Bearer sk_live_your_key" \
  -H "Content-Type: application/json" \
  -H "X-End-User-Id: user-123" \
  -d '{ "name": "Acme Corp", "amount": 5000, "stage": "appointmentscheduled" }'
```

## Notes

* HubSpot deals and meetings include enriched contact and company associations automatically.
* Owner names and emails are resolved via a secondary lookup on `crm.objects.owners`.
* Use `environment: "sandbox"` in your connect token to route requests to the HubSpot sandbox account.
