Suppose we have a form on our website that visitors fill out. Using the REST API of Bitrix24 CRM, we can use the data received from this form to create a lead in the CRM.

Creating leads in the CRM from external services can be done using the special-purpose page:



For a lead to be added to the CRM you must:

Call this page with a GET or POST method

Example of Php Code :-


// CRM server connection data


define(‘CRM_HOST’, ”’); // your CRM domain name

define(‘CRM_PORT’, ‘443’); // CRM server port

define(‘CRM_PATH’, ‘/crm/configs/import/lead.php’); // CRM server REST service path

// CRM server authorization data

define(‘CRM_LOGIN’, ‘username’);

define(‘CRM_PASSWORD’, ‘password’);

// POST processing



$leadData = $_POST[‘DATA’];

// get lead data from the form

$postData = array(

‘TITLE’ => $leadData[‘TITLE’],


‘NAME’ => $leadData[‘NAME’],

‘LAST_NAME’ => $leadData[‘LAST_NAME’],

‘COMMENTS’ => $leadData[‘COMMENTS’],






For any further queries get in touch we would be glad to help you Solve your Query