Get CRM Lead Fields crm.lead.fields

If you are developing integrations for Bitrix24 using AI tools (Codex, Claude Code, Cursor), connect to the MCP server so that the assistant can utilize the official REST documentation.

Scope: crm

Who can execute the method: any user

DEPRECATED

The development of this method has been halted. Please use crm.item.fields.

The method crm.lead.fields returns a description of lead fields, including custom fields. A table with descriptions of standard fields can be found in the article Fields of Main CRM Entities.

Method Parameters

No parameters.

Code Examples

How to Use Examples in Documentation

curl -X POST \
        -H "Content-Type: application/json" \
        -H "Accept: application/json" \
        -d '{}' \
        https://**put_your_bitrix24_address**/rest/**put_your_user_id_here**/**put_your_webhook_here**/crm.lead.fields
        
curl -X POST \
        -H "Content-Type: application/json" \
        -H "Accept: application/json" \
        -d '{"auth":"**put_access_token_here**"}' \
        https://**put_your_bitrix24_address**/rest/crm.lead.fields
        
try
        {
            const response = await $b24.callMethod(
                'crm.lead.fields',
                {}
            );
            
            const result = response.getData().result;
            console.info(result);
        }
        catch( error )
        {
            console.error(error);
        }
        
try {
            $fieldsResult = $serviceBuilder
                ->getCRMScope()
                ->lead()
                ->fields();
            $fieldsDescription = $fieldsResult->getFieldsDescription();
            // Assuming you want to print the fields description
            print_r($fieldsDescription);
        } catch (Throwable $e) {
            print("Error: " . $e->getMessage());
        }
        
BX24.callMethod(
            'crm.lead.fields',
            {},
            (result) => {
                if(result.error())
                {
                    console.error(result.error());
                    return;
                }
                
                console.info(result.data());
            }
        );
        
require_once('crest.php');
        
        $result = CRest::call(
            'crm.lead.fields',
            []
        );
        
        echo '<PRE>';
        print_r($result);
        echo '</PRE>';
        

Response Handling

HTTP Status: 200

