changed /api/:type to post instead of get in docs