Kartra Documentation TECHNICAL DOCUMENTATION

Section 17: Action: Create custom fields

The API system will create a custom field for the lead details.

Note: the custom field created here through the API will be of the input field type, and therefore it can only register one single value. Multi-choice fields like dropdowns, radio buttons or check boxes cannot be created through the API, only through the web interface.

Type Parameters Values
POST cmd* create_custom_field
POST custom_field_identifier * string
POST custom_field_type* string with values: input_field, text_area, drop_down, radio_button, checkbox
POST custom_field_options ** array ***

* Required fields
** Required for drop_down, radio_button, checkbox
*** The array will consist of arrays with one parameter: option_name (string containing the name of the option)

 

Here is an example:

'actions' => [
    '0' => [
        'cmd' => 'create_custom_field',
        'custom_field_identifier' => 'Custom field name',
        'custom_field_type' => 'drop_down',
        'custom_field_options' => [
            '0' => ['option_name' => 'blue'],
            '1' => ['option_name' => 'brown']
        ]
    ]
]

© 2020 Kartra All Rights Reserved