POST /organizations not working as expected (solved)

Hello,

I’m getting a strange behavior when trying to add a new organization with POST v1/organizations.
When I do this with Postman and paste the JSON of my new organization as the body of the request it works just as expected. If I do the exact same thing with my PHP code I get the response that the “Organization name must be given.”.

What could be the reason?

Thanks

It could be the content-type… If you post a snippet I can take a better look :eyes:

Thanks for the answer. Found out that I was using the wrong curl option. I used CURLOPT_HEADER (which returns a boolean) instead of CURLOPT_HTTPHEADER (which returns an array).

1 Like