HubSpot Integration

DayZero integrates with HubSpot to sync customer and contact data between your CRM and accounting system.

Connect HubSpot

Step 1: Get the connect URL

bash
curl "https://api.ondayzero.com/api/v1/hubspot/connect-url" \
  -H "Authorization: Bearer dz_your_token_here" \
  -H "x-business-id: YOUR_BUSINESS_ID"

Requires admin permission. Returns a HubSpot OAuth authorization URL.

Step 2: Complete OAuth

Redirect the user to the connect URL. After authorization, HubSpot redirects back with code and state parameters.

Step 3: Check status

bash
curl "https://api.ondayzero.com/api/v1/hubspot/status" \
  -H "Authorization: Bearer dz_your_token_here" \
  -H "x-business-id: YOUR_BUSINESS_ID"

Sync Data

Full Sync

bash
curl -X POST "https://api.ondayzero.com/api/v1/hubspot/sync" \
  -H "Authorization: Bearer dz_your_token_here" \
  -H "x-business-id: YOUR_BUSINESS_ID"

Sync Contacts Only

bash
curl -X POST "https://api.ondayzero.com/api/v1/hubspot/sync/contacts" \
  -H "Authorization: Bearer dz_your_token_here" \
  -H "x-business-id: YOUR_BUSINESS_ID"

Sync Invoices Only

bash
curl -X POST "https://api.ondayzero.com/api/v1/hubspot/sync/invoices" \
  -H "Authorization: Bearer dz_your_token_here" \
  -H "x-business-id: YOUR_BUSINESS_ID"

View Data

Contacts

bash
curl "https://api.ondayzero.com/api/v1/hubspot/contacts?limit=50" \
  -H "Authorization: Bearer dz_your_token_here" \
  -H "x-business-id: YOUR_BUSINESS_ID"
Parameter Type Description
limit integer Max results (up to 100)
after string Pagination cursor

Deals

bash
curl "https://api.ondayzero.com/api/v1/hubspot/deals?limit=50" \
  -H "Authorization: Bearer dz_your_token_here" \
  -H "x-business-id: YOUR_BUSINESS_ID"

Disconnect

bash
curl -X DELETE "https://api.ondayzero.com/api/v1/hubspot/disconnect" \
  -H "Authorization: Bearer dz_your_token_here" \
  -H "x-business-id: YOUR_BUSINESS_ID"