Event Occurred in UI or Rest api in webhook response

I have a application in which i am using rest api to create issues and comments. Webhooks provides response irrespective where it originates or comes from e.g. UI i.e web or rest api … I want to know is there any way/hack we can know where the event was raised? I want to restrict to webhook listen/notify to UI events only.