API returns status code as 201