Common API Calls
As a SaaS provider, you may want to configure and manage Cloudflare for SaaS via the API rather than the Cloudflare dashboard. Below are relevant API calls for creating, editing, and deleting custom hostnames, as well as monitoring, updating, and deleting fallback origins. Further details can be found in the Cloudflare API documentation.
 Custom hostnames
| Endpoint | Notes | 
|---|---|
| List custom hostnames | Use the pageparameter to pull additional pages. Add ahostnameparameter to search for specific hostnames. | 
| Create custom hostname | In the validation_recordsobject of the response, use thetxt_nameandtxt_recordlisted to validate the custom hostname. | 
| Custom hostname details | |
| Edit custom hostname | When sent with an sslobject that matches the existing value, indicates that hostname should restart domain control validation (DCV). | 
| Delete custom hostname | Also deletes any associated SSL/TLS certificates. | 
 Fallback origins
Our API includes the following endpoints related to the fallback origin of a custom hostname: