Skip to main content

Hi,




I'm saving the contacts through the API...





How i send two or more custom fields in request. I get validation errors "Value set is of type Array.It should be a/an key/value pair"




All examples that found are: {"custom_field": {"my_field_name": "value"}}




Should not the API receive an array?


{


   "custom_fields": :


       {"my_field_1": "value_1"}, 


       {"my_field_2": "value_2" }


   ]


}




I'm building these fields dynamically by my application!




Thanks for all!



Hello Diego,




Thanks for posting this on our community forums. Can you please share the X-Request ID received in the response so that we can help you fix this?




Cheers!




Hi @Aravind




Please, disregard...


I was putting the wrong request. sorry!




It's ok




Now, i send:


{


"custom_fields": {"my_field_1": "value_1", "my_field_2": "value_2"}


}




No worries,Diego. Should you have any further questions, drop us a note here or write to us on support(at)freshdesk(com)




Cheers!