Requested CloudFlare API endpoint
PUT zones/$ZONE_ID/purge_cache
Documentation Url to requested endpoint
https://developers.cloudflare.com/api/resources/cache/
Additional context
Looks like purging by site + headers is built in.
I would like another overload for:
Flex purge with tags:
{"tags": ["a-cache-tag", "another-cache-tag"]}
Flex purge with hosts:
{"hosts": ["www.example.com", "images.example.com"]}
Flex purge with prefixes:
{"prefixes": ["www.example.com/foo", "images.example.com/bar/baz"]}