500 Internal Server Error when creating custom fields for contacts

When I try to create new custom fields for contacts using the REST API, I am getting server error:

Server error: POST https://api.infusionsoft.com/crm/rest/v1/contacts/model/customFields?access_token=xxxx resulted in a 500 Internal Server Error response: {“message”:“General error”}

Actually, creating custom fields for contacts doesn’t work in general. I tried from the admin dashboard also.

@TomScott will be able to answer this one.

Could you provide your POST payload and app id, @Mile?

Hi Tom, here are details:

app id: hv687

“field_type”: “Text”,
“label”: “Patient ID”

I am using PHP SDK.

FYI, I can create custom fields when using field_type like Date, WholeNumber but not working with Text, TextArea, Currency and many more.

That’s very odd, since I just created one without issue in my test app. Let me see if the logs turn anything up.

This is what I get when I use Keap REST API



A cursory check of the logs indicate that it’s an issue with how much data is being stored in your Contact custom fields, exceeding 8MB of data. The error message isn’t informative, I agree, and I’ll log a ticket to make it more human-readable, but the resolution would be the same: you’ll need to trim down some of the content in the Contact record, probably in one or two exceptional record cases. Unfortunately I don’t have access to production data itself, only the debugging logs, so I’ll be unable to assist with identifying the records in question.

Actually, my account is empty, I removed the custom fields multiple times in order to test the code but I guess removal from the admin dashboard doesn’t remove the data completely from the system. Any suggestion how to do the clean up?

@Mile, you’ll have to call in to our Support line, they have a mechanism to purge custom field data if required.

Thanks Tom, the support team has helped me.