Views: 2732
Last Modified: 30.08.2018

The method performs chat search

Revision: 19
Get information on the current API revision (platform version) – im.revision.get.


Parameter Example Req. Description Revision
FIND Mint Yes Search phrase 19
OFFSET 0 No Offset of user selection 19
LIMIT 10 No User selection limit 19
  • Search is performed by the following fields: chat participants Title, First name and Last name.
  • The method supports standard Bitrix24 REST API pagewise navigation. Additionally, it can build navigation via the OFFSET and LIMIT parameters.

Method call


BX24.callMethod('', {
	FIND: 'Mint'
}, function(result){


$result = restCommand('', Array(
	'FIND' => 'Mint'
), $_REQUEST["auth"]);

Example of response

	"result": {
		21191:  {
			"id": 21191,
			"title": "Mint chat No.3",
			"owner": 2,
			"extranet": false,
			"avatar": "",
			"color": "#4ba984",
			"type": "chat",
			"entity_type": "",
			"entity_data_1": "",
			"entity_data_2": "",
			"entity_data_3": "",
			"date_create": "2017-10-14T12:15:32+02:00",
			"message_type": "C"
	"total": 1

Description of keys:

  • id – chat ID
  • title – chat name
  • owner – chat owner user ID
  • color – chat color in 'hex' format
  • avatar – link to avatar (if empty, avatar is not specified)
  • type – chat type (group chat, call chat, open channel chat and etc.)
  • entity_type – chat external code – type
  • entity_id – chat external code – ID
  • entity_data_1 – external data for chat
  • entity_data_2 – external data for chat
  • entity_data_3 – external data for chat
  • date_create – date when chat is created in ATOM format
  • message_type – type of chat messages

Example of response when error occurs

    "error": "FIND_SHORT",
    "error_description": "Too short a search phrase."

Description of keys:

  • error – error code
  • error_description – brief description of error

Possible error codes

Code Description
FIND_SHORT Search phrase is top short, search is performed with three symbols minimum.

Attention! The method is specified with using of the restCommand function. This method is used to send data in Bitrix24 and is available in the EchoBot example as well as in this article. You can use your own function or BX24.callMethod, or bitrix24-php-sdk JavaScript methods.

Courses developed by «Bitrix», Inc.