Views: 2503
Last Modified: 23.05.2019

The method deletes files inside chat folder

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


Parameter Example Req. Description Revision
CHAT_ID 17 Yes Chat ID 18
DISK_ID 112 Yes File ID 18

Method call


BX24.callMethod('im.disk.file.delete', {
	'CHAT_ID': 17,
	'DISK_ID': 112,
}, function(result){


$result = restCommand('im.disk.file.delete', Array(
	'CHAT_ID' => 17,
	'DISK_ID' => 112,
), $_REQUEST["auth"]);

Example of response

	"result": true

Example of response when error occurs

    "error": "CHAT_ID_EMPTY",
    "error_description": "Chat ID can't be empty"

Description of keys:

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

Possible error codes

Code Description
CHAT_ID_EMPTY Chat ID not passed
FILES_ERROR File ID not passed

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.