Cloudflare Docs
Cloudflare for Platforms
Cloudflare for Platforms
Visit Cloudflare for Platforms on GitHub
Set theme to dark (⇧+D)

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 page parameter to pull additional pages. Add a hostname parameter to search for specific hostnames.
Create custom hostname In the validation_records object of the response, use the txt_name and txt_record listed to validate the custom hostname.
Custom hostname details
Edit custom hostname When sent with an ssl object 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: