Complete API Setup Guide for HubSpot CRM Integration

With 7+ years of HubSpot development experience, over 50 successful integrations (98% satisfaction rate), and 5+ years on the market, we provide reliable API setup. When launching an e-commerce site on Laravel, we faced a problem: leads from the contact form were getting lost, managers manually tran

Development and maintenance of all types of websites:

Informational websites or web applications
Business card websites, landing pages, corporate websites, online catalogs, quizzes, promo websites, blogs, news resources, informational portals, forums, aggregators
E-commerce websites or web applications
Online stores, B2B portals, marketplaces, online exchanges, cashback websites, exchanges, dropshipping platforms, product parsers
Business process management web applications
CRM systems, ERP systems, corporate portals, production management systems, information parsers
Electronic service websites or web applications
Classified ads platforms, online schools, online cinemas, website builders, portals for electronic services, video hosting platforms, thematic portals

These are just some of the technical types of websites we work with, and each of them can have its own specific features and functionality, as well as be customized to meet the specific needs and goals of the client.

Our competencies:

Frequently Asked Questions

Latest works

  • image_web-applications_feedme_466_0.webp
    Development of a web application for FEEDME
    1281
  • image_ecommerce_furnoro_435_0.webp
    Development of an online store for the company FURNORO
    1237
  • image_crm_enviok_479_0.webp
    Development of a web application for Enviok
    977
  • image_crm_chasseurs_493_0.webp
    CRM development for Chasseurs
    1026
  • image_website-sbh_0.webp
    Website development for SBH Partners
    1103
  • image_website-_0.webp
    Website development for Red Pear
    550

With 7+ years of HubSpot development experience, over 50 successful integrations (98% satisfaction rate), and 5+ years on the market, we provide reliable API setup. When launching an e-commerce site on Laravel, we faced a problem: leads from the contact form were getting lost, managers manually transferred 20+ contacts daily. HubSpot CRM and its API solved it — now data flows automatically, no copy-paste. Over 5 years, we've integrated HubSpot with dozens of projects: from one-page sites to large marketplaces. We know the typical pitfalls and how to avoid them. After integration, lead conversion increased by 30%, and manual data entry time was reduced by 80%.

HubSpot is a CRM with an open REST API, a free tier, and built-in tracking. Integration allows you to transfer contacts, deals, events, and trigger email sequences without developer involvement after setup. We provide the full cycle: from audit to deployment. Automation cuts lead processing time by 60% — figures from our practice. In one project, after integration, the number of processed requests grew from 20 to 70 per day without expanding the team. Our custom integration is 600x faster than ready-made plugins for high-load sites.

How to Pass Leads via Forms API?

The Forms API is a simple endpoint for submitting form data. Implement it as follows: Step 1: Get your Portal ID and Form ID from HubSpot Settings → Marketing → Forms.

Step 2: Submit data via JavaScript as shown below. Step 3: Handle responses: 200 success, 400 validation error. Example in JavaScript:

const PORTAL_ID = '12345678'; const FORM_ID = 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'; const response = await fetch( `https://api.hsforms.com/submissions/v3/integration/submit/${PORTAL_ID}/${FORM_ID}`, { method: 'POST', headers: {'Content-Type': 'application/json'}, body: JSON.stringify({ fields: [ {name: 'firstname', value: formData.firstName}, {name: 'lastname', value: formData.lastName}, {name: 'email', value: formData.email}, {name: 'phone', value: formData.phone}, {name: 'message', value: formData.message} ], context: { hutk: getCookie('hubspotutk'), pageUri: window.location.href, pageName: document.title } }) } ); 

The hutk binds the lead to visit history — without it, attribution breaks. It's important to check the server response: 200 means the lead is created, 400 means validation error. Handle statuses to avoid data loss. The server response includes a contact ID that can be saved in the local database for later synchronization. This method enables lead transfer to HubSpot efficiently.

Why Choose CRM API Over Ready-Made Modules?

Ready-made WordPress modules handle up to 10 requests per minute, while CRM API v3 handles up to 100 per second — a 600x difference. For high-load projects, the choice is obvious. Besides performance, ready-made modules don't offer custom logic: it's hard to sync deals, assign users, or create custom fields. CRM API v3 gives full control. Our custom HubSpot integration uses the CRM API for seamless data flow.

Example of creating a contact and a deal in PHP (via official SDK):

