post
https://{subdomain}.kommo.com/api/v4//custom_fields
This method allows to add singular or multiple custom fields to an entity(leads, companies, contacts)
Limitations
The method is available for administrator users only.
Data type header when the request is successful
Content-Type: application/hal+json
Data type header in case of an error
Content-Type: application/problem+json
Response parameters
| Parameter | Data type | Description |
|---|---|---|
| id | int | Field ID |
| name | string | Field name |
| code | string | Field code that can be used to update the value of the field without passing the field ID in the request. |
| sort | int | Field sorting |
| type | int | Field type |
| entity_type | string | Entity type (leads, contacts, companies). |
| is_predefined | bool | Defines whether the field is predefined. This parameter is returned only when getting a contact or company fields list. |
| is_deletable | bool | Defines whether the field is deletable. This parameter is returned only when getting a contact or company fields list. |
| currency | string|null | Field currency code. Applicable only to the monetary field type. null for other field types. |
| remind | string|null | Birthday reminders setting (never, day – day before the event, week – week before the event, month – month before the event). This value is available only for the birthday type field. This parameter is returned only when getting a list of lead, contact, or company fields. |
| enums | array|null | Available field values array. Only available for the fields with enum values. |
| enums[0] | object | Available field values model |
| enums[id] | int | Enum ID |
| enums[value] | string | Enum value |
| enums[sort] | int | Enum sorting |
| is_api_only | bool | Defines whether the field is editable via API only. This parameter is returned only when getting a lead, contact, or company fields list. |
| group_id | string|null | Fields group ID for the current field. This parameter is returned only when getting a lead, contact or company fields list. |
| required_statuses | array|null | Array of the fields required to change a lead status. This parameter is returned only when getting a lead, contact, or company fields list. |
| required_statuses[0] | object | Required field model. This parameter is returned only when getting a lead, contact, or company fields list. |
| required_statuses[status_id] | int | ID of the stage which requires the current field to have a value before the lead can be moved. This parameter is returned only when getting a lead, contact, or company fields list. |
| required_statuses[pipeline_id] | int | ID of the pipeline which requires the current field to have a value before the lead can be moved. This parameter is returned only when getting a lead, contact, or company fields list. |
| hidden_statuses | array | Field hiding configuration. Fields are hidden in the UI based on their pipeline stage. This key is returned only when retrieving the list of lead fields. |
| hidden_statuses[0] | object | Field hiding configuration model. |
| hidden_statuses[0][status_id] | int | ID of the stage in which the field is hidden. |
| hidden_statuses[0][pipeline_id] | int | ID of the pipeline in which the field is hidden. |
| chained_lists | array|null | Configuration of a chained_list type field. The key is returned only when retrieving the list of lead fields. |
| chained_lists[0] | obj | Chained list configuration model. |
| chained_lists[0][title] | string|null | The name of the chained list displayed in the lead card. |
| chained_lists[0][catalog_id] | int | ID of the catalog |
| chained_lists[0][parent_catalog_id] | int | ID of the parent catalog |
| tracking_callback | string | A JavaScript callback function that executes on the page containing a Website Chat Button and a Kommo webform when data is submitted. This value is returned for fields of the tracking_data type. |
| search_in | string|null | ID of the catalog or symbolic code (contacts, companies, contacts_and_companies) for a field of the linked_entity type. |
