delete method for API wrapper