Add entity.section.add storage section

We are still updating this page

Some data may be missing — we will fill it in shortly

Scope: entity

Who can execute the method: any user

The entity.section.add method adds a storage section. The user must have at least write access permission (W) in the storage.

Parameters

Parameter

Description

ENTITY*
string

Required. String identifier of the storage.

NAME*
string

Required. Name of the section.

DESCRIPTION
unknown

Description of the section.

ACTIVE
unknown

Flag indicating if the section is active (Y|N).

SORT
unknown

Sorting parameter for the section.

PICTURE
unknown

Picture of the section.

DETAIL_PICTURE
unknown

Detailed picture of the section.

SECTION
unknown

Identifier of the parent section.

Required parameters are marked with *

Examples

try
        {
        	const response = await $b24.callMethod(
        		'entity.section.add',
        		{
        			ENTITY: 'menu_new',
        			'NAME': 'Test Section'
        		}
        	);
        	
        	const result = response.getData().result;
        }
        catch( error )
        {
        	console.error('Error:', error);
        }
        
try {
            $response = $b24Service
                ->core
                ->call(
                    'entity.section.add',
                    [
                        'ENTITY' => 'menu_new',
                        'NAME'   => 'Test Section',
                    ]
                );
        
            $result = $response
                ->getResponseData()
                ->getResult();
        
            echo 'Success: ' . print_r($result, true);
        
        } catch (Throwable $e) {
            error_log($e->getMessage());
            echo 'Error adding entity section: ' . $e->getMessage();
        }
        
BX24.callMethod(
            'entity.section.add',
            {
                ENTITY: 'menu_new',
                'NAME': 'Test Section'
            }
        );
        
https://my.bitrix24.com/rest/entity.section.add.json?ENTITY=menu_new&NAME=Test%20Section&auth=9affe382af74d9c5caa588e28096e872
        

How to Use Examples in Documentation

Response on success

200 OK

{"result":220}