Can't find documentation on adding custom fields

Hi there,

Our developers are struggling to find the API documentation that shows how to add a custom field to a new contacts record. If anyone can point us in the right direction that would be most appreciated.

Thanks
Dean

I use this SOAP method:
https://developer.infusionsoft.com/docs/xml-rpc/#data-create-a-custom-field

Not sure if REST has the function. Maybe others can confirm.

There are a few things still in SOAP that haven’t made it to REST yet.

So just to be clear on the details, you actually don’t add a custom field to a contact but rather you create custom fields that all contact would then have.

The documentation for creating a custom field with the api can be found here

Things to be aware of though…First, you have a limit of 100 custom fields on the contact table. Second, in order to create a custom field, the call requires that you know the tab id number to assign it to. It could be the default ‘custom fields’ tab but you’ll need the id for that. Also, the custom fields data types are assigned by integer values so you’ll want to become familiar with that as well. The table for custom fields is DataFormField Table and documentation lays out what those integer values represent.

Second, in order to create a custom field, the call requires that you know the tab id number to assign it to. It could be the default ‘custom fields’ tab but you’ll need the id for that.

What is the ID we need to use for the default custom fields tab? I’m assuming the default custom fields tab ID is the same for all users?

Many thanks

Hi @kiwi-saas, the ID that you need to provide on the XML-RPC call is not necessarily the same across different Infusionsoft applications. There isn’t a good way to identify the default group other than querying the DataFormGroup table for a group named “Custom Fields”.

Alternatively, if you were you add a custom field via the REST API, it does not require a group ID and will add the custom field to the default group automatically if an ID is not provided. You can find information on the REST endpoint here and if you need to add a custom field for a record type other than Contact you can find the endpoint under the appropriate heading.

1 Like