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

# HubSpot

> CRM and marketing automation API for reading and writing contacts, companies, and deals.

CRM and marketing automation API for reading and writing contacts, companies, and deals. Best for workflows that need to sync customer records from other systems, create contacts from form submissions, or pull pipeline data into reports. Unlike Salesforce, HubSpot APIs are self-serve and free-tier-accessible, so they fit lightweight automation without enterprise contracts.

10 example endpoints available through Lava's AI Gateway. See the [HubSpot API docs](https://developers.hubspot.com/docs/api-reference) for full documentation.

<Warning>This provider requires your own credentials — connect your API key or OAuth account before use.</Warning>

<Info>This is a **catch-all provider** — any valid URL under `https://api.hubapi.com` is supported. Any HubSpot API endpoint. Common paths: /crm/v3/objects/contacts, /crm/v3/objects/companies, /crm/v3/objects/deals. Construct URL as [https://api.hubapi.com/\&#123;path\&#125](https://api.hubapi.com/\&#123;path\&#125);. See [https://developers.hubspot.com/docs/api-reference](https://developers.hubspot.com/docs/api-reference) for full reference. The endpoints below are curated examples.</Info>

## Endpoints

### List contacts. Supports limit, after (pagination cursor), properties, associations.

**GET** `https://api.hubapi.com/crm/v3/objects/contacts?limit=100&properties=email,firstname,lastname` — Free

<Tabs>
  <Tab title="SDK">
    ```typescript theme={null}
    const data = await lava.gateway('https://api.hubapi.com/crm/v3/objects/contacts?limit=100&properties=email,firstname,lastname', { method: 'GET' });
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={null}
    curl "https://api.lava.so/v1/forward?u=https%3A%2F%2Fapi.hubapi.com%2Fcrm%2Fv3%2Fobjects%2Fcontacts%3Flimit%3D100%26properties%3Demail%2Cfirstname%2Clastname" \
      -H "Authorization: Bearer $LAVA_SECRET_KEY"
    ```
  </Tab>
</Tabs>

### Retrieve a single contact by ID.

**GET** `https://api.hubapi.com/crm/v3/objects/contacts/{contact_id}?properties=email,firstname,lastname` — Free

<Tabs>
  <Tab title="SDK">
    ```typescript theme={null}
    const data = await lava.gateway('https://api.hubapi.com/crm/v3/objects/contacts/{contact_id}?properties=email,firstname,lastname', { method: 'GET' });
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={null}
    curl "https://api.lava.so/v1/forward?u=https%3A%2F%2Fapi.hubapi.com%2Fcrm%2Fv3%2Fobjects%2Fcontacts%2F%7Bcontact_id%7D%3Fproperties%3Demail%2Cfirstname%2Clastname" \
      -H "Authorization: Bearer $LAVA_SECRET_KEY"
    ```
  </Tab>
</Tabs>

### Create a new contact record.

**POST** `https://api.hubapi.com/crm/v3/objects/contacts` — Free

<Tabs>
  <Tab title="SDK">
    ```typescript theme={null}
    const data = await lava.gateway('https://api.hubapi.com/crm/v3/objects/contacts', {
      body: {
    "properties": {
      "email": "ada@example.com",
      "firstname": "Ada",
      "lastname": "Lovelace"
    }
    },
    });
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={null}
    curl -X POST "https://api.lava.so/v1/forward?u=https%3A%2F%2Fapi.hubapi.com%2Fcrm%2Fv3%2Fobjects%2Fcontacts" \
      -H "Authorization: Bearer $LAVA_SECRET_KEY" \
      -H "Content-Type: application/json" \
      -d '{"properties":{"email":"ada@example.com","firstname":"Ada","lastname":"Lovelace"}}'
    ```
  </Tab>
</Tabs>

### Update an existing contact. Only properties in the request body are modified.

**PATCH** `https://api.hubapi.com/crm/v3/objects/contacts/{contact_id}` — Free

<Tabs>
  <Tab title="SDK">
    ```typescript theme={null}
    const data = await lava.gateway('https://api.hubapi.com/crm/v3/objects/contacts/{contact_id}', { method: 'PATCH', body: {"properties":{"lifecyclestage":"customer"}} });
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={null}
    curl -X PATCH "https://api.lava.so/v1/forward?u=https%3A%2F%2Fapi.hubapi.com%2Fcrm%2Fv3%2Fobjects%2Fcontacts%2F%7Bcontact_id%7D" \
      -H "Authorization: Bearer $LAVA_SECRET_KEY" \
      -H "Content-Type: application/json" \
      -d '{"properties":{"lifecyclestage":"customer"}}'
    ```
  </Tab>
</Tabs>

### Search contacts with filter groups. Use for email lookups, recent activity, or custom property matching.

**POST** `https://api.hubapi.com/crm/v3/objects/contacts/search` — Free

<Tabs>
  <Tab title="SDK">
    ```typescript theme={null}
    const data = await lava.gateway('https://api.hubapi.com/crm/v3/objects/contacts/search', {
      body: {
    "filterGroups": [
      {
        "filters": [
          {
            "propertyName": "email",
            "operator": "EQ",
            "value": "ada@example.com"
          }
        ]
      }
    ]
    },
    });
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={null}
    curl -X POST "https://api.lava.so/v1/forward?u=https%3A%2F%2Fapi.hubapi.com%2Fcrm%2Fv3%2Fobjects%2Fcontacts%2Fsearch" \
      -H "Authorization: Bearer $LAVA_SECRET_KEY" \
      -H "Content-Type: application/json" \
      -d '{"filterGroups":[{"filters":[{"propertyName":"email","operator":"EQ","value":"ada@example.com"}]}]}'
    ```
  </Tab>
</Tabs>

### List companies with pagination and property selection.

**GET** `https://api.hubapi.com/crm/v3/objects/companies?limit=100&properties=name,domain,industry` — Free

<Tabs>
  <Tab title="SDK">
    ```typescript theme={null}
    const data = await lava.gateway('https://api.hubapi.com/crm/v3/objects/companies?limit=100&properties=name,domain,industry', { method: 'GET' });
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={null}
    curl "https://api.lava.so/v1/forward?u=https%3A%2F%2Fapi.hubapi.com%2Fcrm%2Fv3%2Fobjects%2Fcompanies%3Flimit%3D100%26properties%3Dname%2Cdomain%2Cindustry" \
      -H "Authorization: Bearer $LAVA_SECRET_KEY"
    ```
  </Tab>
</Tabs>

### List deals in the pipeline.

**GET** `https://api.hubapi.com/crm/v3/objects/deals?limit=100&properties=dealname,amount,dealstage,closedate` — Free

<Tabs>
  <Tab title="SDK">
    ```typescript theme={null}
    const data = await lava.gateway('https://api.hubapi.com/crm/v3/objects/deals?limit=100&properties=dealname,amount,dealstage,closedate', { method: 'GET' });
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={null}
    curl "https://api.lava.so/v1/forward?u=https%3A%2F%2Fapi.hubapi.com%2Fcrm%2Fv3%2Fobjects%2Fdeals%3Flimit%3D100%26properties%3Ddealname%2Camount%2Cdealstage%2Cclosedate" \
      -H "Authorization: Bearer $LAVA_SECRET_KEY"
    ```
  </Tab>
</Tabs>

### Create a new deal in a specified pipeline and stage.

**POST** `https://api.hubapi.com/crm/v3/objects/deals` — Free

<Tabs>
  <Tab title="SDK">
    ```typescript theme={null}
    const data = await lava.gateway('https://api.hubapi.com/crm/v3/objects/deals', {
      body: {
    "properties": {
      "dealname": "Example Deal",
      "amount": "5000",
      "dealstage": "qualifiedtobuy",
      "pipeline": "default"
    }
    },
    });
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={null}
    curl -X POST "https://api.lava.so/v1/forward?u=https%3A%2F%2Fapi.hubapi.com%2Fcrm%2Fv3%2Fobjects%2Fdeals" \
      -H "Authorization: Bearer $LAVA_SECRET_KEY" \
      -H "Content-Type: application/json" \
      -d '{"properties":{"dealname":"Example Deal","amount":"5000","dealstage":"qualifiedtobuy","pipeline":"default"}}'
    ```
  </Tab>
</Tabs>

### Archive (soft-delete) a contact by ID. HubSpot retains the record for 90 days in case of recovery.

**DELETE** `https://api.hubapi.com/crm/v3/objects/contacts/{contact_id}` — Free

<Tabs>
  <Tab title="SDK">
    ```typescript theme={null}
    const data = await lava.gateway('https://api.hubapi.com/crm/v3/objects/contacts/{contact_id}', { method: 'DELETE' });
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={null}
    curl -X DELETE "https://api.lava.so/v1/forward?u=https%3A%2F%2Fapi.hubapi.com%2Fcrm%2Fv3%2Fobjects%2Fcontacts%2F%7Bcontact_id%7D" \
      -H "Authorization: Bearer $LAVA_SECRET_KEY" \
      -H "Content-Type: application/json"
    ```
  </Tab>
</Tabs>

### Create or replace an association between two CRM objects (e.g. contact ↔ company).

**PUT** `https://api.hubapi.com/crm/v3/objects/contacts/{contact_id}/associations/companies/{company_id}/{association_type_id}` — Free

<Tabs>
  <Tab title="SDK">
    ```typescript theme={null}
    const data = await lava.gateway('https://api.hubapi.com/crm/v3/objects/contacts/{contact_id}/associations/companies/{company_id}/{association_type_id}', { method: 'PUT' });
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={null}
    curl -X PUT "https://api.lava.so/v1/forward?u=https%3A%2F%2Fapi.hubapi.com%2Fcrm%2Fv3%2Fobjects%2Fcontacts%2F%7Bcontact_id%7D%2Fassociations%2Fcompanies%2F%7Bcompany_id%7D%2F%7Bassociation_type_id%7D" \
      -H "Authorization: Bearer $LAVA_SECRET_KEY" \
      -H "Content-Type: application/json"
    ```
  </Tab>
</Tabs>

## Next Steps

<CardGroup cols={2}>
  <Card title="All Providers" icon="grid" href="/gateway/supported-providers">
    Browse all supported AI providers
  </Card>

  <Card title="Forward Proxy" icon="route" href="/gateway/forward-proxy">
    Learn how to construct proxy URLs and authenticate requests
  </Card>
</CardGroup>