{
          "result": {
            "ID": {
              "type": "integer",
              "isRequired": false,
              "isReadOnly": true,
              "isImmutable": false,
              "isMultiple": false,
              "isDynamic": false,
              "title": "ID"
            },
            "TITLE": {
              "type": "string",
              "isRequired": false,
              "isReadOnly": false,
              "isImmutable": false,
              "isMultiple": false,
              "isDynamic": false,
              "title": "Lead Title"
            },
            "HONORIFIC": {
              "type": "crm_status",
              "isRequired": false,
              "isReadOnly": false,
              "isImmutable": false,
              "isMultiple": false,
              "isDynamic": false,
              "statusType": "HONORIFIC",
              "title": "Salutation"
            },
            "NAME": {
              "type": "string",
              "isRequired": false,
              "isReadOnly": false,
              "isImmutable": false,
              "isMultiple": false,
              "isDynamic": false,
              "title": "First Name"
            },
            "SECOND_NAME": {
              "type": "string",
              "isRequired": false,
              "isReadOnly": false,
              "isImmutable": false,
              "isMultiple": false,
              "isDynamic": false,
              "title": "Middle Name"
            },
            "LAST_NAME": {
              "type": "string",
              "isRequired": false,
              "isReadOnly": false,
              "isImmutable": false,
              "isMultiple": false,
              "isDynamic": false,
              "title": "Last Name"
            },
            "BIRTHDATE": {
              "type": "date",
              "isRequired": false,
              "isReadOnly": false,
              "isImmutable": false,
              "isMultiple": false,
              "isDynamic": false,
              "title": "Birthdate"
            },
            "COMPANY_TITLE": {
              "type": "string",
              "isRequired": false,
              "isReadOnly": false,
              "isImmutable": false,
              "isMultiple": false,
              "isDynamic": false,
              "title": "Company Name"
            },
            "SOURCE_ID": {
              "type": "crm_status",
              "isRequired": false,
              "isReadOnly": false,
              "isImmutable": false,
              "isMultiple": false,
              "isDynamic": false,
              "statusType": "SOURCE",
              "title": "Source"
            },
            "SOURCE_DESCRIPTION": {
              "type": "string",
              "isRequired": false,
              "isReadOnly": false,
              "isImmutable": false,
              "isMultiple": false,
              "isDynamic": false,
              "title": "Source Description"
            },
            "STATUS_ID": {
              "type": "crm_status",
              "isRequired": false,
              "isReadOnly": false,
              "isImmutable": false,
              "isMultiple": false,
              "isDynamic": false,
              "statusType": "STATUS",
              "title": "Stage"
            },
            "STATUS_DESCRIPTION": {
              "type": "string",
              "isRequired": false,
              "isReadOnly": false,
              "isImmutable": false,
              "isMultiple": false,
              "isDynamic": false,
              "title": "Stage Description"
            },
            "STATUS_SEMANTIC_ID": {
              "type": "string",
              "isRequired": false,
              "isReadOnly": true,
              "isImmutable": false,
              "isMultiple": false,
              "isDynamic": false,
              "title": "Status Semantic"
            },
            "POST": {
              "type": "string",
              "isRequired": false,
              "isReadOnly": false,
              "isImmutable": false,
              "isMultiple": false,
              "isDynamic": false,
              "title": "Position"
            },
            "ADDRESS": {
              "type": "string",
              "isRequired": false,
              "isReadOnly": false,
              "isImmutable": false,
              "isMultiple": false,
              "isDynamic": false,
              "title": "Address"
            },
            "ADDRESS_2": {
              "type": "string",
              "isRequired": false,
              "isReadOnly": false,
              "isImmutable": false,
              "isMultiple": false,
              "isDynamic": false,
              "title": "Address (Line 2)"
            },
            "ADDRESS_CITY": {
              "type": "string",
              "isRequired": false,
              "isReadOnly": false,
              "isImmutable": false,
              "isMultiple": false,
              "isDynamic": false,
              "title": "City"
            },
            "ADDRESS_POSTAL_CODE": {
              "type": "string",
              "isRequired": false,
              "isReadOnly": false,
              "isImmutable": false,
              "isMultiple": false,
              "isDynamic": false,
              "title": "Postal Code"
            },
            "ADDRESS_REGION": {
              "type": "string",
              "isRequired": false,
              "isReadOnly": false,
              "isImmutable": false,
              "isMultiple": false,
              "isDynamic": false,
              "title": "Region"
            },
            "ADDRESS_PROVINCE": {
              "type": "string",
              "isRequired": false,
              "isReadOnly": false,
              "isImmutable": false,
              "isMultiple": false,
              "isDynamic": false,
              "title": "Province"
            },
            "ADDRESS_COUNTRY": {
              "type": "string",
              "isRequired": false,
              "isReadOnly": false,
              "isImmutable": false,
              "isMultiple": false,
              "isDynamic": false,
              "title": "Country"
            },
            "ADDRESS_COUNTRY_CODE": {
              "type": "string",
              "isRequired": false,
              "isReadOnly": false,
              "isImmutable": false,
              "isMultiple": false,
              "isDynamic": false,
              "title": "Country Code"
            },
            "ADDRESS_LOC_ADDR_ID": {
              "type": "integer",
              "isRequired": false,
              "isReadOnly": false,
              "isImmutable": false,
              "isMultiple": false,
              "isDynamic": false,
              "title": "Location Address ID"
            },
            "CURRENCY_ID": {
              "type": "crm_currency",
              "isRequired": false,
              "isReadOnly": false,
              "isImmutable": false,
              "isMultiple": false,
              "isDynamic": false,
              "title": "Currency"
            },
            "OPPORTUNITY": {
              "type": "double",
              "isRequired": false,
              "isReadOnly": false,
              "isImmutable": false,
              "isMultiple": false,
              "isDynamic": false,
              "title": "Amount"
            },
            "IS_MANUAL_OPPORTUNITY": {
              "type": "char",
              "isRequired": false,
              "isReadOnly": false,
              "isImmutable": false,
              "isMultiple": false,
              "isDynamic": false,
              "title": "IS_MANUAL_OPPORTUNITY"
            },
            "OPENED": {
              "type": "char",
              "isRequired": false,
              "isReadOnly": false,
              "isImmutable": false,
              "isMultiple": false,
              "isDynamic": false,
              "title": "Available to All"
            },
            "COMMENTS": {
              "type": "string",
              "isRequired": false,
              "isReadOnly": false,
              "isImmutable": false,
              "isMultiple": false,
              "isDynamic": false,
              "title": "Comments"
            },
            "HAS_PHONE": {
              "type": "char",
              "isRequired": false,
              "isReadOnly": true,
              "isImmutable": false,
              "isMultiple": false,
              "isDynamic": false,
              "title": "Phone Provided"
            },
            "HAS_EMAIL": {
              "type": "char",
              "isRequired": false,
              "isReadOnly": true,
              "isImmutable": false,
              "isMultiple": false,
              "isDynamic": false,
              "title": "Email Provided"
            },
            "HAS_IMOL": {
              "type": "char",
              "isRequired": false,
              "isReadOnly": true,
              "isImmutable": false,
              "isMultiple": false,
              "isDynamic": false,
              "title": "Open Line Assigned"
            },
            "ASSIGNED_BY_ID": {
              "type": "user",
              "isRequired": false,
              "isReadOnly": false,
              "isImmutable": false,
              "isMultiple": false,
              "isDynamic": false,
              "title": "Responsible User"
            },
            "CREATED_BY_ID": {
              "type": "user",
              "isRequired": false,
              "isReadOnly": true,
              "isImmutable": false,
              "isMultiple": false,
              "isDynamic": false,
              "title": "Created By"
            },
            "MODIFY_BY_ID": {
              "type": "user",
              "isRequired": false,
              "isReadOnly": true,
              "isImmutable": false,
              "isMultiple": false,
              "isDynamic": false,
              "title": "Modified By"
            },
            "MOVED_BY_ID": {
              "type": "user",
              "isRequired": false,
              "isReadOnly": true,
              "isImmutable": false,
              "isMultiple": false,
              "isDynamic": false,
              "title": "MOVED_BY_ID"
            },
            "DATE_CREATE": {
              "type": "datetime",
              "isRequired": false,
              "isReadOnly": true,
              "isImmutable": false,
              "isMultiple": false,
              "isDynamic": false,
              "title": "Creation Date"
            },
            "DATE_MODIFY": {
              "type": "datetime",
              "isRequired": false,
              "isReadOnly": true,
              "isImmutable": false,
              "isMultiple": false,
              "isDynamic": false,
              "title": "Modification Date"
            },
            "MOVED_TIME": {
              "type": "datetime",
              "isRequired": false,
              "isReadOnly": true,
              "isImmutable": false,
              "isMultiple": false,
              "isDynamic": false,
              "title": "MOVED_TIME"
            },
            "COMPANY_ID": {
              "type": "crm_company",
              "isRequired": false,
              "isReadOnly": false,
              "isImmutable": false,
              "isMultiple": false,
              "isDynamic": false,
              "title": "Company",
              "settings": {
                "parentEntityTypeId": 4
              }
            },
            "CONTACT_ID": {
              "type": "crm_contact",
              "isRequired": false,
              "isReadOnly": false,
              "isImmutable": false,
              "isMultiple": false,
              "isDynamic": false,
              "isDeprecated": true,
              "title": "Contact"
            },
            "CONTACT_IDS": {
              "type": "crm_contact",
              "isRequired": false,
              "isReadOnly": false,
              "isImmutable": false,
              "isMultiple": true,
              "isDynamic": false,
              "title": "CONTACT_IDS"
            },
            "IS_RETURN_CUSTOMER": {
              "type": "char",
              "isRequired": false,
              "isReadOnly": true,
              "isImmutable": false,
              "isMultiple": false,
              "isDynamic": false,
              "title": "Returning Lead"
            },
            "DATE_CLOSED": {
              "type": "datetime",
              "isRequired": false,
              "isReadOnly": true,
              "isImmutable": false,
              "isMultiple": false,
              "isDynamic": false,
              "title": "Closing Date"
            },
            "ORIGINATOR_ID": {
              "type": "string",
              "isRequired": false,
              "isReadOnly": false,
              "isImmutable": false,
              "isMultiple": false,
              "isDynamic": false,
              "title": "External Source"
            },
            "ORIGIN_ID": {
              "type": "string",
              "isRequired": false,
              "isReadOnly": false,
              "isImmutable": false,
              "isMultiple": false,
              "isDynamic": false,
              "title": "Identifier in External Source"
            },
            "UTM_SOURCE": {
              "type": "string",
              "isRequired": false,
              "isReadOnly": false,
              "isImmutable": false,
              "isMultiple": false,
              "isDynamic": false,
              "title": "Advertising System"
            },
            "UTM_MEDIUM": {
              "type": "string",
              "isRequired": false,
              "isReadOnly": false,
              "isImmutable": false,
              "isMultiple": false,
              "isDynamic": false,
              "title": "Traffic Type"
            },
            "UTM_CAMPAIGN": {
              "type": "string",
              "isRequired": false,
              "isReadOnly": false,
              "isImmutable": false,
              "isMultiple": false,
              "isDynamic": false,
              "title": "Campaign Identifier"
            },
            "UTM_CONTENT": {
              "type": "string",
              "isRequired": false,
              "isReadOnly": false,
              "isImmutable": false,
              "isMultiple": false,
              "isDynamic": false,
              "title": "Campaign Content"
            },
            "UTM_TERM": {
              "type": "string",
              "isRequired": false,
              "isReadOnly": false,
              "isImmutable": false,
              "isMultiple": false,
              "isDynamic": false,
              "title": "Campaign Search Term"
            },
            "LAST_ACTIVITY_TIME": {
              "type": "datetime",
              "isRequired": false,
              "isReadOnly": true,
              "isImmutable": false,
              "isMultiple": false,
              "isDynamic": false,
              "title": "LAST_ACTIVITY_TIME"
            },
            "LAST_ACTIVITY_BY": {
              "type": "user",
              "isRequired": false,
              "isReadOnly": true,
              "isImmutable": false,
              "isMultiple": false,
              "isDynamic": false,
              "title": "LAST_ACTIVITY_BY"
            },
            "PHONE": {
              "type": "crm_multifield",
              "isRequired": false,
              "isReadOnly": false,
              "isImmutable": false,
              "isMultiple": true,
              "isDynamic": false,
              "title": "Phone"
            },
            "EMAIL": {
              "type": "crm_multifield",
              "isRequired": false,
              "isReadOnly": false,
              "isImmutable": false,
              "isMultiple": true,
              "isDynamic": false,
              "title": "E-mail"
            },
            "WEB": {
              "type": "crm_multifield",
              "isRequired": false,
              "isReadOnly": false,
              "isImmutable": false,
              "isMultiple": true,
              "isDynamic": false,
              "title": "Website"
            },
            "IM": {
              "type": "crm_multifield",
              "isRequired": false,
              "isReadOnly": false,
              "isImmutable": false,
              "isMultiple": true,
              "isDynamic": false,
              "title": "Messenger"
            },
            "LINK": {
              "type": "crm_multifield",
              "isRequired": false,
              "isReadOnly": false,
              "isImmutable": false,
              "isMultiple": true,
              "isDynamic": false,
              "title": "LINK"
            }
          },
          "time": {
            "start": 1716903269.951179,
            "finish": 1716903270.017765,
            "duration": 0.06658601760864258,
            "processing": 0.029553890228271484,
            "date_start": "2024-05-28T16:34:29+02:00",
            "date_finish": "2024-05-28T16:34:30+02:00",
            "operating": 0
          }
        }
        

