Updating "Properties" data through API

Is anyone updating custom fields on contacts / customers through API? I cannot get the properties field to take any type of input whatsoever and seeing what other people have done, or if they are having any luck. Thanks!

I’m sending this data from Zoho. I can update every other field except the properties field.
Here is the code from Zoho. And some screenshots from PostMan where it is also failing.

I’m copy/pasting my reply to my post I had about custom properties through API’s, I think this will help you.

I was able to get this to work by taking this guys code and turning it towards contacts instead of assets.

Here’s what I did below and it works great. Adjust as you need, I am not skilled at coding I can code just enough to take other people’s work and make it work how I need it to. My purpose for this is we use MS Power Automate and forms for new user creation. This updates the custom property inside the client’s contacts for billing purposes based on what MS license they choose during user setup. I’m happy to answer any questions you have.

        	[Parameter(Mandatory = $true)]
        	[string] $ContactID = "" ,
        	[Parameter(Mandatory = $true)]
        	[string] $CustomFieldValue = "" 

$ApiToken = 

$ApiBaseURL = "syncromsp.com"

$ApiSubDomain = "YOURDOMAIN"

$CustomField = "YOUR CUSTOM FIELD" 

function Contact-Update-Field ($ApiToken,$Id,$CustomField,$CustomFieldValue) {
$headers = @{
    Authorization="Bearer $ApiToken" 

$payload = @"
  "properties": {
    "$CustomField": "$CustomFieldValue"

  $ApiPath = "/api/v1/contacts"
  $resp = try {
    Invoke-RestMethod -Method PUT "https://$($ApiSubDomain).$($ApiBaseURL)$($ApiPath)/$($ContactID)" -Headers $headers -Body "$payload" -ContentType "application/json"
  } catch {
    Write-Host "ERROR!"
    $result = $_.Exception.Response.GetResponseStream()
    $reader = New-Object System.IO.StreamReader($result)
    $reader.BaseStream.Position = 0
    $responseBody = $reader.ReadToEnd();
    Write-Host $responseBody

Contact-Update-Field -ApiToken $ApiToken -Id $ContactID -CustomField $CustomField -CustomFieldValue $CustomFieldValue

Thank you. You have confirmed that I’m doing it correctly. @BillGatesisThanos

If you get a chance, would you confirm you can still update custom fields? I had this working for a few days, as we just changed our billing to a dynamic contact billing, but then it suddenly broke. I figured I had fluked it when I had it working but now I’m thinking it is a back end problem.

I’m confused as to why I cannot even update it in Swagger or PostMan.

I have confirmed it is still working properly. Are you running a GET on the target with the custom field options selected? That’s how I was able to determine what string to use to get the desired result.