Skip to main content

Hi,

 

I want to update a custom field using the freshdesk API.

This is the request I am making:

Fresh.tickets.update_ticket(freshdesk_id, custom_fields={'Some Field': some_value})

 

This is the response I get:

 

freshdesk.v2.errors.FreshdeskBadRequest: Validation failed: d{'field': 'Some Field', 'message': 'Unexpected/invalid field in request', 'code': 'invalid_field'}]

 

Solved this.


Solved this.

Would you mind sharing how you solved this? I’m facing the same error message. Thanks.


Found the solution! (Now that I look at abren93’s post, they had most of the solution for my issue)

 

Instead of a PUT to https://domain.freshservice.com/api/v2/tickets/1234 with this body:
{ “my_custom_field”: 555 }

 

Use:
{ “custom_fields”: { “my_custom_field”: 555 } }

 

And to find the “name” of your custom field, make a call to https://domain.freshservice.com/api/v2/ticket_form_fields


https://community.freshworks.dev/t/struggling-to-create-a-servicerequest-with-customfields-using-powershell/7522


Reply