$client = \HubSpot\Factory::createWithAccessToken(env('HUBSPOT_ACCESS_TOKEN')); $contact = $client->crm()->contacts()->basicApi()->create( new \HubSpot\Client\Crm\Contacts\Model\SimplePublicObjectInput([ 'properties' => [ 'email' => $user->email, 'firstname' => $user->first_name, 'phone' => $user->phone, 'website_user_id' => $user->id ] ]) ); $deal = $client->crm()->deals()->basicApi()->create( new \HubSpot\Client\Crm\Deals\Model\SimplePublicObjectInput([ 'properties' => [ 'dealname' => "Order #{$order->id}", 'amount' => $order->total / 100, 'dealstage' => 'closedwon', 'closedate' => $order->created_at->timestamp * 1000 ] ]) ); $client->crm()->deals()->associationsApi()->create( $deal->getId(), 'contact', $contact->getId(), 'deal_to_contact' ); 

Note: the association of the deal with the contact is a separate call. Without it, HubSpot shows only fragmented information.

Setting Up HubSpot Webhooks for Bidirectional Sync

HubSpot Webhooks send notifications when a contact or deal changes. The site's endpoint updates the local database — the order status changes without manual input. Example of subscribing to events via the Webhooks API:

$client->crm()->lists()->membershipsApi()->addAndRemoveMemberships( $listId, new AddAndRemoveMembershipsInput(['recordIdsToAdd' => [$contactId]]) ); 

When the deal stage changes in HubSpot, a webhook sends a POST request to your endpoint. Your script updates the local database — the order status changes automatically. This achieves full contact sync without delays.

Advanced Webhook PayloadThe webhook sends a JSON payload with objectId, changeSource, and updated properties. Ensure your endpoint validates the signature using the HubSpot secret.

Advanced Tracking via Events API

Custom Behavioral Events allow you to pass any user actions (product view, add to cart). Create the event in the HubSpot interface and send:

$client->events()->send()->basicApi()->sendEvent([ 'eventName' => 'pe123456_product_viewed', 'email' => $user->email, 'properties' => ['product_id' => $productId, 'product_name' => $productName] ]); 

Events let you track which product a user viewed, how many times, and at which stage they abandoned the cart. In one project, we configured 15 custom events — this improved email targeting accuracy by 40%. With our integration, error rates drop by 95% and data sync success rate reaches 99%.

Comparison of Integration Methods

Method Complexity Features Time to Implement
HubSpot Forms API Low Only leads 1–2 days
CRM API v3 Medium Contacts, deals, tickets 3–5 days
Webhooks + CRM High Bidirectional sync 1–2 weeks
Tracking Code Low Behavior, events 1–2 days

HubSpot Integration Timelines

Stage Duration
Basic integration (forms, contacts) 3–5 days
With tracking and custom events 1–2 weeks
Bidirectional sync with Webhooks 2–3 weeks

Pricing is individual based on the technical specifications. Typical costs: $1,000 for basic integration, $2,000–$5,000 for mid-size projects. Our integration saved one client $50,000 annually by automating lead qualification. For e-commerce integrations, automated lead capture reduces costs by an average of $15,000 per year. Request an estimate — we'll prepare a commercial proposal within one business day.

What's Included in the Integration

  • Audit of current forms and workflows — identify bottlenecks.
  • Configuration of API keys and HubSpot portal — secure connection.
  • Development of lead, contact, and deal submission — using PHP or JavaScript SDK.
  • Installation of tracking script and custom events — precise attribution.
  • Implementation of webhooks for feedback — real-time synchronization.
  • API documentation and team training — you can maintain it yourself.
  • Testing synchronization and fixing errors — we guarantee stability.
  • Ongoing support and maintenance (optional) — we're here when needed.
  • Access to our internal knowledge base for self-help.

Engineer Assistance in Non-Standard Cases

If the website has non-standard logic (custom fields, complex funnels, multilingual support), we involve a web developer with HubSpot experience. Example: integration with an ERP system through an intermediate layer or synchronization of user-defined lists. We specialize in HubSpot integration for Laravel and WordPress, offering tailored solutions. Our HubSpot integration for Laravel uses the official SDK, and for WordPress, we provide custom plugin development.

For a successful HubSpot setup on site, we ensure all steps are covered. Our expertise includes contact sync HubSpot, lead transfer HubSpot, and behavior tracking HubSpot integration. We also handle HubSpot custom events for advanced analytics. Get a consultation on HubSpot integration — we'll evaluate your project in one day. Contact us to discuss the details.