Returned Data

Name
type

Description

result
lead

Root element of the response. Contains information about lead fields. The structure is described below

time
time

Information about the execution time of the request

Type lead

Name
type

Description

ID
integer

Integer identifier of the lead

TITLE
string

Title of the lead

HONORIFIC
crm_status

Type of salutation. Status from the directory. A list of possible identifiers can be obtained using the method crm.status.list with the filter filter[ENTITY_ID]=HONORIFIC

NAME
string

First name of the contact

SECOND_NAME
string

Middle name of the contact

LAST_NAME
string

Last name of the contact

BIRTHDATE
date

Birthdate

COMPANY_TITLE
string

Name of the company associated with the lead

SOURCE_ID
crm_status

Identifier of the source. Status from the directory. A list of possible identifiers can be obtained using the method crm.status.list with the filter filter[ENTITY_ID]=SOURCE

SOURCE_DESCRIPTION
string

Description of the source

STATUS_ID
crm_status

Identifier of the lead stage. Status from the directory. A list of possible identifiers can be obtained using the method crm.status.list with the filter filter[ENTITY_ID]=STATUS

STATUS_DESCRIPTION
string

Additional information about the stage

STATUS_SEMANTIC_ID
string

  • F (failed) – processed unsuccessfully
  • S (success) – processed successfully
  • P (processing) – lead is being processed

