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 typeAvailable for all field types
namestringField nameAvailable for all field types
codestringField code that can be used to update the value of the field without passing the field ID in the requestAvailable for all field types
sortintField sorting in the field groupAvailable for all field types
group_idstringField group IDAvailable for all lead, contact, company fields
is_api_onlyboolDefines whether the field is editable via API onlyAvailable for all lead, contact, and company fields
required_statusesarray|nullArray of the fields required to change a lead statusAvailable for all lead, contact, and company fields
required_statuses[0]objectRequired field modelAvailable 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 movedAvailable 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 movedAvailable 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 arrayAvailable for the following field types:
-multiselect
-radiobutton
-select
enums[0]objectAvailable field value modelAvailable for the following field types:
-multiselect
-radiobutton
-select
enums[0][value]stringValueAvailable for the following field types:
-multiselect
-radiobutton
-select
enums[0][sort]stringValue sortingAvailable for the following field types:
-multiselect
-radiobutton
-select
Language
Credentials
OAuth2
URL
Click Try It! to start a request and see the response here!