Error when passing custom field in freshdesk api request body

I am trying to create the ticket in freshdesk via API with custom field validation for the client. But I am getting some validation errors.

I am using the below action for creating a ticket

Below is the request body that I am passing.
{
“subject”: “Ticket title”,
“description”: “Ticket detail”,
“email”: “xyz@gmaildotcom”,
“priority”: 1,
“status”: 2,
“custom_fields”: {“หัวข้อหลัก | Main Topic”: “ออนไลน์ | Online”},
“cc_emails”: “customer@gmaildotcom”,
}

-Screenshot of error message

1 Like

Hi @gauravshahu,

Usually, the custom_fields start with cf_ as opposed to what is mentioned in your request. More helpful thing to do find those fields via List All Ticket Fields API and try to use them in your request.

Please let me know if that helped.

Hello @gauravshahu. It would appear that your request body is not properly encoded. As @Saif suggested, you should be seeing custom fields start with a cf_ prefix. Please check what kind of string transformations your body goes through as it is constructed.

This topic was automatically closed after 13 days. New replies are no longer allowed.