ActiveCampaign Forum

Contact Custom Field insert data


#1

Hello.
I am using the v3 of the API.

I try to update a Contact Custom Field but I get 500 error from the server.
Here is my Postman setup.

PUT https://***.api-us1.com/api/3/fieldValues/1

{
“fieldValue”: {
“contact”: “1”,
“field”: “1”,
“value”: “Test”
}
}
I am using trial accounts to develop the integration. The weird part is that this code used to work on my previous account and today it expired and I created a new one. I created all the required custom fields. Then I found out from this topic (https://community.activecampaign.com/t/how-to-update-a-custom-field-in-contact-with-api-v3/3603) that I have first to create the value for the custom field by executing a POST request to /fieldValues which IMO is insane because I have 5 custom fields for a contact that I have to populate. First I have to check for each field if the it is created and then create it or update it. This is 2*5 = 10 requests. The old approach was much better.

Any suggestions?


#2

You’re right that the current way of updating custom field values for a contact isn’t the most ideal. We are working on improving this in the future. For today though, what you’re attempting appears to be right. I’d like our support team to take a look here so that this gets the proper attention. I’ve created a support ticket for you regarding this and you should receive an email shortly to confirm the ticket was filed.

Thanks!