How to configure API when discarding the changes for modal box in consultation

When discarding the modal box we have to implement the API in consultation, flow action is not able to see when changes are discarded.