put method for api