400 Bad request is coming : API Error

Hi
As per freshworks helpdoc, we used same body request format but still API Error 400 Bad Request is coming. Please guide about it. Enclosing the attached screenshot for the same.

Regards
Kaushal Bansal

As far as I understand, the targetable object should referred to an existing object, so it should include an Id parameter.
Can you try adding an existing contact id?

We are creating new lead, thats why we cant use freshwork contact id. Please suggest

In that case, try creating a new lead first, use that lead’s id in targetable object and set targetable_type to lead. let me know if that works

1 Like

The 400 (Bad Request) status code indicates that the server cannot or will not process the request because the received syntax is invalid, nonsensical, or exceeds some limitation on what the server is willing to process. It means that the request itself has somehow incorrect or corrupted and the server couldn’t understand it. The server is refusing to service the request because the entity of the request is in a format not supported by the requested resource for the requested method . Therefore, it prevents the website from being properly displayed. The main thing to understand is that the 400 Bad Request error is a client-side error.

The cause of a 400 error can be a wrongly written URL or a URL that contains unrecognizable characters. Another cause of the error might be an invalid or expired cookie. Also, if you try to upload a file that’s too large. If the server is programmed with a file size limit, then you might encounter a 400 error.

1 Like