I'm now working with an API project, where I'm developing new API endpoints and the final result at the end of the life cycle is as follows: a client should receive updated data out of what it sent to API after UI actions in website. So there is API and UI, the client sends data to API then as a response gets custom URL to a specific website and then the client can do what is necessary in the UI. After doing so the client clicks 1 or another button (save/download) and it gets a document. But I need to send to the client updated document data (changes). So I'm thinking of creating a webhook server that would send this data to clients created webhook listener.
Now I know that it is quite easy to create something that would send this data to clients webhook listener. But I'm interested in how to do it in a perfect world.
So I'm thinking that client should setup its webhook listener URL in my developed API UI where it registered. But I'm not sure of how to do it properly.
E.g. Do I need to set up some verification of URL or something that would be as it should be with webhook servers.
I'm developing with Python, PostgreSQL, Flask and everything is deployed in Heroku. I have some experience in developing webhook listeners, but this is something totally new to me and I want to develop it as well as possible.
Aadmin that has control overA.1andA.2servers.A.2is API service andA.1is the main application service. ThenBclient sends a request with payload toA.2API service which returns URL pointing toA.1service. The URL thatBclient receives is used byXcustomer. What I need to do is that whenXcustomer does modifications for the document which is generated from payload sent fromBclient I need to track these modifications and onsave/downloadaction which was made byXcustomer I need to updateBclient with updated payload data.