POST
string

Position

ADDRESS
string

Address of the contact

ADDRESS_2
string

Second line of the address. In some countries, it is customary to split the address into 2 parts

ADDRESS_CITY
string

City

ADDRESS_POSTAL_CODE
string

Postal code

ADDRESS_REGION
string

Region

ADDRESS_PROVINCE
string

Province

ADDRESS_COUNTRY
string

Country

ADDRESS_COUNTRY_CODE
string

Country code

ADDRESS_LOC_ADDR_ID
string

Identifier of the address from the location module

CURRENCY_ID
crm_currency

Identifier of the currency

OPPORTUNITY
double

Estimated amount

IS_MANUAL_OPPORTUNITY
char

Indicator of manual calculation of the amount. Allowed values are Y or N

OPENED
char

Available to all. Allowed values are Y or N

COMMENTS
string

Comments

HAS_PHONE
char

Indicator of whether the phone field is filled. Allowed values are Y or N

HAS_EMAIL
char

Indicator of whether the email field is filled. Allowed values are Y or N

HAS_IMOL
char

Indicator of whether an open line is assigned. Allowed values are Y or N

ASSIGNED_BY_ID
user

Identifier of the user responsible for the lead

CREATED_BY_ID
user

Identifier of the user who created the lead

MODIFY_BY_ID
user

