Getting 400 Bad Request

I think your api definition may be malformed. Try checking it with a linter such as https://jsonlint.com/