HubSpot Reference
HubSpot database schema
You can select to sync any of HubSpot's standard CRM objects to your Sequin database:
- Companies
- Contacts
- Deals
- Line items
- Owners
- Products
- Quotes
- Tickets
Additionally, Sequin can sync custom CRM objects and associations between any of these collections.
Need other objects in your sync? Just send us a note.
The syncing process
HubSpot OAuth Apps like Sequin have dedicated rate limits:
API | Syncs | Request limit | Interval |
---|---|---|---|
Standard | Owners, Pipelines, Associations | 100 | 10 seconds |
Search | Objects (e.g. Company, Contact, custom objects) | 4 | 1 second |
Because these limits are scoped to the OAuth application, Sequin won't impact your existing API quota usage (whether from other OAuth apps or your own HubSpot Private app). Sequin selects the fastest API to use for each collection in each stage of your sync's lifecycle and maximizes its consumption of the available rate limit.
Because your synced tables share these rate limits, we recommend syncing what you need. If you realize you aren't using one or more synced HubSpot tables, removing it from your sync may speed up the other tables!
When you create a sync or update your selected columns, Sequin initializes your tables with the current state of your HubSpot data. After the initial backfill, it continuously polls those collections — either repeatedly sweeping a collection or listening for changed records — and updates your tables accordingly.
Because these rate limits are scoped to our OAuth app and your HubSpot workspace, we do not recommend syncing the same HubSpot workspace with more than one active Sequin sync.
Learn more about our syncing process.
Associations
When you associate two objects in HubSpot, the association is undirected. When Contact A is associated with Company X, Company X is reciprocally associated with Contact A.
You can use association labels to indicate the kind of association between two objects. For example, Contact A can be a Manager at Company X and also a Former Employee at Company Y; you would associate Contact A with both companies but label the associations differently.
For any pair of object types, Sequin syncs all associations between objects of those types to an associative table. For example, every association between a Contact and a Company syncs to the table associations_company_contact
with the following structure:additional-fields
Column name | Postgres type | Example value | Description |
---|---|---|---|
company_id | text | "9457785876" | The associated company's HubSpot ID. |
contact_id | text | "36701" | The associated contact's HubSpot ID. |
labels | text[] | {"Manager"} | The association's labels. |
Because HubSpot associations are undirected, these associations will only appear in one table: if you have a table associations_company_contact
, there won't be a table with the opposite order (associations_contact_company
). These table names are a fixed function of the type names.
You can JOIN
using the associations tables:
SELECT
-- Contact data.
contact.id, contact.email,
-- Data from the corresponding company.
company.id, company.city,
-- Label data from the associations table.
association.labels
FROM hubspot.associations_company_contact association
LEFT JOIN hubspot.company company ON company.id = association.company_id
LEFT JOIN hubspot.contact contact ON contact.id = association.contact_id;
This example uses Contact and Company, but the same patterns apply for any other HubSpot CRM objects you can sync with Sequin. For example, if you have custom Requests and custom Cars in HubSpot, Sequin would sync an associations_car_request
table with the columns car_id
and request_id
.
Writes
Sequin provisions a read-only sync of your HubSpot data. This is to promote a one-way data flow architecture.
Data flows from HubSpot to your Postgres database. Your code or SQL client then reads from the database. To mutate your data, you write to the HubSpot API through Sequin. Those mutations are applied simultaneously to both your HubSpot base and your Sequin database so that they show up in subsequent reads by your code or SQL client.

With this architecture, your code is structured so that you're using SQL for reads but API calls for writes. This gives you the best of both worlds and ensures your database stays in sync with your HubSpot instance.
HubSpot Proxy
Sequin's HubSpot Proxy supports a subset of the HubSpot CRM API. Each HubSpot sync comes with a unique proxy API root.
To find your API root, log into app.sequin.io and edit your HubSpot sync. Copy the unique identifier at the end of your URL: if your sync is at https://app.sequin.io/resources/PUD9iQVK
, the unique identifier is PUD9iQVK
. Then your proxy API root is
https://proxy.sequin.io/{YOUR_UNIQUE_IDENTIFIER}
To run your HubSpot CRM API request through the Sequin proxy, prepend that URL to before the HubSpot URL in your path. For example, to create a HubSpot Contact, the URL https://api.hubapi.com/crm/v3/objects/contacts
becomes
https://proxy.sequin.io/{YOUR_UNIQUE_IDENTIFIER}/api.hubapi.com/crm/v3/objects/contacts
Sequin's HubSpot Proxy supports the following endpoints in the HubSpot CRM API:
API | Action | HTTP Method | Path |
---|---|---|---|
Associations | Create | PUT | /crm/v4/objects/{objectType}/{objectId}/associations/{toObjectType}/{toObjectId} |
Associations | Delete | DELETE | /crm/v4/objects/{objectType}/{objectId}/associations/{toObjectType}/{toObjectId} |
Objects | Create | POST | /crm/v3/objects/{objectType} |
Objects | Update | PATCH | /crm/v3/objects/{objectType}/{objectId} |
Objects | Archive | DELETE | /crm/v3/objects/{objectType}/{objectId} |
Objects | Batch create | POST | /crm/v3/objects/{objectType}/batch/create |
Objects | Batch update | POST | /crm/v3/objects/{objectType}/batch/update |
Sequin's HubSpot proxy is meant for writing data to HubSpot. We do not recommend using it to read data systematically. Use the database!
Authentication
Sequin's proxy forwards the authentication provided with each call to HubSpot; it does not use your sync credential.
Authenticate requests to Sequin's HubSpot proxy like you would authenticate requests to the HubSpot API: provide a Bearer
token. For more info, see Authentication methods on HubSpot.
- There may be other fields in your table, like
_sync_hash
,_sync_inserted_at
, and_sync_updated_at
. Don't be alarmed: Sequin uses these columns to keep data flowing into Postgres smoothly. Just don't tamper with this data!↩