added reason to api.