Identifier of the user who last modified the lead

MOVED_BY_ID
user

Identifier of the user who moved the item to the current stage

DATE_CREATE
datetime

Creation date

DATE_MODIFY
datetime

Modification date

MOVED_TIME
datetime

Date the item was moved to the current stage

COMPANY_ID
crm_company

Link of the lead to the company (Client->Company field)

CONTACT_ID
crm_contact

Link of the lead to the contact (Client->Contact field. In case of multiple linked contacts, this field will contain the ID of the first linked contact)

IS_RETURN_CUSTOMER
char

Indicator of a returning lead. Allowed values are Y or N

DATE_CLOSED
datetime

Closing date

ORIGINATOR_ID
string

Identifier of the data source. Used only for linking to an external source

ORIGIN_ID
string

Identifier of the item in the data source. Used only for linking to an external source

UTM_SOURCE
string

Advertising system. Google Ads, Microsoft Advertising, and others

UTM_MEDIUM
string

Type of traffic. CPC (ads), CPM (banners)

UTM_CAMPAIGN
string

Identifier of the advertising campaign

UTM_CONTENT
string

Content of the campaign. For example, for contextual ads

UTM_TERM
string

Search term of the campaign. For example, keywords for contextual advertising

LAST_ACTIVITY_TIME
datetime

Time of the last activity

LAST_ACTIVITY_BY
string

Identifier of the user responsible for the last activity in this lead (e.g., who created a new CRM activity in the lead)

PHONE
crm_multifield

Phone of the contact

EMAIL
crm_multifield

Email address

WEB
crm_multifield

URL resources of the lead

IM
crm_multifield

Messengers

LINK
crm_multifield

UF_...

Custom fields

Field Description

type

Field type. Described above

isRequired

Indicator of whether the field is mandatory when creating a new lead

isReadOnly

Indicator of whether the field value can be edited

isImmutable

Indicator of whether the field value can only be filled once during the creation of a new item

isMultiple

Indicator of whether the field can have multiple values. If true, values in the field are passed as an array

isDynamic

Indicates whether the field is custom

title

Field name

Error Handling

Does not return errors.

Statuses and System Error Codes

HTTP Status: 20x, 40x, 50x

The errors described below may occur when calling any method.

Status

Code
Error Message

Description

500

INTERNAL_SERVER_ERROR
Internal server error

An internal server error has occurred. Please contact the server administrator or Bitrix24 technical support

500

ERROR_UNEXPECTED_ANSWER
Server returned an unexpected response

An internal server error has occurred. Please contact the server administrator or Bitrix24 technical support

503

QUERY_LIMIT_EXCEEDED
Too many requests

The request intensity limit has been exceeded

405

ERROR_BATCH_METHOD_NOT_ALLOWED
Method is not allowed for batch usage

The current method is not permitted for calls using batch

400

ERROR_BATCH_LENGTH_EXCEEDED
Max batch length exceeded

The maximum length of parameters passed to the batch method has been exceeded

401

NO_AUTH_FOUND
Wrong authorization data

Invalid access token or webhook code

400

INVALID_REQUEST
Https required

The HTTPS protocol is required for method calls

503

OVERLOAD_LIMIT
REST API is blocked due to overload

The REST API is blocked due to overload. This is a manual individual block; please contact Bitrix24 technical support to lift it

403

ACCESS_DENIED
REST API is available only on commercial plans

The REST API is only available on commercial plans

403

INVALID_CREDENTIALS
Invalid request credentials

The user associated with the access token or webhook used to call the method lacks the necessary permissions

404

ERROR_MANIFEST_IS_NOT_AVAILABLE
Manifest is not available

The manifest is not available

403

insufficient_scope
The request requires higher privileges than provided by the webhook token

The request requires higher privileges than those provided by the webhook token

401

expired_token
The access token provided has expired

The provided access token has expired

403

user_access_error
The user does not have access to the application

The user does not have access to the application. This means that the application is installed, but the portal administrator has restricted access to this application to specific users only

500

PORTAL_DELETED
Portal was deleted

The public part of the site is closed. To open the public part of the site on an on-premise installation, disable the "Temporary closure of the public part of the site" option. Path to the setting: Desktop > Settings > Product Settings > Module Settings > Main Module > Temporary closure of the public part of the site