Hi everyone,
I know it is possible to create the Strapi webhooks manually via the UI
I want to create the webhook configurations automatically via code for a reliable system.
Is there any way to do it and if yes how ?
If there is no typescript way to do it, maybe a rest way to create them through the api? If this is possible I can build a terraformmodule to provision the webhooks
Thanks
1 Like
There is a /admin/webhooks POST method that you can call (and what the CMS is using itself). Pretty sure that you could create a microservice that would handle the authentication with /admin/login and then programmatically add webhooks based on whatever you need/want.
Just a general FYI. You can use strapi routes:list to get a list of all the endpoints available in Strapi or check the requests in your browser (or console via strapi develop) so you can reproduce them in your own application.