> ## Documentation Index
> Fetch the complete documentation index at: /help/llms.txt
> Use this file to discover all available pages before exploring further.

# Bitrix24

> Create Bitrix24 CRM leads from replying LinkedIn contacts through an inbound webhook and crm.lead.add.

> [!NOTE]
>
> **Pro plan.** Bitrix24 works through HTTP steps and listeners (**Wait for webhook**), which are part of Pro and Agency (and the free trial). Anything you already have keeps working on every plan. See [Plans and billing](/help/account/billing.md).

Bitrix24 gives you an inbound webhook URL that carries its own key. A contact who replies leaves the campaign (the **When the contact replies** box), so add **Send to another campaign** in that box and pick a follow-up campaign. There, a **Webhook / HTTP** step calls `crm.lead.add` on that URL.

> [!NOTE]
>
> **How it connects:** Bitrix24's REST API through an inbound webhook. See Bitrix24's [crm.lead.add](https://apidocs.bitrix24.com/api-reference/crm/leads/crm-lead-add.html) docs. The request and answer below follow Bitrix24's docs.

## Before you start

* **Bitrix24 plan:** inbound webhooks and the REST API depend on your plan; see Bitrix24's plan comparison.
* **An inbound webhook:** in Bitrix24, open **Developer resources > Other > Inbound webhook**, give it access to **CRM** and copy the URL. It looks like `https://yourportal.bitrix24.com/rest/1/abc123xyz/`. Anyone with it can write to your CRM: keep it private.

## 1. Create the Bitrix24 lead

No Kerux connection is needed: the URL holds the key. In the follow-up campaign, add a **Webhook / HTTP** step named `bitrix` with no connection:

```json theme={null}
{
  "method": "POST",
  "url": "https://yourportal.bitrix24.com/rest/1/abc123xyz/crm.lead.add",
  "bodyType": "json",
  "body": {
    "fields": {
      "TITLE": "{{contact.company}} - LinkedIn",
      "NAME": "{{contact.first_name}}",
      "LAST_NAME": "{{contact.last_name | optional}}",
      "COMPANY_TITLE": "{{contact.company}}",
      "EMAIL": [{ "VALUE": "{{email}}", "VALUE_TYPE": "WORK" }]
    }
  }
}
```

Bitrix24 answers with the new Bitrix24 lead's id in `result`:

```json theme={null}
{ "result": 1035 }
```

Save `{{steps.bitrix.response.body.result}}` on the Kerux contact with an **Update contact** step if you need it later. `crm.contact.add` takes the same shape if your team skips Bitrix24 leads.

## 2. Hear back (optional)

Bitrix24's outbound webhooks send form data with the event name and the record's id. Kerux's **Wait for webhook** step accepts form data: add one, click **Listen for test event**, trigger the event in Bitrix24 and pick the id field from the sample to match on.

## Test with one contact

In the follow-up campaign's **Builder**, click **Test** to open **Test on one contact** and check the lead in Bitrix24's CRM.

## Common errors

> [accordion] 401 or insufficient\_scope
>
> The inbound webhook doesn't have CRM access. Edit it in Bitrix24 and tick CRM.

> [accordion] 404 or ERROR\_METHOD\_NOT\_FOUND
>
> The method name after the URL is misspelled, or the URL was cut. Copy the webhook URL again and add `crm.lead.add`.

> [accordion] The email is missing on the contact
>
> `EMAIL` must be a list of objects with `VALUE` and `VALUE_TYPE`, as above.

Related: [Webhook steps](/help/integrations/webhook-steps.md), [Zoho CRM](/help/integration-guides/zoho-crm.md), [Freshsales](/help/integration-guides/freshsales.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.