Can't create a company using the API (v2) and javascript

Hi,

I'm trying to create a simple freshdesk app to sync a custom object as a Company in freshdesk.

But, I encounter a problem, using the "/api/v2/companies" route to create a new company.
I always have a HTTP 400 response, with the response "{"description":"Validation failed","errors":[{"fie… should be a/an String","code":"missing_field"}]}".

I checked, my request is a POST request.
My headers are {Authorization"<Key that works for fetching something else>"Content-Type"application/json"}

For the data, I tried several formatings, like
  - "{"name":"<my data>"}"
  - {name:"<my data>"}

What did I miss, please ?

Login or Signup to post a comment