sent API accepts failure or success argument