Hi guys, is there a more complete example for usin...
# ask-questions
c
Hi guys, is there a more complete example for using API to create an experiment? It only returns 400 giving me a list of required arguments (all of which I’ve included in payload) with no logs in growthbook side. Maybe I can enable some verbose logging to know what’s missing/wrong?
In case others meet same issue. The APIs requires content-type header to be set to application/json even though the curl request samples in API docs do not have it specified think panic
r
Hi Jesper, thanks for letting us know about this. I'll make sure we update the documentation accordingly. Sorry for the trouble!
🙏 1
c
It would be nice if the endpoints could return a message regarding wrong/missing content type instead of payload validation error. My guess is that since content type was wrong it instead silently treated it as an empty payload
r
I'm always in favor of better warnings / errors. Thank you for drawing this to our attention!