Cloudflare for SaaS custom domains webhooks for status updates

We are building out an integration with cloudflare for saas custom domains where our users can add their own custom domains through our interface. We save custom data related to the domain in our database (such as which organisation it belongs to). We also store the current status of the domain from that we get from the "Custom Hostname Details" api call (https://developers.cloudflare.com/api/operations/custom-hostname-for-a-zone-custom-hostname-details). What would be great is to have a webhook to listen to that triggers when the status of a custom hostname changes, instead of constantly polling it. Also that would help our system to be notified when a domain is changed from active to another status (if the user has changed their dns settings for the domain). I can only find notifications for SSL cert changes for custom hostnames. Have anyone solved this issue and if so how?
Cloudflare API Documentation
Interact with Cloudflare's products and services via the Cloudflare API
No description
4 Replies
Kody
Kody15mo ago
Howdy @letobbe , checked internally and that's currently not possible ATM. Did raise to the PM as something to look at.
Tobias
TobiasOP15mo ago
@kody4334 thanks for looking into it. Do you know how other customers approach this currently? What would be the best approach here in the absence of webhooks? We are currently planning to do some kind of interval call to the api endpoint for domains that don’t have the status active. And domains with the status active we will just check every night to see if they change.
Kody
Kody15mo ago
From what I understand, other customers do exactly that (using the API endpoint).
tadamt
tadamt4mo ago
Hey! I just found this thread, and I'm curious if it have been discussed/added to a roadmap? I have the same issue and it would be super great to reduce the API calls by polling custom hostname status. The SSL related webhook events are super great and it would help a lot to have similar event type for the ownership status 🙏
Want results from more Discord servers?
Add your server