fixed API put/post call