Bitrix24 REST API

crm.lead.add

crm.lead.add(fields)

Creates and adds a new lead.

Parameters

Parameter Description
fields An array in format array("field"=>"value"[, ...]) containing values of the lead fields.

Example

<script type="text/javascript">
	BX24.callMethod(
			"crm.lead.add", 
			{
				fields:
				{ 
					"TITLE": "FatJoint LLC", 
					"NAME": "Paul", 
					"SECOND_NAME": "A.", 
					"LAST_NAME": "Nibot", 
					"STATUS_ID": "NEW", 
					"OPENED": "Y", 
					"ASSIGNED_BY_ID": 1, 
					"CURRENCY_ID": "USD", 
					"OPPORTUNITY": 12500,
					"PHONE": [ { "VALUE": "555888", "VALUE_TYPE": "WORK" } ] 
				}
			}, 
			function(result) 
			{
				if(result.error())
					console.error(result.error());
				else
					console.info("Created a new lead, ID=" + result.data());
			}
		);			
</script>


User comments

Comments by users are not official documentation. Responsibility for use of the comments are born by users themselves.

The user comments section is not intended as a request box or training area, but rather for specific usage examples. For more general inquiries, please refer to link.

Comments may be added only by registered users and appear after moderation.
© 2001-2017 Bitrix, Inc. Bitrix® is a registered trademark of Bitrix, Inc. Powered by Bitrix Site Manager