Bitrix24 REST API

crm.contact.add

crm.contact.add(fields)

Creates and adds a new contact.

Parameters

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

Example

<script type="text/javascript">
	BX24.callMethod(
			"crm.contact.add", 
			{
				fields:
				{ 
					"NAME": "John", 
					"SECOND_NAME": "Lancelot", 
					"LAST_NAME": "Doe", 
					"OPENED": "Y", 
					"ASSIGNED_BY_ID": 1, 
					"TYPE_ID": "CLIENT",
					"SOURCE_ID": "SELF",
					"PHOTO": { "fileData": document.getElementById('photo') },
					"PHONE": [ { "VALUE": "555888", "VALUE_TYPE": "WORK" } ] 	
				}
			}, 
			function(result) 
			{
				if(result.error())
					console.error(result.error());
				else
					console.info("Created a new contact; 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