Gravit Forms Notification send after 3rd party API response

I think gform_after_submission is the wrong action to use in this case. Have you looked at gform_pre_send_email? It has an abort_email parameter, which might be useful.