Bitrix24 Lead Transfer from Website: REST API Automation

The feedback form on the site is filled out — the lead doesn't appear in the CRM. The manager learns about the request from an email half an hour later and manually enters the data. During that time, every third client moves on to competitors. Our team has encountered such situations many times: lea

Our competencies:

Frequently Asked Questions

The feedback form on the site is filled out — the lead doesn't appear in the CRM. The manager learns about the request from an email half an hour later and manually enters the data. During that time, every third client moves on to competitors. Our team has encountered such situations many times: lead loss due to manual processing reaches 30%, costing approximately $2 per lost lead. We configure automatic lead submission so that the request lands in Bitrix24 in 2 seconds — that's 900 times faster than manual entry. Contact us — we will set up lead transfer turnkey.

Proper configuration eliminates losses, speeds up processing, and provides full attribution: where the client came from, which form they used, which UTM tags worked. We guarantee stable integration. Moreover, REST API is 3 times more flexible than the standard Connector — it handles any custom forms and passes up to 50 additional fields. Time savings for managers after automation is up to 80%, translating to over $1,500 monthly for a team of five. Typical implementation cost ranges from $500 to $2,000 depending on complexity.

How to Configure REST API for Lead Transfer?

  1. Obtain an incoming webhook endpoint in Bitrix24 via the admin panel: Applications → Webhooks → Incoming Webhook. Select crm permissions (read/write) to work with leads and contacts. Copy the webhook URL — this is the JSON-RPC entry point for all REST requests. The webhook is generated once and remains constant; protect it from leaks.

  2. In the site form handler (e.g., a PHP function processing the form submission event), use the following code structure:

use Bitrix\Main\Web\HttpClient; $webhookUrl = 'https://your-domain.bitrix24.ru/rest/1/token/'; // replace with actual webhook $http = new HttpClient(); $http->setHeader('Content-Type', 'application/json'); $leadData = [ 'TITLE' => 'Site request: ' . $formFields['NAME'], 'NAME' => $formFields['NAME'], 'PHONE' => [['VALUE' => $formFields['PHONE'], 'VALUE_TYPE' => 'WORK']], 'EMAIL' => [['VALUE' => $formFields['EMAIL'], 'VALUE_TYPE' => 'WORK']], 'COMMENTS' => $formFields['MESSAGE'], 'SOURCE_ID' => 'WEB', 'SOURCE_DESCRIPTION' => 'Form: ' . $formName . ' | URL: ' . $pageUrl, ]; $response = $http->post( $webhookUrl . 'crm.lead.add.json', json_encode(['fields' => $leadData, 'params' => ['REGISTER_SONET_EVENT' => 'Y']]) ); 

For more details, see the official REST API documentation.

Comparison of Transfer Methods

Method Complexity Flexibility Setup Time Custom Field Support
Bitrix24.Connector Module Low Low (only standard site forms) 2–4 hours No, limited to standard fields
REST API (manual) High High (any forms, all data sources, UTM, deduplication) 4–8 hours Yes, up to 50 additional fields
CommerceML Exchange Medium Medium (catalog and order sync, not real-time) 1–2 days Limited to CommerceML schema

REST API is more flexible for e-commerce and B2B, where complex data transfer from various sources is crucial. Unlike CommerceML exchange, REST API allows real-time lead submission with full attribution.

Why is Deduplication Important?

Before creating a lead, we check existing contacts by phone via crm.duplicate.findByComm:

$dupes = $http->post($webhookUrl . 'crm.duplicate.findByComm.json', json_encode([ 'type' => 'PHONE', 'values' => [$formFields['PHONE']], ])); 

If a contact is found, we create a deal/activity on the existing contact rather than a new lead. This prevents cluttering the CRM with duplicate leads from repeat clients. In practice, deduplication reduces repeat leads by 30%.

What Automatic Lead Transfer Delivers

Compare: before setup — 30 minutes of manual transfer, 15% error probability, loss of every third lead. After — 2 seconds, 0 errors, 100% retention. Time savings for managers is up to 80%.

Parameter Before Setup After Setup
Request processing time 30 min 2 sec
Lead loss ~30% <1%
Entry errors 15% 0%
Attribution None Full (UTM, source)
Common REST API Errors and Solutions
  • 403 Forbidden: Ensure crm permissions are set in the webhook scope. Without proper scope, lead creation fails.
  • Missing TITLE/NAME: Pass at least TITLE and one contact field; otherwise the lead is not created.
  • UTM attribution loss: Extend session lifetime or read UTM from URL parameters to avoid loss on long form fills.
  • Duplicate leads: Always call crm.duplicate.findByComm before creating a lead. Implement idempotency keys if needed.
  • Unassigned leads: Set ASSIGNED_BY_ID to assign responsible manager automatically.
  • Silent failures: Check HTTP response code and log errors; use cURL verbose mode for debugging.

Typical Errors When Configuring REST API for Lead Transfer

Unstable integration often arises from configuration shortcomings. The most frequent errors:

  • crm permissions not set in the webhook — leads are not created at all, error code 403 Forbidden.
  • Only phone is passed without TITLE and NAME — the lead is not visible in Bitrix24 list, creation fails.
  • UTM tags are taken from session but session is not extended — attribution breaks on long form fills (over an hour).
  • Deduplication missing — 5–10 duplicate leads are created for the same client from different sources and devices.
  • ASSIGNED_BY_ID not set — leads are created but not assigned to managers, breaking workflow.
  • Handler does not check HTTP response code — errors go unnoticed, managers lose leads.

Deliverables

  • Analysis of current site forms and information blocks.
  • Creation of an incoming webhook with the required permissions.
  • Writing a PHP handler with UTM and deduplication (JSON-RPC, cURL, idempotency).
  • Configuring responsible assignment (by city, service, time) using ASSIGNED_BY_ID.
  • Testing on live data with API rate limit handling.
  • Handover of documentation and manager training.
  • Two weeks of post-release support.

Both 1C-Bitrix and Bitrix24 support these integration methods, improving sales automation and lead generation. Our team has 10+ years of practical experience with Bitrix and Bitrix24, with over 50 successful integrations across various industries. We guarantee all work — the integration will be stable and reliable. Get a free consultation for your project — we will assess the scope, timeline, and cost.