---
title: "Disconnect HubSpot"
description: "Revokes the grant at HubSpot and clears the tokens."
canonical_url: "https://twominutebilling.com/help/developers/api-reference/hubspot/disconnect-hubspot"
---
# Disconnect HubSpot

> Revokes the grant at HubSpot and clears the tokens.

<api-operation method="DELETE" path="/v1/businesses/{biz}/integrations/hubspot">
<template v-slot:docs="">

Record links and sync history are kept for a reconnect.

## Path parameters

<table>
<thead>
  <tr>
    <th>
      Parameter
    </th>
    
    <th>
      Type
    </th>
    
    <th>
      Required
    </th>
    
    <th>
      Description
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        biz
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      <strong>
        yes
      </strong>
    </td>
    
    <td>
      Business id (biz_…)
    </td>
  </tr>
</tbody>
</table>

## Headers

<table>
<thead>
  <tr>
    <th>
      Parameter
    </th>
    
    <th>
      Type
    </th>
    
    <th>
      Required
    </th>
    
    <th>
      Description
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        Idempotency-Key
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      no
    </td>
    
    <td>
      Safely retry writes — repeats return the original response. If a write FAILED after it had already taken effect, that failure is what repeats: the key is spent, and a new attempt needs a new key.
    </td>
  </tr>
</tbody>
</table>

## Response

<table>
<thead>
  <tr>
    <th>
      Field
    </th>
    
    <th>
      Type
    </th>
    
    <th>
      Description
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        object
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      The object type.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        status
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      The connection's status. One of <code>
        not_connected
      </code>
      
      , <code>
        active
      </code>
      
      , <code>
        reauth_required
      </code>
      
      .
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        configured
      </code>
    </td>
    
    <td>
      <code>
        boolean
      </code>
    </td>
    
    <td>
      Whether this deployment has a HubSpot app configured.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        authorize_url
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      The URL that starts the HubSpot authorization.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        id
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      The HubSpot connection's id.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        portal_id
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      The connected HubSpot account's id.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        hub_domain
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      The connected HubSpot account's domain.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        installed_by
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      Who connected the account.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        scopes
      </code>
    </td>
    
    <td>
      <code>
        array of string
      </code>
    </td>
    
    <td>
      The permissions granted by HubSpot.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        autosync
      </code>
    </td>
    
    <td>
      <code>
        boolean
      </code>
    </td>
    
    <td>
      Whether changes sync to HubSpot automatically.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        initial_sync
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      <code>
        pending
      </code>
      
       until the first sync is started; nothing syncs before that. One of <code>
        pending
      </code>
      
      , <code>
        queued
      </code>
      
      , <code>
        running
      </code>
      
      , <code>
        done
      </code>
      
      .
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        last_sync_at
      </code>
    </td>
    
    <td>
      <code>
        string · ISO-8601
      </code>
    </td>
    
    <td>
      When the last sync finished (ISO-8601 UTC).
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        last_error
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      The last sync error, if any.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        connected_at
      </code>
    </td>
    
    <td>
      <code>
        string · ISO-8601
      </code>
    </td>
    
    <td>
      When the account was connected (ISO-8601 UTC).
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        health
      </code>
    </td>
    
    <td>
      <code>
        object
      </code>
    </td>
    
    <td>
      How the sync is doing.
    </td>
  </tr>
</tbody>
</table>

## Status codes

<table>
<thead>
  <tr>
    <th>
      Status
    </th>
    
    <th>
      Meaning
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        200
      </code>
    </td>
    
    <td>
      Success
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        404
      </code>
    </td>
    
    <td>
      HubSpot is not connected
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        409
      </code>
    </td>
    
    <td>
      Idempotency-Key conflict — the key is already in flight, or was reused with a different request payload.
    </td>
  </tr>
</tbody>
</table>
</template>

<template v-slot:request="">

```bash [Request]
curl -X DELETE "$TMBILLING_URL/v1/businesses/biz_XXXXXXXXXXXX01/integrations/hubspot" \
  -H "Authorization: Bearer $TMBILLING_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"
```

</template>

<template v-slot:response="">
<code-group>

```json [200 OK]
{
  "object": "hubspot_connection",
  "status": "active",
  "configured": false,
  "authorize_url": "https://example.com/webhooks/billing",
  "id": "hsc_V1StGXR8Z5jdHi6BmyT2k8qP",
  "portal_id": "46664779",
  "hub_domain": "example.com",
  "installed_by": "maya@example.com",
  "scopes": [
    "Scope"
  ],
  "autosync": false,
  "initial_sync": "pending",
  "last_sync_at": "2026-03-14T09:30:00Z",
  "last_error": null,
  "connected_at": "2026-03-14T09:30:00Z",
  "health": {
    "last_run": {
      "object": "hubspot_sync_run",
      "id": "hsr_V1StGXR8Z5jdHi6BmyT2k8qP",
      "trigger": "event",
      "status": "running",
      "created": 1,
      "updated": 1
    },
    "pending": 1,
    "retrying": 1,
    "synced_24h": 1,
    "failed_24h": 1
  }
}
```

```json [404 Not Found]
{
  "error": {
    "type": "invalid_request_error",
    "message": "HubSpot is not connected"
  }
}
```

```json [409 Conflict]
{
  "error": {
    "type": "idempotency_error",
    "message": "Idempotency-Key conflict — the key is already in flight, or was reused with a different request payload."
  }
}
```

</code-group>
</template>
</api-operation>


## Sitemap

See the full [sitemap](https://twominutebilling.com/sitemap.md) for all pages.
