Best answer

Webhook to Freshdesk to create new ticket - error returned

  • 1 July 2021
  • 3 replies
  • 353 views

I want to create a ticket in Freshdesk as a response to something.  I tried using the Freshdesk integration in Zapier, but it’s missing a number of fields.  So I moved to a webhook instead.  API documentation for Freshdesk is here: https://developers.freshdesk.com/api/#tickets

I’m running a POST to https://(mydomain).freshdesk.com/api/v2/tickets

I’m properly including my Basic Auth as (APIKEY)|X and I’m not getting any auth errors.

I’m including Content-Type: applicaiton/json and making sure the payload is json.

I started off trying to include every field I needed at the end, but it kept erroring so I kept reducing the number of fields until I’m left with the one required field (in this case email) and I am still getting an error.

The error I receive is “The app returned "It should be one of these values: '2,3,4,5,7,8'".”

Thanks in advance for any assistance.

 

 

 

 

icon

Best answer by Troy Tessalone 1 July 2021, 23:51

View original

This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

3 replies

Userlevel 7
Badge +14

Hi @SGS 

Error likely indicates that some required fields are missing.

Also, you may have to use the ‘CUSTOM’ method instead of POST, then specify POST, and use the JSON formatting provided in their API Docs:

{
"description": "Details about the issue...",
"subject": "Support Needed...",
"email": "tom@outerspace.com",
"priority": 1,
"status": 2,
"cc_emails": ["ram@freshdesk.com","diana@freshdesk.com"]
}

 

Hi @Troy Tessalone, thanks for the help.

 

Those aren’t listed as required fields, the required fields are above that with a cross, BUT: I tried them with those fields filled out too just in case and no dice.  Same error

It looks like ‘CUSTOM’ method instead of post it is.  It went through successfully that time.  Thanks for the second look.