The Bitrix24 REST API for lead creation uses the crm.lead.add method, usually called through an inbound webhook URL, to create a lead in Bitrix24 CRM from any external system. You send the lead's title, name, phone, email, source and custom fields as JSON, and Bitrix24 returns the new lead ID, ready for assignment and automation.
The Bitrix24 REST API for lead creation lets any outside system, such as your website, mobile app, landing page builder or a lead portal, create a lead in Bitrix24 CRM by calling the crm.lead.add method. In most cases you create an inbound webhook in Bitrix24, send the lead details to that URL as JSON, and Bitrix24 responds with the new lead's ID. From that moment, your normal CRM automation takes over.
Ready-made connectors cover Facebook, Instagram, web forms and many portals. But Indian businesses often have something custom: a booking app built by a local agency, a dealer portal, a property listing site, or an old PHP website with its own enquiry form. That is where the REST API comes in.
When should you use the API instead of a ready connector?
Use the simplest tool that does the job. The API is the right choice when:
- Your lead source has no native Bitrix24 integration.
- You need to send custom fields like project, budget, city or course that a standard form cannot map.
- Leads come from your own software or mobile app.
- You must check for duplicates or enrich data before creating the lead.
- You want to assign leads by your own rules, for example by pincode.
If your site is a simple brochure site, a Bitrix24 CRM form may be faster. For a broader introduction to webhooks and API options, see our Bitrix24 webhooks and REST API guide.
Webhook or OAuth app: which one do you need?
| Option | How it authenticates | Best for | Watch out for |
|---|---|---|---|
| Inbound webhook | A secret URL tied to one user with chosen permissions | One company's own integrations | Anyone with the URL can call it; keep it secret |
| Local application (OAuth) | App installed in your portal with tokens | Integrations needing events or a UI inside Bitrix24 | More setup; tokens must be refreshed |
| Marketplace app | Published app using OAuth | Software vendors serving many portals | Overkill for a single business |
For lead creation from your own website or system, an inbound webhook is the usual choice.
How to create an inbound webhook for leads
- In Bitrix24, open Developer resources (or the Applications/Webhooks section, depending on your version).
- Choose Inbound webhook.
- Select the CRM permission scope only. Do not give more access than needed.
- Save. Bitrix24 shows a URL that looks like
https://yourcompany.bitrix24.in/rest/1/abc123secret/. - Store this URL in your server's environment settings, never in front-end JavaScript where visitors can read it.
The webhook acts as the user who created it, so use an integration user or admin account that will not be deactivated when someone leaves.
A simple Bitrix24 REST API lead creation example
Here is what a minimal request looks like. Your server sends an HTTP POST to the webhook URL with the method name added at the end:
POST https://yourcompany.bitrix24.in/rest/1/abc123secret/crm.lead.add.json
The JSON body contains a fields object. A typical lead from a Chennai property landing page would carry these values:
| JSON key | Example value |
|---|---|
TITLE | Website enquiry - 2BHK Velachery |
NAME / LAST_NAME | Karthik / S |
PHONE | [{"VALUE": "+919800000000", "VALUE_TYPE": "MOBILE"}] |
EMAIL | [{"VALUE": "[email protected]", "VALUE_TYPE": "WORK"}] |
SOURCE_ID | WEB |
SOURCE_DESCRIPTION | Landing page: velachery-2bhk |
ASSIGNED_BY_ID | 12 (the Bitrix24 user ID of the rep) |
COMMENTS | Budget around 80L, wants site visit this weekend |
You can also send a params object with {"REGISTER_SONET_EVENT": "Y"} so the new lead appears in the activity stream and the assigned rep is notified.
A successful response returns JSON with "result" set to the new lead ID. Your code should save that ID in its own database, so later updates can use crm.lead.update.
Notice that phone and email are sent as lists of objects with a value and type. This is the most common reason first attempts fail.
Mapping your form fields to Bitrix24 fields
Plan the mapping before you write code. A typical map for an Indian lead form:
| Your form field | Bitrix24 field | Notes |
|---|---|---|
| Full name | NAME, LAST_NAME | Split if possible, or put all in NAME |
| Mobile | PHONE (list) | Send with +91 for reliable duplicate matching |
| EMAIL (list) | Optional but useful | |
| Enquiry subject | TITLE | Make it readable: source + product + city |
| Lead source | SOURCE_ID | Use your configured source codes |
| Campaign | UTM_SOURCE, UTM_CAMPAIGN, or custom fields | Lets you report by campaign |
| City / pincode | Custom field (UF_CRM_...) | Create in CRM settings first |
| Budget / course / product | Custom field or COMMENTS | Custom fields are reportable |
| Assigned rep | ASSIGNED_BY_ID | User ID from Bitrix24 |
Custom fields have codes starting with UF_CRM_. You can see field codes using the crm.lead.fields method. If you track campaigns, our guide on Bitrix24 UTM lead source tracking explains how to keep source data clean.
How do you avoid duplicate leads through the API?
The API creates exactly what you send. If the same person submits your form three times, you get three leads unless you check first. Options:
- Check before creating. Call
crm.duplicate.findbycommwith the phone or email. If a lead or contact exists, add an activity or comment to it instead of creating a new lead. - Use Bitrix24 duplicate control on the CRM side to flag duplicates for merging.
- Debounce on your website, so a double-click does not send two requests.
At Acemagick, we prefer checking before creating for high-volume sources like portals and ads, so sales sees one clean record per person.
What happens if your CRM uses deals without leads?
Bitrix24 can run in a simple mode where leads are switched off and enquiries go straight to deals and contacts. In that case, creating a lead is not the right call. Instead, create a contact with crm.contact.add and a deal with crm.deal.add, linking the deal to the contact. Newer universal methods such as crm.item.add can also create items by entity type. Check which mode your account uses before writing code; our article on Bitrix24 CRM lead vs deal mode explains the difference.
Error handling and reliability checklist
An API integration fails quietly unless you plan for it. Before go-live, make sure your code:
- Logs every request and response, including the lead ID or error message.
- Retries on temporary failures, such as timeouts, with a short delay.
- Respects request limits. Bitrix24 limits how many requests a portal can make per second, so queue bursts instead of firing hundreds at once.
- Alerts someone on repeated errors, for example by email or a Bitrix24 notification.
- Validates phone numbers before sending, so junk does not enter the CRM.
- Keeps the webhook URL secret and rotates it if it is ever exposed.
- Is tested in a copy or test pipeline before connecting real traffic.
Common errors and what they mean
- Access denied or invalid token: the webhook was deleted, the user was deactivated or the URL is wrong.
- Lead created but phone is empty: phone sent as a string instead of a list of objects.
- Custom field not saved: wrong field code, or a list field sent as text instead of the option ID.
- Too many requests: requests sent faster than the portal allows; add a queue.
Why choose Acemagick as your Bitrix24 Gold Partner
API work is where small mistakes cost the most leads. Here is why businesses choose Acemagick:
- Bitrix24 Gold Partner in Chennai serving businesses across India, and an official Bitrix24 Gold Partner working with Indian businesses that need custom integrations.
- Custom API integrations are a core service, from websites and portals to payment gateways such as Razorpay.
- Real integration work: for Fly Airtaxi, we built a service that writes the caller's IVR choice into the matching Bitrix24 lead automatically; for Bonvoice, Facebook Lead Ads flow straight into the right pipeline.
- Clear first-year pricing from βΉ30K for 5 users, plus GST; custom software quoted per project.
- Daily system health monitoring and weekday support after go-live.
Get leads flowing in automatically
The Bitrix24 REST API for lead creation is the cleanest way to bring leads from any custom source into your CRM, as long as fields, duplicates and errors are handled properly. If you want it built and monitored by experts, explore our Bitrix24 integration services. Call or WhatsApp +91 96770 10013, email [email protected], or talk to our team.
Why Bitrix24 is our top CRM pick for Indian businesses
- β All-in-one: CRM, tasks, projects, chat, telephony, HR and websites in one product, instead of paying for five separate apps.
- β Start free, grow later: a free plan to begin with and paid plans as your team grows.
- β Strong automation: automation rules, triggers and smart processes for sales and non-sales work.
- β Works the Indian way: WhatsApp, IVR, Facebook leads, payment links and GST-ready quotes connect easily.
- β Open API: connects to Tally, ERPs and your own software through webhooks and the REST API.
Why work with Acemagick on your Bitrix24 CRM
- β Official Bitrix24 Gold Partner based in Chennai, serving businesses across India.
- β Clear per-seat pricing: from βΉ30K + GST for 5 users, with WhatsApp API, AI chatbot and Day 1/3/7 follow-ups included.
- β Real integration work: Facebook Lead Ads for Bonvoice, IVR-to-lead automation for Fly Airtaxi, smart processes for Q-Line.
- β Your team actually uses it: live Zoom training, recorded videos, SOP/KRA/KPI framework.
- β Support after go-live: on-call help MonβFri, daily health checks, monthly reports and strategy calls β we stay with you after go-live.
Frequently Asked Questions
Which Bitrix24 API method creates a lead?
+
The crm.lead.add method creates a lead in Bitrix24 CRM. You send a fields object containing details like TITLE, NAME, PHONE, EMAIL and SOURCE_ID, and Bitrix24 returns the ID of the new lead. Newer universal CRM methods can also create items by entity type.
Do I need coding skills to use the Bitrix24 REST API?
+
Basic coding is needed, because the API is called by sending HTTP requests from a server, script or automation tool. A developer familiar with PHP, Python or Node.js can usually build a simple lead integration quickly. No-code tools that support webhooks can also call it.
Is it safe to use a Bitrix24 webhook on my website?
+
It is safe if the webhook URL is kept on your server and never placed in front-end code visible to visitors. Give the webhook only CRM permissions, create it under an integration user, and replace it immediately if the URL is ever exposed.
Why does my API lead have no phone number?
+
Bitrix24 expects phone and email as a list of objects, each with a VALUE and VALUE_TYPE, such as MOBILE or WORK. Sending a plain text phone number usually results in an empty field. Change the request format and the number will save.
Can the API assign leads to a specific salesperson?
+
Yes. Set ASSIGNED_BY_ID to the Bitrix24 user ID of the salesperson. Your code can choose the user based on city, product or round robin, or you can leave assignment to Bitrix24 automation rules after the lead is created.
Can Acemagick build a REST API lead integration for us?
+
Yes. Acemagick builds custom Bitrix24 API integrations for websites, apps and lead portals, including field mapping, duplicate checks, error logging and monitoring. We test with your real data and support the integration after go-live.
Want a CRM that your team actually uses?
Acemagick is a Bitrix24 Gold Partner. We set up your CRM, connect your lead sources, automate follow-ups and train your team β usually live in weeks, not months.