I am trying to import a CSV with custom fields but I am having trouble finding the right format for the custom fields.
I am using code based on this curl from the docs (Freshdesk)
curl -v -u yourapikey:X -H 'Content-Type: multipart/form-data' -F "file=@sample.csv" -F "fields[name]=0" -F "fields[email]=2" POST 'https://domain.freshdesk.com/api/v2/companies/imports'
I have tried fields[my_custom_field]=4
, fields[custom_fields][my_custom_field]=4
, fields[custom_fields[my_custom_field]]=4
and many other variations but can’t get it to work.
I always get an error like the below or similar.
{"description":"Validation failed","errors":[{"field":"fields","message":"Invalid fields: my_custom_field","code":"invalid_value"}]}
Can you help?