Adding 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

Request parameters
To add a custom field, a field object should be passed.

ParameterData typeDescriptionIs the field mandatorySupported field types
typestringField typeβœ…Available for all field types
namestringField nameβœ…Available for all field types
codestringField code that can be used to update the value of the field without passing the field ID in the request❌Available for all field types
sortintField sorting in the field group❌Available for all field types
group_idstringField group ID❌Available for all lead, contact, company fields
is_api_onlyboolDefines whether the field is editable via API only❌Available for all lead, contact, and company fields
required_statusesarray|nullArray of the fields required to change a lead status❌Available for all lead, contact, and company fields
required_statuses[0]objectRequired field model❌Available for all lead, contact, and company fields
required_statuses[0][status_id]intID of the stage which requires the current field to have a value before the lead can be moved❌Available for all lead, contact, and company fields
required_statuses[0][pipeline_id]intID of the pipeline which requires the current field to have a value before the lead can be moved❌Available for all lead, contact, and company fields
remindstring|nullBirthday reminders setting (never, day – day before the event, week – week before the event, month – month before the event)❌Available only for the birthday type fields
enumsarrayAvailable field values arrayβœ…Available for the following field types:
-multiselect
-radiobutton
-select
enums[0]objectAvailable field value modelβœ…Available for the following field types:
-multiselect
-radiobutton
-select
enums[0][value]stringValueβœ…Available for the following field types:
-multiselect
-radiobutton
-select
enums[0][sort]stringValue sortingβœ…Available for the following field types:
-multiselect
-radiobutton
-select
Language
Credentials
OAuth2
URL
Click Try It! to start a request and see the response here!