Add Additional Property to Storage Elements entity.item.property.add

We are still updating this page

Some data may be missing — we will complete it shortly.

Scope: entity

Who can execute the method: any user

The method entity.item.property.add adds an additional property to storage elements. The user must have management rights (X) for the storage.

Parameters

Parameter

Description

ENTITY*
string

Required. String identifier of the storage.

PROPERTY*
string

Required. String identifier of the property.

NAME*
string

Required. Name of the property.

TYPE*
unknown

Required. Type of the property (S - string, N - number, F - file).

Required parameters are marked with *

Examples

try
        {
        	const response = await $b24.callMethod(
        		'entity.item.property.add',
        		{
        			ENTITY: 'menu_new',
        			PROPERTY: 'new_prop',
        			NAME: 'New Property',
        			TYPE: 'S'
        		}
        	);
        	
        	const result = response.getData().result;
        	console.log('Created element with ID:', result);
        }
        catch( error )
        {
        	console.error('Error:', error);
        }
        
try {
            $response = $b24Service
                ->core
                ->call(
                    'entity.item.property.add',
                    [
                        'ENTITY'   => 'menu_new',
                        'PROPERTY' => 'new_prop',
                        'NAME'     => 'New Property',
                        'TYPE'     => 'S',
                    ]
                );
        
            $result = $response
                ->getResponseData()
                ->getResult();
        
            echo 'Success: ' . print_r($result, true);
            // Your required data processing logic
            processData($result);
        
        } catch (Throwable $e) {
            error_log($e->getMessage());
            echo 'Error adding entity item property: ' . $e->getMessage();
        }
        
BX24.callMethod(
            'entity.item.property.add',
            {
                ENTITY: 'menu_new',
                PROPERTY: 'new_prop',
                NAME: 'New Property',
                TYPE: 'S'
            }
        );
        
https://my.bitrix24.com/rest/entity.item.property.add.json?ENTITY=menu_new&NAME=New%20Property&PROPERTY=new_prop&TYPE=S&auth=e690b44d2b3827d2eb9d4dbe59406dbb
        

How to Use Examples in Documentation

Response on Success

200 OK

{"result":true}