clean up api payload